use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-community by JetBrains.
the class XmlHighlightingTest method disableHtmlSupport.
private void disableHtmlSupport() {
final ExternalResourceManagerEx manager = ExternalResourceManagerEx.getInstanceEx();
myOldDoctype = manager.getDefaultHtmlDoctype(getProject());
manager.setDefaultHtmlDoctype("fake", getProject());
}
use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-community by JetBrains.
the class XmlHighlightingTest method testExternalValidatorOnValidXmlWithNamespacesNotSetup2.
@HighlightingFlags(HighlightingFlag.SkipExternalValidation)
public void testExternalValidatorOnValidXmlWithNamespacesNotSetup2() throws Exception {
final ExternalResourceManagerEx instanceEx = ExternalResourceManagerEx.getInstanceEx();
try {
WriteCommandAction.runWriteCommandAction(null, () -> instanceEx.addIgnoredResource(""));
doTest(getFullRelativeTestName(".xml"), true, false);
} finally {
WriteCommandAction.runWriteCommandAction(null, () -> instanceEx.removeIgnoredResource(""));
}
}
use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-community by JetBrains.
the class XmlHighlightingTest method testXInclude.
public void testXInclude() throws Exception {
final String testName = getTestName(false);
configureByFiles(null, BASE_PATH + testName + ".xml", BASE_PATH + testName + "-inc.xml", BASE_PATH + testName + "TestSchema.xsd");
ExternalResourceManagerEx externalResourceManager = ExternalResourceManagerEx.getInstanceEx();
try {
ApplicationManager.getApplication().runWriteAction(() -> externalResourceManager.addIgnoredResource("oxf:/apps/somefile.xml"));
doDoTest(true, false, true);
VirtualFile[] includedFiles = FileIncludeManager.getManager(getProject()).getIncludedFiles(getFile().getVirtualFile(), true);
assertEquals(1, includedFiles.length);
} finally {
ApplicationManager.getApplication().runWriteAction(() -> externalResourceManager.removeIgnoredResource("oxf:/apps/somefile.xml"));
}
}
use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-community by JetBrains.
the class XmlHighlightingTest method testExternalValidatorOnValidXmlWithNamespacesNotSetup.
public void testExternalValidatorOnValidXmlWithNamespacesNotSetup() throws Exception {
final ExternalResourceManagerEx instanceEx = ExternalResourceManagerEx.getInstanceEx();
WriteCommandAction.runWriteCommandAction(null, () -> {
instanceEx.addIgnoredResource("http://xml.apache.org/axis/wsdd2/");
instanceEx.addIgnoredResource("http://xml.apache.org/axis/wsdd2/providers/java");
instanceEx.addIgnoredResource("http://soapinterop.org/xsd2");
});
doTest(getFullRelativeTestName(".xml"), true, false);
}
use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-plugins by JetBrains.
the class CfmlCompletionTest method testTagCompletionAfterAngleBracket.
public void testTagCompletionAfterAngleBracket() throws Throwable {
final ExternalResourceManagerEx manager = ExternalResourceManagerEx.getInstanceEx();
final String doctype = manager.getDefaultHtmlDoctype(getProject());
manager.setDefaultHtmlDoctype(XmlUtil.XHTML_URI, getProject());
try {
doTestCompletionContainsVariants("cffunction", "center", "cfset", "h1");
} finally {
manager.setDefaultHtmlDoctype(doctype, getProject());
}
}
Aggregations