[java, quickfix] Refactor module access checking method and improve module naming. IJ-CR-125003

GitOrigin-RevId: 078deb60a0fbf497020fe73bd99e170171a30381
This commit is contained in:
Aleksey Dobrynin
2024-02-16 11:17:55 +01:00
committed by intellij-monorepo-bot
parent 3d77d84399
commit 1b565a13b9
7 changed files with 36 additions and 25 deletions

View File

@@ -34,11 +34,11 @@ public interface JavaModuleSystemEx extends JavaModuleSystem {
}
@Nullable
default ErrorWithFixes getProblem(@NotNull PsiClass target, @NotNull PsiElement place) {
default ErrorWithFixes checkAccess(@NotNull PsiClass target, @NotNull PsiElement place) {
String packageName = PsiUtil.getPackageName(target);
return packageName != null ? getProblem(packageName, target.getContainingFile(), place) : null;
return packageName != null ? checkAccess(packageName, target.getContainingFile(), place) : null;
}
@Nullable
ErrorWithFixes getProblem(@NotNull String targetPackageName, @Nullable PsiFile targetFile, @NotNull PsiElement place);
ErrorWithFixes checkAccess(@NotNull String targetPackageName, @Nullable PsiFile targetFile, @NotNull PsiElement place);
}