boolean (@NotNull Editor editor, @NotNull PsiFile file, @NotNull DataContext dataContext) { PsiElement element = BaseRefactoringAction.getElementAtCaret(editor, file); return MethodUtils.getJavaMethodFromHeader(element) != null || RefactoringActionContextUtil.isJavaClassHeader(element); }