mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
a more scala-friendly source-level accessibility check
This commit is contained in:
@@ -903,9 +903,12 @@ public class JavaCompletionUtil {
|
||||
}
|
||||
|
||||
if (pkgContext) {
|
||||
PsiFile classFile = psiClass.getContainingFile();
|
||||
if (classFile instanceof PsiClassOwner && StringUtil.isEmpty(((PsiClassOwner)classFile).getPackageName())) {
|
||||
return false;
|
||||
PsiClass topLevel = PsiUtil.getTopLevelClass(psiClass);
|
||||
if (topLevel != null) {
|
||||
String fqName = topLevel.getQualifiedName();
|
||||
if (fqName != null && StringUtil.isEmpty(StringUtil.getPackageName(fqName))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user