boolean (@NotNull PsiElement element, @NotNull Editor editor, @NotNull PsiFile file, @NotNull DataContext context, @NotNull String place) { if (ActionPlaces.isPopupPlace(place) || place.equals(ActionPlaces.REFACTORING_QUICKLIST)) { PsiElement caretElement = BaseRefactoringAction.getElementAtCaret(editor, file); PsiClass psiClass = PsiTreeUtil.getParentOfType(caretElement, PsiClass.class, false); return RefactoringActionContextUtil.isJavaClassHeader(caretElement) && RefactoringActionContextUtil.isClassWithExtendsOrImplements(psiClass); } return super.isAvailableOnElementInEditorAndFile(element, editor, file, context, place); }