mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inplace refactoring: if test on invalid identifier, don't get into infinite recursion
This commit is contained in:
+3
@@ -193,6 +193,9 @@ public class VariableInplaceRenamer extends InplaceRefactoring {
|
||||
if (variable != null) {
|
||||
final int offset = variable.getTextOffset();
|
||||
restoreCaretOffset(offset);
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
return;
|
||||
}
|
||||
JBPopupFactory.getInstance()
|
||||
.createConfirmation("Inserted identifier is not valid", "Continue editing", "Cancel",
|
||||
() -> createInplaceRenamerToRestart(variable, myEditor, newName).performInplaceRefactoring(nameSuggestions), 0).showInBestPositionFor(myEditor);
|
||||
|
||||
Reference in New Issue
Block a user