mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
IDEA-124772 Code completion in import statement: suggestion shows package from "java.lang", but when it's selected "java.lang" prefix isn't
This commit is contained in:
@@ -220,8 +220,14 @@ public class JavaCompletionProcessor extends BaseScopeProcessor implements Eleme
|
||||
return true;
|
||||
}
|
||||
|
||||
if (element instanceof PsiPackage && myScope instanceof PsiClass && !isQualifiedContext()) {
|
||||
return true;
|
||||
if (element instanceof PsiPackage && !isQualifiedContext()) {
|
||||
if (myScope instanceof PsiClass) {
|
||||
return true;
|
||||
}
|
||||
if (((PsiPackage)element).getQualifiedName().contains(".") &&
|
||||
PsiTreeUtil.getParentOfType(myElement, PsiImportStatementBase.class) != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (element instanceof PsiMethod) {
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import ann<caret>
|
||||
|
||||
|
||||
@@ -1456,4 +1456,6 @@ class Bar {
|
||||
doTest()
|
||||
}
|
||||
|
||||
public void testNoJavaLangPackagesInImport() { doAntiTest() }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user