From d4b80455565cadceee068f18caacd7a0ecb7a689 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Thu, 11 Jun 2015 15:51:34 +0300 Subject: [PATCH] resource bundles: undo after NewPropertyAction fixed --- .../intellij/lang/properties/editor/NewPropertyAction.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/properties/src/com/intellij/lang/properties/editor/NewPropertyAction.java b/plugins/properties/src/com/intellij/lang/properties/editor/NewPropertyAction.java index 80d8be9974cb..4bad9e837f41 100644 --- a/plugins/properties/src/com/intellij/lang/properties/editor/NewPropertyAction.java +++ b/plugins/properties/src/com/intellij/lang/properties/editor/NewPropertyAction.java @@ -22,7 +22,7 @@ import com.intellij.lang.properties.psi.PropertiesFile; import com.intellij.lang.properties.structureView.PropertiesPrefixGroup; import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.application.ApplicationManager; -import com.intellij.openapi.command.CommandProcessor; +import com.intellij.openapi.command.WriteCommandAction; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.fileEditor.FileEditor; import com.intellij.openapi.fileEditor.FileEditorManager; @@ -148,11 +148,10 @@ class NewPropertyAction extends AnAction { } } - final PropertiesFile defaultPropertiesFile = resourceBundle.getDefaultPropertiesFile(); ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override public void run() { - CommandProcessor.getInstance().runUndoTransparentAction(new Runnable() { + WriteCommandAction.runWriteCommandAction(resourceBundle.getProject(), new Runnable() { @Override public void run() { myResourceBundleEditor.getPropertiesInsertDeleteManager().insertNewProperty(newPropertyName, "");