one more key moved to JavaStubIndexKeys
authorDmitry Jemerov <yole@jetbrains.com>
Thu, 22 Sep 2011 15:57:19 +0000 (17:57 +0200)
committerDmitry Jemerov <yole@jetbrains.com>
Thu, 22 Sep 2011 17:31:33 +0000 (19:31 +0200)
java/java-impl/src/com/intellij/psi/impl/java/stubs/JavaFieldStubElementType.java
java/java-impl/src/com/intellij/psi/impl/java/stubs/index/JavaFieldNameIndex.java
java/java-impl/src/com/intellij/psi/impl/java/stubs/index/JavaStubIndexKeys.java

index 01a4eb2b26a6cc5208320510e2c182388f50121b..b2d0c9ba19c883ee2faed7c0a8ad8497b84d8d45 100644 (file)
@@ -25,7 +25,7 @@ import com.intellij.psi.impl.cache.TypeInfo;
 import com.intellij.psi.impl.compiled.ClsEnumConstantImpl;
 import com.intellij.psi.impl.compiled.ClsFieldImpl;
 import com.intellij.psi.impl.java.stubs.impl.PsiFieldStubImpl;
-import com.intellij.psi.impl.java.stubs.index.JavaFieldNameIndex;
+import com.intellij.psi.impl.java.stubs.index.JavaStubIndexKeys;
 import com.intellij.psi.impl.source.PsiEnumConstantImpl;
 import com.intellij.psi.impl.source.PsiFieldImpl;
 import com.intellij.psi.impl.source.tree.ElementType;
@@ -140,7 +140,7 @@ public abstract class JavaFieldStubElementType extends JavaStubElementType<PsiFi
   public void indexStub(final PsiFieldStub stub, final IndexSink sink) {
     final String name = stub.getName();
     if (name != null) {
-      sink.occurrence(JavaFieldNameIndex.KEY, name);
+      sink.occurrence(JavaStubIndexKeys.FIELDS, name);
     }
   }
 
index d88f4c854411e256202ee5130433bd2b26403b93..231d9d21865fdebaeddd408a33ac56d603db451d 100644 (file)
@@ -29,7 +29,6 @@ import com.intellij.psi.stubs.StubIndexKey;
 import java.util.Collection;
 
 public class JavaFieldNameIndex extends StringStubIndexExtension<PsiField> {
-  public static final StubIndexKey<String,PsiField> KEY = StubIndexKey.createIndexKey("java.field.name");
 
   private static final JavaFieldNameIndex ourInstance = new JavaFieldNameIndex();
   public static JavaFieldNameIndex getInstance() {
@@ -37,7 +36,7 @@ public class JavaFieldNameIndex extends StringStubIndexExtension<PsiField> {
   }
 
   public StubIndexKey<String, PsiField> getKey() {
-    return KEY;
+    return JavaStubIndexKeys.FIELDS;
   }
 
   public Collection<PsiField> get(final String s, final Project project, final GlobalSearchScope scope) {
index 293e67cdac3be4d3819a5c27a7697e9551d69185..b5a612dca16864a63020a0bf889e65b01d94032a 100644 (file)
@@ -16,6 +16,7 @@
 package com.intellij.psi.impl.java.stubs.index;
 
 import com.intellij.psi.PsiAnnotation;
+import com.intellij.psi.PsiField;
 import com.intellij.psi.PsiReferenceList;
 import com.intellij.psi.stubs.StubIndexKey;
 
@@ -23,8 +24,9 @@ import com.intellij.psi.stubs.StubIndexKey;
  * @author yole
  */
 public class JavaStubIndexKeys {
-  public static final StubIndexKey<String,PsiAnnotation> ANNOTATIONS = StubIndexKey.createIndexKey("java.annotations");
+  public static final StubIndexKey<String, PsiAnnotation> ANNOTATIONS = StubIndexKey.createIndexKey("java.annotations");
   public static final StubIndexKey<String, PsiReferenceList> SUPER_CLASSES = StubIndexKey.createIndexKey("java.class.extlist");
+  public static final StubIndexKey<String, PsiField> FIELDS = StubIndexKey.createIndexKey("java.field.name");
 
   private JavaStubIndexKeys() {
   }