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