boolean (@NotNull PsiElement element) { element = JavaDirectoryService.getInstance().getPackage(((PsiDirectory)element)); if (element == null) return false; return JavaRefactoringSettings.getInstance().RENAME_SEARCH_FOR_TEXT_FOR_PACKAGE; }