boolean (@NotNull JavaModuleSystem system, @NotNull PsiElement target, @NotNull PsiElement place) { if (target instanceof PsiClass) return system.isAccessible((PsiClass)target, place); if (target instanceof PsiPackage) return system.isAccessible(((PsiPackage)target).getQualifiedName(), null, place); return true; }