boolean (@NotNull PsiPackage psiPackage) { final Module module = ModuleUtilCore.findModuleForPsiElement(psiPackage); if (module != null) { final Sdk sdk = ModuleRootManager.getInstance(module).getSdk(); if (sdk != null && sdk.getSdkType() instanceof JavaSdkType) { return true; } } return false; }