hardcoded string literals 'IntellijIdeaRulezzz' replaced by CompletionInitializationC...
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Mon, 29 Nov 2010 13:11:34 +0000 (16:11 +0300)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Mon, 29 Nov 2010 13:11:34 +0000 (16:11 +0300)
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/parser/parsing/statements/typeDefinitions/ReferenceElement.java
plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/completion/CompletionLists.java
plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/impl/references/ModeReference.java

index 6a21c32c075e1ae6244497e8dd13903d49a4ea01..af457856b1f1c0f94dcdcbd094f2196af785f49d 100644 (file)
@@ -16,6 +16,7 @@
 
 package org.jetbrains.plugins.groovy.lang.parser.parsing.statements.typeDefinitions;
 
+import com.intellij.codeInsight.completion.CompletionInitializationContext;
 import com.intellij.lang.PsiBuilder;
 import org.jetbrains.plugins.groovy.lang.parser.GroovyElementTypes;
 import org.jetbrains.plugins.groovy.lang.parser.parsing.types.TypeArguments;
@@ -31,7 +32,7 @@ import static org.jetbrains.plugins.groovy.lang.parser.parsing.statements.typeDe
  */
 
 public class ReferenceElement implements GroovyElementTypes {
-  public static final String DUMMY_IDENTIFIER = "IntellijIdeaRulezzz"; //inserted by completion
+  public static final String DUMMY_IDENTIFIER = CompletionInitializationContext.DUMMY_IDENTIFIER_TRIMMED; //inserted by completion
 
   public enum ReferenceElementResult {
     mayBeType, mustBeType, fail
index d388e26ad821b08c745fc1e3bb5bae6988bf5de0..a0989806e1892e15c9a28da2e2db4312dd250bb1 100644 (file)
@@ -15,6 +15,7 @@
  */
 package org.intellij.lang.xpath.completion;
 
+import com.intellij.codeInsight.completion.CompletionInitializationContext;
 import com.intellij.openapi.util.Comparing;
 import com.intellij.psi.*;
 import com.intellij.psi.util.PsiTreeUtil;
@@ -33,7 +34,7 @@ import javax.xml.namespace.QName;
 import java.util.*;
 
 public class CompletionLists {
-    public static final String INTELLIJ_IDEA_RULEZ = "IntellijIdeaRulezzz";
+    public static final String INTELLIJ_IDEA_RULEZ = CompletionInitializationContext.DUMMY_IDENTIFIER_TRIMMED;
 
     private CompletionLists() {
     }
index 09766ceb6e0412b80ad21baee0848c9cd2b2a1d6..4ac31c06b8d9766c13cb5a12153e9c0987b1301e 100644 (file)
@@ -16,6 +16,7 @@
 
 package org.intellij.lang.xpath.xslt.impl.references;
 
+import com.intellij.codeInsight.completion.CompletionInitializationContext;
 import com.intellij.codeInsight.daemon.EmptyResolveMessageProvider;
 import com.intellij.codeInsight.daemon.QuickFixProvider;
 import com.intellij.codeInsight.daemon.impl.HighlightInfo;
@@ -206,7 +207,7 @@ class ModeReference extends SimpleAttributeReference implements PsiPolyVariantRe
         public boolean matches(XmlTag element) {
             final String s = element.getAttributeValue("mode");
             return myMode != null &&
-                    s != null && s.indexOf("IntellijIdeaRulezzz") == -1 &&
+                    s != null && s.indexOf(CompletionInitializationContext.DUMMY_IDENTIFIER_TRIMMED) == -1 &&
                     super.matches(element);
         }