void (@NotNull final Project project, PsiElement @NotNull [] elements, DataContext dataContext) { if(elements.length != 1 || !(elements[0] instanceof PsiTypeParameterListOwner member)) return; if (!CommonRefactoringUtil.checkReadOnlyStatus(project, member)) return; String error = validateTarget(member); if (error != null) { Editor editor = CommonDataKeys.EDITOR.getData(dataContext); CommonRefactoringUtil.showErrorHint(project, editor, error, getRefactoringName(), HelpID.MAKE_METHOD_STATIC); return; } invoke(member); }