mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEADEV-33934
This commit is contained in:
+10
-7
@@ -156,13 +156,16 @@ public class VariableInplaceRenamer {
|
||||
finish();
|
||||
|
||||
if (snapshot != null) {
|
||||
final String newName = templateState.getVariableValue(PRIMARY_VARIABLE_NAME).toString();
|
||||
if (JavaPsiFacade.getInstance(myProject).getNameHelper().isIdentifier(newName)) {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
public void run() {
|
||||
snapshot.apply(newName);
|
||||
}
|
||||
});
|
||||
TextResult value = templateState.getVariableValue(PRIMARY_VARIABLE_NAME);
|
||||
if (value != null) {
|
||||
final String newName = value.toString();
|
||||
if (JavaPsiFacade.getInstance(myProject).getNameHelper().isIdentifier(newName)) {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
public void run() {
|
||||
snapshot.apply(newName);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user