boolean (@NotNull PsiElement element) { if (element instanceof PsiDirectory) { PsiPackage psiPackage = JavaDirectoryService.getInstance().getPackage((PsiDirectory)element); return psiPackage != null && !psiPackage.getQualifiedName().isEmpty(); } return element instanceof PsiClass || element instanceof PsiVariable || element instanceof PsiMethod || element instanceof PsiPackage || element instanceof PsiJavaModule || element instanceof PsiLabeledStatement || ThrowSearchUtil.isSearchable(element) || element instanceof PsiMetaOwner && ((PsiMetaOwner)element).getMetaData() != null; }