[jbosstools-commits] JBoss Tools SVN: r39466 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Tue Mar 13 06:43:08 EDT 2012
Author: rob.stryker at jboss.com
Date: 2012-03-13 06:43:07 -0400 (Tue, 13 Mar 2012)
New Revision: 39466
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java
Log:
add a constructor for a default, to ensure undo's work properly.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java 2012-03-13 10:42:37 UTC (rev 39465)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java 2012-03-13 10:43:07 UTC (rev 39466)
@@ -27,6 +27,10 @@
public ServerWorkingCopyPropertyCommand(IServerWorkingCopy wc, String commandName,
Text text, String newVal, String attributeKey, ModifyListener listener) {
+ this(wc, commandName, text, newVal, attributeKey, listener, "");
+ }
+ public ServerWorkingCopyPropertyCommand(IServerWorkingCopy wc, String commandName,
+ Text text, String newVal, String attributeKey, ModifyListener listener, String defaultVal) {
super(wc, commandName);
this.wc = wc;
this.text = text;
@@ -34,7 +38,7 @@
this.newVal = newVal;
this.listener = listener;
if( key != null )
- this.oldVal = wc.getAttribute(attributeKey, ""); //$NON-NLS-1$
+ this.oldVal = wc.getAttribute(attributeKey, defaultVal);
}
public void execute() {
More information about the jbosstools-commits
mailing list