IDEADEV-33934

This commit is contained in:
Dmitry Avdeev
2009-01-14 13:46:28 +03:00
parent a967d4a915
commit cc397a4a7c
@@ -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);
}
});
}
}
}
}