void (@NotNull final Project project, final PsiElement @NotNull [] elements, final DataContext dataContext) { PsiElement element = elements.length == 1 ? elements[0] : null; if (element == null) element = PsiElementRenameHandler.getElement(dataContext); final PsiElement nameSuggestionContext = element; element = adjustForRename(dataContext, element); LOG.assertTrue(element != null); Editor editor = CommonDataKeys.EDITOR.getData(dataContext); doRename(element, project, nameSuggestionContext, editor); }