jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1527098 - in /jmeter/trunk/src: components/org/apache/jmeter/assertions/gui/ core/org/apache/jmeter/config/gui/ core/org/apache/jmeter/gui/util/ core/org/apache/jmeter/testbeans/gui/
Date Fri, 27 Sep 2013 22:05:35 GMT
Author: pmouawad
Date: Fri Sep 27 22:05:34 2013
New Revision: 1527098

URL: http://svn.apache.org/r1527098
Log:
Bug 55600 - JSyntaxTextArea : Strange behaviour on first undo
Bugzilla Id: 55600

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java
    jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/JSyntaxTextArea.java
    jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java?rev=1527098&r1=1527097&r2=1527098&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java
Fri Sep 27 22:05:34 2013
@@ -52,7 +52,7 @@ public class BeanShellAssertionGui exten
 
     @Override
     public void configure(TestElement element) {
-        scriptField.setText(element.getPropertyAsString(BeanShellAssertion.SCRIPT));
+        scriptField.setInitialText(element.getPropertyAsString(BeanShellAssertion.SCRIPT));
         scriptField.setCaretPosition(0);
         filename.setText(element.getPropertyAsString(BeanShellAssertion.FILENAME));
         parameters.setText(element.getPropertyAsString(BeanShellAssertion.PARAMETERS));
@@ -164,7 +164,7 @@ public class BeanShellAssertionGui exten
         super.clearGui();
         filename.setText(""); // $NON-NLS-1$
         parameters.setText(""); // $NON-NLS-1$
-        scriptField.setText(""); // $NON-NLS-1$
+        scriptField.setInitialText(""); // $NON-NLS-1$
         resetInterpreter.setSelected(false);
     }
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java?rev=1527098&r1=1527097&r2=1527098&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java Fri Sep 27 22:05:34
2013
@@ -224,7 +224,7 @@ public class RowDetailDialog extends JDi
      */
     private void setValues(int selectedRow) {
         nameTF.setText((String)tableModel.getValueAt(selectedRow, 0));
-        valueTA.setText((String)tableModel.getValueAt(selectedRow, 1));
+        valueTA.setInitialText((String)tableModel.getValueAt(selectedRow, 1));
         valueTA.setCaretPosition(0);
         textChanged = false;
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JSyntaxTextArea.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JSyntaxTextArea.java?rev=1527098&r1=1527097&r2=1527098&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/JSyntaxTextArea.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/JSyntaxTextArea.java Fri Sep 27 22:05:34
2013
@@ -90,4 +90,12 @@ public class JSyntaxTextArea extends RSy
         return undoManager;
     }
 
+    /**
+     * Sets initial text resetting undo history
+     * @param string
+     */
+	public void setInitialText(String string) {
+		setText(string);
+		discardAllEdits();
+	}
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java?rev=1527098&r1=1527097&r2=1527098&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java Fri Sep 27 22:05:34
2013
@@ -101,7 +101,7 @@ public class TextAreaEditor extends Prop
     /** {@inheritDoc} */
     @Override
     public void setAsText(String text) throws IllegalArgumentException {
-        textUI.setText(text);
+        textUI.setInitialText(text);
         textUI.setCaretPosition(0);
     }
 
@@ -109,10 +109,10 @@ public class TextAreaEditor extends Prop
     @Override
     public void setValue(Object value) {
         if (value != null) {
-            textUI.setText(value.toString());
+            textUI.setInitialText(value.toString());
             textUI.setCaretPosition(0);
         } else {
-            textUI.setText("");
+            textUI.setInitialText("");
         }
     }
 



Mime
View raw message