mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't suggest non-imported Arrays
This commit is contained in:
+2
-7
@@ -270,16 +270,11 @@ public class JavaCompletionContributor extends CompletionContributor {
|
||||
|
||||
final boolean isSwitchLabel = SWITCH_LABEL.accepts(position);
|
||||
final PsiFile originalFile = parameters.getOriginalFile();
|
||||
Set<LookupElement> set = JavaCompletionUtil.processJavaReference(position,
|
||||
for (LookupElement element : JavaCompletionUtil.processJavaReference(position,
|
||||
(PsiJavaReference)reference,
|
||||
new ElementExtractorFilter(filter),
|
||||
checkAccess,
|
||||
result.getPrefixMatcher(), parameters);
|
||||
PsiClass arrays = JavaPsiFacade.getInstance(position.getProject()).findClass(CommonClassNames.JAVA_UTIL_ARRAYS, position.getResolveScope());
|
||||
if (arrays != null && filter.isAcceptable(arrays, position) && isClassNamePossible(parameters.getPosition())) {
|
||||
set.add(JavaClassNameCompletionContributor.createClassLookupItem(arrays, true));
|
||||
}
|
||||
for (LookupElement element : set) {
|
||||
result.getPrefixMatcher(), parameters)) {
|
||||
if (inheritors.alreadyProcessed(element)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
+3
-2
@@ -934,8 +934,9 @@ public class Bar {
|
||||
|
||||
public void testArrays() {
|
||||
myFixture.configureByText "a.java", "class Foo {{ <caret> }}"
|
||||
type 'Arrays'
|
||||
assert myFixture.lookupElementStrings == ['Arrays', 'ArrayStoreException']
|
||||
type 'Arrays.'
|
||||
myFixture.checkResult "class Foo {{ Arrays.<caret> }}"
|
||||
assert !lookup
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user