Search in sources :

Example 1 with ExternalResourceManagerEx

use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-community by JetBrains.

the class XmlTagImpl method externalResourceModificationTracker.

private ModificationTracker externalResourceModificationTracker() {
    Project project = getProject();
    ExternalResourceManagerEx manager = ExternalResourceManagerEx.getInstanceEx();
    return () -> manager.getModificationCount(project);
}
Also used : Project(com.intellij.openapi.project.Project) ExternalResourceManagerEx(com.intellij.javaee.ExternalResourceManagerEx)

Example 2 with ExternalResourceManagerEx

use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-plugins by JetBrains.

the class CfmlCompletionTest method testTagCompletionAfterC.

public void testTagCompletionAfterC() throws Throwable {
    final ExternalResourceManagerEx manager = ExternalResourceManagerEx.getInstanceEx();
    final String doctype = manager.getDefaultHtmlDoctype(getProject());
    manager.setDefaultHtmlDoctype(XmlUtil.XHTML_URI, getProject());
    try {
        doTestCompletionContainsVariants("cffunction", "center", "cfset");
    } finally {
        manager.setDefaultHtmlDoctype(doctype, getProject());
    }
}
Also used : ExternalResourceManagerEx(com.intellij.javaee.ExternalResourceManagerEx)

Example 3 with ExternalResourceManagerEx

use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-community by JetBrains.

the class MavenSchemaProvider method getSchemaFile.

@NotNull
public static VirtualFile getSchemaFile(@NotNull String url) {
    String location = ((ExternalResourceManagerEx) ExternalResourceManager.getInstance()).getStdResource(url, null);
    assert location != null : "cannot find a standard resource for " + url;
    VirtualFile result = VfsUtilCore.findRelativeFile(location, null);
    assert result != null : "cannot find a schema file for URL: " + url + " location: " + location;
    return result;
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) ExternalResourceManagerEx(com.intellij.javaee.ExternalResourceManagerEx) NotNull(org.jetbrains.annotations.NotNull)

Example 4 with ExternalResourceManagerEx

use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-community by JetBrains.

the class RngXmlHighlightingTest method init.

@Override
protected void init() {
    super.init();
    ApplicationManager.getApplication().runWriteAction(() -> {
        final ExternalResourceManagerEx m = ExternalResourceManagerEx.getInstanceEx();
        ExternalResourceManagerExImpl.addTestResource("urn:test:simple.rng", toAbsolutePath("highlighting/simple.rng"), getTestRootDisposable());
        ExternalResourceManagerExImpl.addTestResource("urn:test:addressBook", toAbsolutePath("highlighting/rnc/addressbook.rnc"), getTestRootDisposable());
        //m.addResource("http://www.w3.org/1999/XSL/Transform", toAbsolutePath("highlighting/relaxng.rng"));
        ExternalResourceManagerExImpl.addTestResource("http://www.w3.org/1999/XSL/Format", toAbsolutePath("highlighting/rnc/fo/main.rnc"), getTestRootDisposable());
        ExternalResourceManagerExImpl.addTestResource("http://docbook.org/ns/docbook", toAbsolutePath("highlighting/docbook.rng"), getTestRootDisposable());
        ExternalResourceManagerExImpl.addTestResource("urn:intelliForm:AttachmentFilter", toAbsolutePath("highlighting/attachment-filter.rng"), getTestRootDisposable());
        ExternalResourceManagerExImpl.addTestResource("http://www.w3.org/1999/xhtml", toAbsolutePath("highlighting/html5/xhtml5.rnc"), getTestRootDisposable());
        m.addIgnoredResource("urn:intelliForm:Spaces");
        m.addIgnoredResource("http://www.w3.org/1999/xlink");
        m.addIgnoredResource("http://www.w3.org/2000/svg");
        m.addIgnoredResource("http://www.ascc.net/xml/schematron");
        m.addIgnoredResource("http://www.w3.org/2000/svg");
        m.addIgnoredResource("http://www.w3.org/1998/Math/MathML");
        m.addIgnoredResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
        m.addIgnoredResource("http://nwalsh.com/xmlns/schema-control/");
        m.addIgnoredResource("http://xml.apache.org/fop/extensions");
        m.addIgnoredResource("http://www.antennahouse.com/names/XSL/Extensions");
        m.addIgnoredResource("http://www.renderx.com/XSL/Extensions");
        m.addIgnoredResource("http://relaxng.org/ns/compatibility/annotations/1.0");
    });
}
Also used : ExternalResourceManagerEx(com.intellij.javaee.ExternalResourceManagerEx)

Example 5 with ExternalResourceManagerEx

use of com.intellij.javaee.ExternalResourceManagerEx in project intellij-community by JetBrains.

the class XmlCompletionTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    addResource("http://www.springframework.org/schema/beans", getTestDataPath() + "/spring-beans-2.0.xsd");
    final ExternalResourceManagerEx manager = ExternalResourceManagerEx.getInstanceEx();
    myOldDoctype = manager.getDefaultHtmlDoctype(getProject());
    manager.setDefaultHtmlDoctype(XmlUtil.XHTML_URI, getProject());
    CamelHumpMatcher.forceStartMatching(myFixture.getTestRootDisposable());
}
Also used : ExternalResourceManagerEx(com.intellij.javaee.ExternalResourceManagerEx)

Aggregations

ExternalResourceManagerEx (com.intellij.javaee.ExternalResourceManagerEx)10 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 Project (com.intellij.openapi.project.Project)1 NotNull (org.jetbrains.annotations.NotNull)1