no self-references in dom (IDEA-79731)
authorpeter <peter@jetbrains.com>
Mon, 16 Jan 2012 12:46:31 +0000 (13:46 +0100)
committerpeter <peter@jetbrains.com>
Mon, 16 Jan 2012 12:48:56 +0000 (13:48 +0100)
xml/dom-impl/src/com/intellij/util/xml/impl/GenericValueReferenceProvider.java

index b9e991d302ed5bdc328ca7c57dc9c6b8d21d0b4d..4040ade8572ab57bf75eb34fc2ff95b52c9c3dce 100644 (file)
@@ -21,11 +21,9 @@ import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.psi.*;
 import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
 import com.intellij.psi.xml.*;
-import com.intellij.util.ArrayUtil;
 import com.intellij.util.ProcessingContext;
 import com.intellij.util.ReflectionCache;
 import com.intellij.util.xml.*;
-import com.intellij.pom.references.PomService;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -88,18 +86,6 @@ public class GenericValueReferenceProvider extends PsiReferenceProvider {
         }
       }
     }
-    // creating "declaration" reference
-    if (references.length == 0) {
-      final NameValue nameValue = domElement.getAnnotation(NameValue.class);
-      if (nameValue != null && nameValue.referencable()) {
-        DomElement parent = domElement.getParent();
-        assert parent != null;
-        final DomTarget target = DomTarget.getTarget(parent);
-        if (target != null) {
-          references = ArrayUtil.append(references, PsiReferenceBase.createSelfReference(psiElement, PomService.convertToPsi(target)), PsiReference.class);
-        }
-      }
-    }
     return references;
   }