From b0cd96f8ffbf09f248505df41a48e29091fc9b3a Mon Sep 17 00:00:00 2001 From: Sergey Vasiliev Date: Fri, 14 Dec 2007 15:08:06 +0300 Subject: [PATCH] seam: rename, alt-f7, new schemas, etc. --- .../intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java | 2 +- .../src/com/intellij/util/xml/impl/DomFileElementImpl.java | 5 +++++ .../src/com/intellij/util/xml/impl/DomInvocationHandler.java | 2 +- dom/openapi/src/com/intellij/util/xml/DomElement.java | 3 +++ .../src/com/intellij/util/xml/DomFileDescription.java | 2 ++ .../com/intellij/xml/impl/dom/DomElementXmlDescriptor.java | 12 ++++-------- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/codeInsight/tests/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java b/codeInsight/tests/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java index 8b26609121..68bffd5a06 100644 --- a/codeInsight/tests/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java +++ b/codeInsight/tests/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java @@ -156,7 +156,7 @@ public abstract class DaemonAnalyzerTestCase extends CodeInsightTestCase { VirtualFileFilter javaFilesFilter = new VirtualFileFilter() { public boolean accept(VirtualFile file) { FileType fileType = FileTypeManager.getInstance().getFileTypeByFile(file); - return fileType == StdFileTypes.JAVA || fileType == StdFileTypes.CLASS; + return (fileType == StdFileTypes.JAVA || fileType == StdFileTypes.CLASS) && !file.getName().equals("package-info.java"); } }; myPsiManager.setAssertOnFileLoadingFilter(javaFilesFilter); // check repository work diff --git a/dom/impl/src/com/intellij/util/xml/impl/DomFileElementImpl.java b/dom/impl/src/com/intellij/util/xml/impl/DomFileElementImpl.java index c021956123..5ea007a5fe 100644 --- a/dom/impl/src/com/intellij/util/xml/impl/DomFileElementImpl.java +++ b/dom/impl/src/com/intellij/util/xml/impl/DomFileElementImpl.java @@ -177,6 +177,11 @@ public class DomFileElementImpl implements DomFileElement< return getClass(); } + @NotNull + public AbstractDomChildrenDescription getChildDescription() { + throw new UnsupportedOperationException("Method getChildDescription is not yet implemented in " + getClass().getName()); + } + public DomNameStrategy getNameStrategy() { return getRootHandler().getNameStrategy(); } diff --git a/dom/impl/src/com/intellij/util/xml/impl/DomInvocationHandler.java b/dom/impl/src/com/intellij/util/xml/impl/DomInvocationHandler.java index cee2a419a6..af724e3557 100644 --- a/dom/impl/src/com/intellij/util/xml/impl/DomInvocationHandler.java +++ b/dom/impl/src/com/intellij/util/xml/impl/DomInvocationHandler.java @@ -435,7 +435,7 @@ public abstract class DomInvocationHandler { return function.fun(tag); } } + } else { + return Collections.singletonList(namespaceKey); } return Collections.emptyList(); } diff --git a/xml/impl/src/com/intellij/xml/impl/dom/DomElementXmlDescriptor.java b/xml/impl/src/com/intellij/xml/impl/dom/DomElementXmlDescriptor.java index 9feda868d8..715435a0ef 100644 --- a/xml/impl/src/com/intellij/xml/impl/dom/DomElementXmlDescriptor.java +++ b/xml/impl/src/com/intellij/xml/impl/dom/DomElementXmlDescriptor.java @@ -73,18 +73,14 @@ public class DomElementXmlDescriptor implements XmlElementDescriptor { public XmlElementDescriptor getElementDescriptor(final XmlTag childTag) { final DomElement domElement = myManager.getDomElement(childTag); if (domElement == null) return null; + final DomElement parent = domElement.getParent(); if (parent == null) return new DomElementXmlDescriptor(domElement); - final DomGenericInfo domGenericInfo = parent.getGenericInfo(); - DomChildrenDescription description = domGenericInfo.getCollectionChildDescription(childTag.getName()); - - if (description == null) { - description = domGenericInfo.getFixedChildDescription(childTag.getName()); - } - if (description == null) return null; + AbstractDomChildrenDescription description = domElement.getChildDescription(); + if (!(description instanceof DomChildrenDescription)) return null; - return new DomElementXmlDescriptor(description, myManager); + return new DomElementXmlDescriptor((DomChildrenDescription)description, myManager); } public XmlAttributeDescriptor[] getAttributesDescriptors(final @Nullable XmlTag context) { -- 2.11.4.GIT