diff --git a/plugins/relaxng/src/META-INF/plugin.xml b/plugins/relaxng/src/META-INF/plugin.xml
index 90d431df57fb..7932449418d3 100644
--- a/plugins/relaxng/src/META-INF/plugin.xml
+++ b/plugins/relaxng/src/META-INF/plugin.xml
@@ -55,7 +55,7 @@
-
+
@@ -65,12 +65,20 @@
+
+
+
+
+
+
+
+
+
+
+
-
- org.intellij.plugins.relaxNG.ProjectLoader
-
org.intellij.plugins.relaxNG.config.NoNamespaceConfig
org.intellij.plugins.relaxNG.config.NoNamespaceConfigImpl
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/ApplicationLoader.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/ApplicationLoader.java
index 7f8e3230a070..f9d826e09858 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/ApplicationLoader.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/ApplicationLoader.java
@@ -52,6 +52,7 @@ import org.jetbrains.annotations.NotNull;
public class ApplicationLoader implements ApplicationComponent, InspectionToolProvider {
private static final String RNG_EXT = "rng";
private static final String VALIDATE_XML = "ValidateXml";
+ public static final String RNG_NAMESPACE = "http://relaxng.org/ns/structure/1.0";
@NonNls
@NotNull
@@ -79,7 +80,7 @@ public class ApplicationLoader implements ApplicationComponent, InspectionToolPr
final MetaDataRegistrar registrar = MetaDataRegistrar.getInstance();
registrar.registerMetaData(
new AndFilter(
- new NamespaceFilter(ProjectLoader.RNG_NAMESPACE),
+ new NamespaceFilter(RNG_NAMESPACE),
new ClassFilter(XmlDocument.class)
),
RngNsDescriptor.class);
@@ -116,7 +117,7 @@ public class ApplicationLoader implements ApplicationComponent, InspectionToolPr
public class ResourceProvider implements StandardResourceProvider {
public void registerResources(ResourceRegistrar registrar) {
- registrar.addStdResource(ProjectLoader.RNG_NAMESPACE, "resources/relaxng.rng", getClass());
+ registrar.addStdResource(RNG_NAMESPACE, "resources/relaxng.rng", getClass());
registrar.addIgnoredResource("http://relaxng.org/ns/compatibility/annotations/1.0");
}
}
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/ProjectLoader.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/ProjectLoader.java
deleted file mode 100644
index 03d39ca86fc8..000000000000
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/ProjectLoader.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright 2007 Sascha Weinreuter
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.intellij.plugins.relaxNG;
-
-import com.intellij.lang.ASTNode;
-import com.intellij.openapi.components.ProjectComponent;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.util.TextRange;
-import com.intellij.psi.AbstractElementManipulator;
-import com.intellij.psi.PsiManager;
-import com.intellij.util.IncorrectOperationException;
-import com.intellij.util.xml.DomFileDescription;
-import com.intellij.util.xml.DomManager;
-import com.intellij.util.xml.highlighting.DomElementsAnnotator;
-import org.intellij.plugins.relaxNG.compact.RncTokenTypes;
-import org.intellij.plugins.relaxNG.compact.psi.RncFileReference;
-import org.intellij.plugins.relaxNG.compact.psi.util.RenameUtil;
-import org.intellij.plugins.relaxNG.model.annotation.ModelAnnotator;
-import org.intellij.plugins.relaxNG.xml.dom.*;
-import org.intellij.plugins.relaxNG.xml.dom.impl.RngDefineImpl;
-import org.intellij.plugins.relaxNG.xml.dom.impl.RngGrammarImpl;
-import org.intellij.plugins.relaxNG.xml.dom.impl.RngIncludeImpl;
-import org.intellij.plugins.relaxNG.xml.dom.impl.RngRefImpl;
-import org.jetbrains.annotations.NonNls;
-import org.jetbrains.annotations.NotNull;
-
-/**
- * Created by IntelliJ IDEA.
- * User: sweinreuter
- * Date: 16.07.2007
- */
-public class ProjectLoader implements ProjectComponent {
- public static final String RNG_NAMESPACE = "http://relaxng.org/ns/structure/1.0";
-
- private final Project myProject;
-
- public ProjectLoader(Project project) {
- myProject = project;
- }
-
- @NonNls
- @NotNull
- public String getComponentName() {
- return "RELAX-NG";
- }
-
- @SuppressWarnings({ "deprecation" })
- public void initComponent() {
- final DomManager mgr = DomManager.getDomManager(myProject);
- mgr.registerFileDescription(new MyFileDescription(RngGrammar.class, "grammar"));
- mgr.registerFileDescription(new MyFileDescription(RngElement.class, "element"));
- mgr.registerFileDescription(new MyFileDescription(RngChoice.class, "choice"));
- mgr.registerFileDescription(new MyFileDescription(RngGroup.class, "group"));
- mgr.registerFileDescription(new MyFileDescription(RngInterleave.class, "interleave"));
- }
-
- public void disposeComponent() {
- }
-
- public void projectOpened() {
- }
-
- public void projectClosed() {
- }
-
- private static class MyFileDescription extends DomFileDescription {
- public MyFileDescription(Class elementClass, String rootTagName) {
- super(elementClass, rootTagName);
- registerNamespacePolicy("RELAX-NG", RNG_NAMESPACE);
- registerImplementation(RngDefine.class, RngDefineImpl.class);
- registerImplementation(RngGrammar.class, RngGrammarImpl.class);
- registerImplementation(RngInclude.class, RngIncludeImpl.class);
- registerImplementation(RngRef.class, RngRefImpl.class);
- }
-
- public boolean isAutomaticHighlightingEnabled() {
- return true;
- }
-
- public DomElementsAnnotator createAnnotator() {
- return new ModelAnnotator();
- }
- }
-
- public static class RncFileReferenceManipulator extends AbstractElementManipulator {
- public RncFileReference handleContentChange(RncFileReference element, TextRange range, String newContent) throws IncorrectOperationException {
- final ASTNode node = element.getNode();
- assert node != null;
-
- final ASTNode literal = node.findChildByType(RncTokenTypes.LITERAL);
- if (literal != null) {
- assert range.equals(element.getReferenceRange());
- final PsiManager manager = PsiManager.getInstance(element.getProject());
- final ASTNode newChild = RenameUtil.createLiteralNode(manager, newContent);
- literal.getTreeParent().replaceChild(literal, newChild);
- }
- return element;
- }
-
- @Override
- public TextRange getRangeInElement(RncFileReference element) {
- return element.getReferenceRange();
- }
- }
-}
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/RelaxNGReferenceContributor.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/RelaxNGReferenceContributor.java
index 08c8a1e63b91..08b281c95183 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/RelaxNGReferenceContributor.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/RelaxNGReferenceContributor.java
@@ -17,7 +17,7 @@ import static com.intellij.patterns.XmlPatterns.xmlTag;
* @author peter
*/
public class RelaxNGReferenceContributor extends PsiReferenceContributor {
- private static final XmlNamedElementPattern RNG_TAG_PATTERN = xmlTag().withNamespace(string().equalTo(ProjectLoader.RNG_NAMESPACE));
+ private static final XmlNamedElementPattern RNG_TAG_PATTERN = xmlTag().withNamespace(string().equalTo(ApplicationLoader.RNG_NAMESPACE));
private static final XmlNamedElementPattern.XmlAttributePattern NAME_ATTR_PATTERN = xmlAttribute("name");
private static final StringPattern ELEMENT_OR_ATTRIBUTE_PATTERN = string().oneOf("element", "attribute");
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/RncFileReferenceManipulator.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/RncFileReferenceManipulator.java
new file mode 100644
index 000000000000..e9bd6a354e1e
--- /dev/null
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/RncFileReferenceManipulator.java
@@ -0,0 +1,35 @@
+package org.intellij.plugins.relaxNG;
+
+import com.intellij.lang.ASTNode;
+import com.intellij.openapi.util.TextRange;
+import com.intellij.psi.AbstractElementManipulator;
+import com.intellij.psi.PsiManager;
+import com.intellij.util.IncorrectOperationException;
+import org.intellij.plugins.relaxNG.compact.RncTokenTypes;
+import org.intellij.plugins.relaxNG.compact.psi.RncFileReference;
+import org.intellij.plugins.relaxNG.compact.psi.util.RenameUtil;
+
+/**
+* @author peter
+*/
+public class RncFileReferenceManipulator extends AbstractElementManipulator {
+ public RncFileReference handleContentChange(RncFileReference element, TextRange range, String newContent) throws
+ IncorrectOperationException {
+ final ASTNode node = element.getNode();
+ assert node != null;
+
+ final ASTNode literal = node.findChildByType(RncTokenTypes.LITERAL);
+ if (literal != null) {
+ assert range.equals(element.getReferenceRange());
+ final PsiManager manager = PsiManager.getInstance(element.getProject());
+ final ASTNode newChild = RenameUtil.createLiteralNode(manager, newContent);
+ literal.getTreeParent().replaceChild(literal, newChild);
+ }
+ return element;
+ }
+
+ @Override
+ public TextRange getRangeInElement(RncFileReference element) {
+ return element.getReferenceRange();
+ }
+}
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/RngDocumentationProvider.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/RngDocumentationProvider.java
index 303d717e3a57..4ffd00be4f23 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/RngDocumentationProvider.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/RngDocumentationProvider.java
@@ -102,7 +102,7 @@ public class RngDocumentationProvider implements DocumentationProvider {
}
private static StringBuilder getDocumentationFromTag(XmlTag tag, String localName, String kind) {
- if (tag.getNamespace().equals(ProjectLoader.RNG_NAMESPACE)) {
+ if (tag.getNamespace().equals(ApplicationLoader.RNG_NAMESPACE)) {
final StringBuilder sb = new StringBuilder();
sb.append(kind).append(": ").append(localName).append("
");
final XmlTag[] docTags = tag.findSubTags("documentation", COMPATIBILITY_ANNOTATIONS_1_0);
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/RngDomFileDescription.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/RngDomFileDescription.java
new file mode 100644
index 000000000000..7e1e2a2313e3
--- /dev/null
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/RngDomFileDescription.java
@@ -0,0 +1,54 @@
+package org.intellij.plugins.relaxNG;
+
+import com.intellij.util.xml.DomFileDescription;
+import com.intellij.util.xml.highlighting.DomElementsAnnotator;
+import org.intellij.plugins.relaxNG.model.annotation.ModelAnnotator;
+import org.intellij.plugins.relaxNG.xml.dom.*;
+
+/**
+* @author peter
+*/
+public class RngDomFileDescription extends DomFileDescription {
+ public RngDomFileDescription(Class elementClass, String rootTagName) {
+ super(elementClass, rootTagName);
+ registerNamespacePolicy("RELAX-NG", ApplicationLoader.RNG_NAMESPACE);
+ }
+
+ public boolean isAutomaticHighlightingEnabled() {
+ return true;
+ }
+
+ public DomElementsAnnotator createAnnotator() {
+ return new ModelAnnotator();
+ }
+
+ public static class RngGrammarDescription extends RngDomFileDescription {
+ public RngGrammarDescription() {
+ super(RngGrammar.class, "grammar");
+ }
+ }
+
+ public static class RngElementDescription extends RngDomFileDescription {
+ public RngElementDescription() {
+ super(RngElement.class, "element");
+ }
+ }
+
+ public static class RngChoiceDescription extends RngDomFileDescription {
+ public RngChoiceDescription() {
+ super(RngChoice.class, "choice");
+ }
+ }
+
+ public static class RngGroupDescription extends RngDomFileDescription {
+ public RngGroupDescription() {
+ super(RngGroup.class, "group");
+ }
+ }
+
+ public static class RngInterleaveDescription extends RngDomFileDescription {
+ public RngInterleaveDescription() {
+ super(RngInterleave.class, "interleave");
+ }
+ }
+}
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/convert/ConvertSchemaAction.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/convert/ConvertSchemaAction.java
index cd0ec5aba48f..7c9eb3eae4ff 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/convert/ConvertSchemaAction.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/convert/ConvertSchemaAction.java
@@ -29,7 +29,7 @@ import com.intellij.psi.PsiManager;
import com.intellij.psi.xml.XmlDocument;
import com.intellij.psi.xml.XmlFile;
import com.intellij.psi.xml.XmlTag;
-import org.intellij.plugins.relaxNG.ProjectLoader;
+import org.intellij.plugins.relaxNG.ApplicationLoader;
import org.intellij.plugins.relaxNG.compact.RncFileType;
import org.intellij.plugins.relaxNG.validation.ValidateAction;
@@ -71,7 +71,7 @@ public class ConvertSchemaAction extends AnAction {
final XmlTag rootTag = document.getRootTag();
assert rootTag != null;
final String uri = rootTag.getNamespace();
- if (ProjectLoader.RNG_NAMESPACE.equals(uri) && files.length == 1) {
+ if (ApplicationLoader.RNG_NAMESPACE.equals(uri) && files.length == 1) {
return SchemaType.RNG;
}
}
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/inspections/UnusedDefineInspection.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/inspections/UnusedDefineInspection.java
index 1561231e607f..b6d4eeade213 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/inspections/UnusedDefineInspection.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/inspections/UnusedDefineInspection.java
@@ -40,7 +40,7 @@ import com.intellij.util.IncorrectOperationException;
import com.intellij.util.Query;
import com.intellij.util.xml.DomElement;
import com.intellij.util.xml.DomManager;
-import org.intellij.plugins.relaxNG.ProjectLoader;
+import org.intellij.plugins.relaxNG.ApplicationLoader;
import org.intellij.plugins.relaxNG.compact.psi.RncDefine;
import org.intellij.plugins.relaxNG.compact.psi.RncElementVisitor;
import org.intellij.plugins.relaxNG.compact.psi.RncGrammar;
@@ -135,7 +135,7 @@ public class UnusedDefineInspection extends BaseInspection {
if (!tag.getLocalName().equals("define")) {
return;
}
- if (!tag.getNamespace().equals(ProjectLoader.RNG_NAMESPACE)) {
+ if (!tag.getNamespace().equals(ApplicationLoader.RNG_NAMESPACE)) {
return;
}
if (tag.getAttribute("combine") != null) {
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/descriptors/RngNsDescriptor.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/descriptors/RngNsDescriptor.java
index b2c86cf6d550..7e9aaac14dcd 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/descriptors/RngNsDescriptor.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/descriptors/RngNsDescriptor.java
@@ -39,7 +39,7 @@ import com.intellij.util.Function;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.xml.XmlElementDescriptor;
import com.intellij.xml.XmlNSDescriptor;
-import org.intellij.plugins.relaxNG.ProjectLoader;
+import org.intellij.plugins.relaxNG.ApplicationLoader;
import org.intellij.plugins.relaxNG.model.resolve.RelaxIncludeIndex;
import org.intellij.plugins.relaxNG.validation.RngParser;
import org.intellij.plugins.relaxNG.validation.XmlInstanceValidator;
@@ -243,7 +243,7 @@ public class RngNsDescriptor implements XmlNSDescriptor, Validator {
return;
}
// RNG XML itself is validated by parsing it with Jing, so we don't want to schema-validate it
- if (!ProjectLoader.RNG_NAMESPACE.equals(rootTag.getNamespace())) {
+ if (!ApplicationLoader.RNG_NAMESPACE.equals(rootTag.getNamespace())) {
XmlInstanceValidator.doValidation(doc, host, getDescriptorFile());
}
}
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/resolve/RelaxIncludeProvider.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/resolve/RelaxIncludeProvider.java
index 3fd4d874a02e..9f2867d3907e 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/resolve/RelaxIncludeProvider.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/resolve/RelaxIncludeProvider.java
@@ -7,7 +7,7 @@ import com.intellij.psi.impl.include.FileIncludeInfo;
import com.intellij.psi.impl.include.FileIncludeProvider;
import com.intellij.util.indexing.FileContent;
import com.intellij.util.xml.NanoXmlUtil;
-import org.intellij.plugins.relaxNG.ProjectLoader;
+import org.intellij.plugins.relaxNG.ApplicationLoader;
import org.intellij.plugins.relaxNG.compact.RncFileType;
import org.intellij.plugins.relaxNG.compact.psi.RncElement;
import org.intellij.plugins.relaxNG.compact.psi.RncElementVisitor;
@@ -72,7 +72,7 @@ public class RelaxIncludeProvider extends FileIncludeProvider {
@Override
public void startElement(String name, String nsPrefix, String nsURI, String systemID, int lineNr) throws Exception {
- boolean isRngTag = ProjectLoader.RNG_NAMESPACE.equals(nsURI);
+ boolean isRngTag = ApplicationLoader.RNG_NAMESPACE.equals(nsURI);
if (!isRNG) { // analyzing start tag
if (!isRngTag) {
throw new NanoXmlUtil.ParserStoppedException();
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/resolve/RelaxSymbolIndex.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/resolve/RelaxSymbolIndex.java
index 43d4baa8a535..2f198f753b72 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/resolve/RelaxSymbolIndex.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/model/resolve/RelaxSymbolIndex.java
@@ -23,7 +23,7 @@ import com.intellij.util.io.KeyDescriptor;
import com.intellij.util.text.CharArrayUtil;
import com.intellij.util.text.CharSequenceReader;
import com.intellij.util.xml.NanoXmlUtil;
-import org.intellij.plugins.relaxNG.ProjectLoader;
+import org.intellij.plugins.relaxNG.ApplicationLoader;
import org.intellij.plugins.relaxNG.compact.RncFileType;
import org.intellij.plugins.relaxNG.model.CommonElement;
import org.intellij.plugins.relaxNG.model.Define;
@@ -68,7 +68,7 @@ public class RelaxSymbolIndex extends ScalarIndexExtension {
final HashMap map = new HashMap();
if (inputData.getFileType() == XmlFileType.INSTANCE) {
CharSequence inputDataContentAsText = inputData.getContentAsText();
- if (CharArrayUtil.indexOf(inputDataContentAsText, ProjectLoader.RNG_NAMESPACE, 0) == -1) return Collections.EMPTY_MAP;
+ if (CharArrayUtil.indexOf(inputDataContentAsText, ApplicationLoader.RNG_NAMESPACE, 0) == -1) return Collections.EMPTY_MAP;
NanoXmlUtil.parse(new CharSequenceReader(inputDataContentAsText), new NanoXmlUtil.IXMLBuilderAdapter() {
NanoXmlUtil.IXMLBuilderAdapter attributeHandler;
int depth;
@@ -83,7 +83,7 @@ public class RelaxSymbolIndex extends ScalarIndexExtension {
@Override
public void startElement(String name, String nsPrefix, String nsURI, String systemID, int lineNr) throws Exception {
attributeHandler = null;
- if (depth == 1 && ProjectLoader.RNG_NAMESPACE.equals(nsURI)) {
+ if (depth == 1 && ApplicationLoader.RNG_NAMESPACE.equals(nsURI)) {
if ("define".equals(name)) {
attributeHandler = new NanoXmlUtil.IXMLBuilderAdapter() {
@Override
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/validation/RngSchemaValidator.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/validation/RngSchemaValidator.java
index f13a4bbb3647..3deebb759938 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/validation/RngSchemaValidator.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/validation/RngSchemaValidator.java
@@ -31,7 +31,7 @@ import com.intellij.psi.*;
import com.intellij.psi.search.PsiElementProcessor;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.xml.*;
-import org.intellij.plugins.relaxNG.ProjectLoader;
+import org.intellij.plugins.relaxNG.ApplicationLoader;
import org.intellij.plugins.relaxNG.compact.RncFileType;
import org.intellij.plugins.relaxNG.compact.psi.RncFile;
import org.intellij.plugins.relaxNG.model.resolve.RelaxIncludeIndex;
@@ -66,7 +66,7 @@ public class RngSchemaValidator implements ExternalAnnotator {
if (rootTag == null) {
return;
}
- if (!ProjectLoader.RNG_NAMESPACE.equals(rootTag.getNamespace())) {
+ if (!ApplicationLoader.RNG_NAMESPACE.equals(rootTag.getNamespace())) {
return;
}
} else {
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/xml/dom/impl/CreatePatternFix.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/xml/dom/impl/CreatePatternFix.java
index 8fe650678b8f..661e34100528 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/xml/dom/impl/CreatePatternFix.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/xml/dom/impl/CreatePatternFix.java
@@ -30,7 +30,7 @@ import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.xml.XmlTag;
import com.intellij.psi.xml.XmlText;
import com.intellij.util.IncorrectOperationException;
-import org.intellij.plugins.relaxNG.ProjectLoader;
+import org.intellij.plugins.relaxNG.ApplicationLoader;
import org.intellij.plugins.relaxNG.xml.dom.RngGrammar;
import org.jetbrains.annotations.NotNull;
@@ -98,7 +98,7 @@ class CreatePatternFix implements IntentionAction, LocalQuickFix {
private void doFix() throws IncorrectOperationException {
final XmlTag tag = PsiTreeUtil.getParentOfType(myReference.getElement(), XmlTag.class);
assert tag != null;
- final XmlTag defineTag = tag.createChildTag("define", ProjectLoader.RNG_NAMESPACE, "\n \n", false);
+ final XmlTag defineTag = tag.createChildTag("define", ApplicationLoader.RNG_NAMESPACE, "\n \n", false);
defineTag.setAttribute("name", myReference.getCanonicalText());
final RngGrammar grammar = ((DefinitionReference)myReference).getScope();
diff --git a/plugins/relaxng/src/org/intellij/plugins/relaxNG/xml/dom/impl/RngHrefConverter.java b/plugins/relaxng/src/org/intellij/plugins/relaxNG/xml/dom/impl/RngHrefConverter.java
index 9753566519ab..d6413006cbb5 100644
--- a/plugins/relaxng/src/org/intellij/plugins/relaxNG/xml/dom/impl/RngHrefConverter.java
+++ b/plugins/relaxng/src/org/intellij/plugins/relaxNG/xml/dom/impl/RngHrefConverter.java
@@ -21,7 +21,7 @@ import com.intellij.psi.PsiReference;
import com.intellij.psi.impl.source.resolve.reference.impl.providers.FileReferenceSet;
import com.intellij.psi.xml.XmlFile;
import com.intellij.util.xml.*;
-import org.intellij.plugins.relaxNG.ProjectLoader;
+import org.intellij.plugins.relaxNG.ApplicationLoader;
import org.intellij.plugins.relaxNG.references.FileReferenceUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -59,7 +59,7 @@ public class RngHrefConverter extends Converter implements CustomRefere
}
final FileReferenceSet set = FileReferenceSet.createSet(element, false, false, false);
if (set != null) {
- return FileReferenceUtil.restrict(set, FileReferenceUtil.byNamespace(ProjectLoader.RNG_NAMESPACE), true);
+ return FileReferenceUtil.restrict(set, FileReferenceUtil.byNamespace(ApplicationLoader.RNG_NAMESPACE), true);
} else {
return PsiReference.EMPTY_ARRAY;
}
diff --git a/plugins/relaxng/test/org/intellij/plugins/relaxNG/AbstractParsingTest.java b/plugins/relaxng/test/org/intellij/plugins/relaxNG/AbstractParsingTest.java
index 9bc0f75ce406..956eb4af68bb 100644
--- a/plugins/relaxng/test/org/intellij/plugins/relaxNG/AbstractParsingTest.java
+++ b/plugins/relaxng/test/org/intellij/plugins/relaxNG/AbstractParsingTest.java
@@ -42,7 +42,6 @@ public abstract class AbstractParsingTest extends ParsingTestCase {
new WriteAction() {
protected void run(Result result) throws Throwable {
new ApplicationLoader().initComponent();
- new ProjectLoader(getProject()).initComponent();
ExternalResourceManagerEx.getInstanceEx().addIgnoredResource("urn:test:undefined");
}
}.execute();