void (@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) { final ScrollingModel scrollingModel = editor.getScrollingModel(); scrollingModel.scrollToCaret(ScrollType.MAKE_VISIBLE); PsiMethod selectedMethod = getSelectedMethod(editor, file); if (selectedMethod == null) { final String message = RefactorJBundle.message("cannot.perform.the.refactoring") + RefactorJBundle.message("the.caret.should.be.positioned.within.a.method.declaration.to.be.refactored"); CommonRefactoringUtil.showErrorHint(project, editor, message, getRefactoringName(), HelpID.IntroduceParameterObject); return; } invoke(project, selectedMethod, editor); }