void (@NotNull PsiElement element, final boolean enabled) { element = JavaDirectoryService.getInstance().getPackage(((PsiDirectory)element)); if (element != null) { JavaRefactoringSettings.getInstance().RENAME_SEARCH_FOR_TEXT_FOR_PACKAGE = enabled; } }