mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJ-CR-113485 IJ-CR-112205 [java-completion] IDEA-324073 Complete static methods with the first argument as qualifier
- prefiltered private methods GitOrigin-RevId: b911e038dfb9328323414f47ed53e05059c84bd9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6c1d31d1b4
commit
b3dfaa0249
+8
@@ -77,6 +77,10 @@ public class JavaQualifierAsArgumentContributor extends CompletionContributor im
|
||||
@NotNull CompletionResultSet result) {
|
||||
|
||||
PsiElement position = parameters.getPosition();
|
||||
PsiFile file = position.getContainingFile();
|
||||
if (file == null) {
|
||||
return;
|
||||
}
|
||||
GlobalSearchScope scope = position.getResolveScope();
|
||||
Project project = position.getProject();
|
||||
if (project.isDefault()) {
|
||||
@@ -96,6 +100,10 @@ public class JavaQualifierAsArgumentContributor extends CompletionContributor im
|
||||
if (!(member instanceof PsiMethod method && method.hasModifier(JvmModifier.STATIC))) {
|
||||
return true;
|
||||
}
|
||||
PsiFile currentFile = method.getContainingFile();
|
||||
if (method.hasModifier(JvmModifier.PRIVATE) && !file.isEquivalentTo(currentFile)) {
|
||||
return true;
|
||||
}
|
||||
PsiClass containingClass = method.getContainingClass();
|
||||
String methodName = method.getName();
|
||||
if (containingClass == null) {
|
||||
|
||||
Reference in New Issue
Block a user