mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
hacky re-fix JavaResolveUtil.isAccessible()
This commit is contained in:
@@ -73,7 +73,7 @@ public class JavaResolveUtil {
|
||||
if (visibility == JavaCodeFragment.VisibilityChecker.Visibility.NOT_VISIBLE) return false;
|
||||
}
|
||||
}
|
||||
else if (placeFile != null && !(placeFile instanceof PsiClassOwner) && !PsiImplUtil.isInServerPage(placeFile)) return true;
|
||||
else if (isAllSeeingPlace(placeFile)) return true;
|
||||
// We don't care about access rights in javadoc
|
||||
if (isInJavaDoc(place)) return true;
|
||||
|
||||
@@ -85,7 +85,7 @@ public class JavaResolveUtil {
|
||||
int effectiveAccessLevel = PsiUtil.getAccessLevel(modifierList);
|
||||
PsiFile file = placeFile == null ? null : FileContextUtil.getContextFile(placeFile); //TODO: implementation method!!!!
|
||||
if (PsiImplUtil.isInServerPage(file) && PsiImplUtil.isInServerPage(member.getContainingFile())) return true;
|
||||
if (placeFile != null && !(placeFile instanceof PsiClassOwner) && !PsiImplUtil.isInServerPage(file)) return true;
|
||||
if (isAllSeeingPlace(file)) return true;
|
||||
if (effectiveAccessLevel == PsiUtil.ACCESS_LEVEL_PUBLIC) {
|
||||
return true;
|
||||
}
|
||||
@@ -142,6 +142,11 @@ public class JavaResolveUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean isAllSeeingPlace(PsiFile placeFile) {
|
||||
// TODO HACK introduce a special API here, don't use FileResolveScopeProvider (which just happens to be implemented by correct files)
|
||||
return placeFile instanceof FileResolveScopeProvider && !PsiImplUtil.isInServerPage(placeFile);
|
||||
}
|
||||
|
||||
public static boolean isInJavaDoc(final PsiElement place) {
|
||||
PsiElement scope = place;
|
||||
while(scope != null){
|
||||
|
||||
Reference in New Issue
Block a user