void (@NotNull String newName) { final RenamePsiElementProcessor elementProcessor = RenamePsiElementProcessor.forElement(myPsiElement); elementProcessor.setToSearchInComments(myPsiElement, isSearchInComments()); if (isSearchForTextOccurrencesEnabled()) { elementProcessor.setToSearchForTextOccurrences(myPsiElement, isSearchInNonJavaFiles()); } if (mySuggestedNameInfo != null) { mySuggestedNameInfo.nameChosen(newName); } final RenameProcessor processor = createRenameProcessor(newName); for(Map.Entry<AutomaticRenamerFactory, JCheckBox> e: myAutoRenamerFactories.entrySet()) { e.getKey().setEnabled(e.getValue().isSelected()); if (e.getValue().isSelected()) { processor.addRenamerFactory(e.getKey()); } } invokeRefactoring(processor); }