Search in sources :

Example 1 with FlexMxmlNSDescriptor

use of com.intellij.javascript.flex.mxml.schema.FlexMxmlNSDescriptor in project intellij-plugins by JetBrains.

the class FlexHighlightingTest method testDumbMode.

@JSTestOptions({ JSTestOption.WithFlexFacet, JSTestOption.WithGumboSdk })
@SuppressWarnings({ "ConstantConditions" })
public void testDumbMode() throws Exception {
    DumbServiceImpl.getInstance(getProject()).setDumb(true);
    ((DaemonCodeAnalyzerImpl) DaemonCodeAnalyzer.getInstance(getProject())).mustWaitForSmartMode(false, getTestRootDisposable());
    XmlNSDescriptor nsDescriptor;
    try {
        assertTrue(DumbService.isDumb(getProject()));
        configureByFile(getBasePath() + "/dumbMode.mxml");
        nsDescriptor = ((XmlFile) getFile()).getDocument().getRootTagNSDescriptor();
        assertTrue(nsDescriptor.toString(), nsDescriptor instanceof FlexMxmlNSDescriptor);
        doDoTest(true, true);
    } finally {
        DumbServiceImpl.getInstance(getProject()).setDumb(false);
    }
    nsDescriptor = ((XmlFile) getFile()).getDocument().getRootTagNSDescriptor();
    assertTrue(nsDescriptor.toString(), nsDescriptor instanceof FlexMxmlNSDescriptor);
    doDoTest(true, true);
}
Also used : XmlNSDescriptor(com.intellij.xml.XmlNSDescriptor) XmlFile(com.intellij.psi.xml.XmlFile) DaemonCodeAnalyzerImpl(com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl) FlexMxmlNSDescriptor(com.intellij.javascript.flex.mxml.schema.FlexMxmlNSDescriptor)

Example 2 with FlexMxmlNSDescriptor

use of com.intellij.javascript.flex.mxml.schema.FlexMxmlNSDescriptor in project intellij-plugins by JetBrains.

the class FlexHighlightingTest method testAfterRename.

@JSTestOptions({ JSTestOption.WithFlexFacet, JSTestOption.WithGumboSdk })
@SuppressWarnings({ "ConstantConditions" })
public void testAfterRename() throws Exception {
    configureByFile(getBasePath() + "/afterRename.xml");
    XmlNSDescriptor nsDescriptor = ((XmlFile) getFile()).getDocument().getRootTagNSDescriptor();
    assertTrue(nsDescriptor.toString(), nsDescriptor instanceof XmlNSDescriptorImpl);
    doDoTest(true, true);
    new RenameProcessor(getProject(), getFile(), "afterRename.mxml", false, false).run();
    assertEquals("afterRename.mxml", getFile().getName());
    assertFalse(myFile.isValid());
    myFile = myPsiManager.findFile(getFile().getVirtualFile().getParent().findChild("afterRename.mxml"));
    assertTrue(myFile.isValid());
    nsDescriptor = ((XmlFile) getFile()).getDocument().getRootTagNSDescriptor();
    assertTrue(nsDescriptor.toString(), nsDescriptor instanceof FlexMxmlNSDescriptor);
    doDoTest(true, true);
}
Also used : XmlNSDescriptor(com.intellij.xml.XmlNSDescriptor) RenameProcessor(com.intellij.refactoring.rename.RenameProcessor) XmlFile(com.intellij.psi.xml.XmlFile) FlexMxmlNSDescriptor(com.intellij.javascript.flex.mxml.schema.FlexMxmlNSDescriptor) XmlNSDescriptorImpl(com.intellij.xml.impl.dtd.XmlNSDescriptorImpl)

Aggregations

FlexMxmlNSDescriptor (com.intellij.javascript.flex.mxml.schema.FlexMxmlNSDescriptor)2 XmlFile (com.intellij.psi.xml.XmlFile)2 XmlNSDescriptor (com.intellij.xml.XmlNSDescriptor)2 DaemonCodeAnalyzerImpl (com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl)1 RenameProcessor (com.intellij.refactoring.rename.RenameProcessor)1 XmlNSDescriptorImpl (com.intellij.xml.impl.dtd.XmlNSDescriptorImpl)1