void (@NotNull final Project project, final Editor editor, final PsiFile file, final DataContext dataContext) { PsiElement element = adjustForRename(dataContext, PsiElementRenameHandler.getElement(dataContext)); editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE); final PsiElement nameSuggestionContext = file.findElementAt(editor.getCaretModel().getOffset()); doRename(element, project, nameSuggestionContext, editor); }