since classes from migrations are now included in myPublicClassNamesCache, there...
authorDmitry Jemerov <yole@jetbrains.com>
Mon, 3 Oct 2011 17:59:06 +0000 (19:59 +0200)
committerDmitry Jemerov <yole@jetbrains.com>
Tue, 4 Oct 2011 14:03:50 +0000 (16:03 +0200)
java/java-impl/src/com/intellij/psi/impl/file/PsiPackageImpl.java

index cbdec7302ebbe71627775766b9c2f139aa693f26..dbcc311de0c7938eb6450b9973b18ae4e8a846a2 100644 (file)
@@ -39,8 +39,6 @@ import com.intellij.psi.*;
 import com.intellij.psi.impl.JavaPsiFacadeImpl;
 import com.intellij.psi.impl.PackagePrefixElementFinder;
 import com.intellij.psi.impl.PsiManagerEx;
-import com.intellij.psi.impl.migration.PsiMigrationImpl;
-import com.intellij.psi.impl.migration.PsiMigrationManager;
 import com.intellij.psi.impl.source.tree.java.PsiCompositeModifierList;
 import com.intellij.psi.scope.ElementClassHint;
 import com.intellij.psi.scope.NameHint;
@@ -276,18 +274,15 @@ public class PsiPackageImpl extends PsiPackageBase implements PsiPackage, Querya
     ElementClassHint classHint = processor.getHint(ElementClassHint.KEY);
 
     final JavaPsiFacadeImpl facade = getFacade();
-    final PsiMigrationImpl migration = PsiMigrationManager.getInstance(getProject()).getCurrentMigration();
-
     final Condition<String> prefixMatcher = processor.getHint(JavaCompletionHints.NAME_FILTER);
 
     if (classHint == null || classHint.shouldProcess(ElementClassHint.DeclarationKind.CLASS)) {
       NameHint nameHint = processor.getHint(NameHint.KEY);
       if (nameHint != null) {
         final String shortName = nameHint.getName(state);
-        if ((migration != null || containsClassNamed(shortName))
-            && processClassesByName(processor, state, place, scope, shortName)) return false;
+        if (containsClassNamed(shortName) && processClassesByName(processor, state, place, scope, shortName)) return false;
       }
-      else if (prefixMatcher != null && migration == null) {
+      else if (prefixMatcher != null) {
         for (String className : getClassNamesCache()) {
           if (prefixMatcher.value(className)) {
             if (processClassesByName(processor, state, place, scope, className)) return false;