apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.4k stars 2.1k forks source link

Add syntax color for scripts elements (BeanShell, BSF, and JSR223) and JDBC elements with RSyntaxTextArea #3157

Closed asfimport closed 11 years ago

asfimport commented 11 years ago

Marko (Bug 55202): Problem Statement: In my daily work i used BeanShell elements extensively and i find them to be very powerful giving the edge to jmeter over the other test frameworks. However, writing Java or Python code in JTextArea is really painful and error prone (and it can hurt the eyes too).

Proposal: I would like to propose to Jmeter Dev Community to include rsyntaxtextarea-2.0.7.jar library that can do syntax highlighting, code folding, undo typing, and redo typing. The library is published under BSD license and more details can be found here: http://fifesoft.com/rsyntaxtextarea/ The jar file needs to be compiled from source (It is very easy to do. Took me only 5 minutes to compile and add it to jmeter project in eclipse)

Implementation change Proposal: The following is the list of files that i changed to make Syntax Highlighting work: M src/protocol/java/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java M src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java ? src/core/org/apache/jmeter/testbeans/gui/textarea.properties M src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java M src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java M src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java

I also had to add the following in build.properties rsyntaxtextarea.version = 2.0.7 rsyntaxtextarea.jar = rsyntaxtextarea-${rsyntaxtextarea.version}.jar rsyntaxtextarea.md5 = a4bdaabc88ff5464002a43c654bbf856

the following in .classpath <classpathentry kind="lib" path="lib/rsyntaxtextarea-2.0.7.jar"/>

And the following in build.xml <include name="${lib.dir}/${rsyntaxtextarea.jar}"/> </patternset> ... <pathelement location="${lib.dir}/${xstream.jar}"/> <pathelement location="${lib.dir}/${rsyntaxtextarea.jar}"/> ...

Implementation Details TextAreaEditor.java and textarea.properties: Instead of JTextArea, textUI uses RSyntaxTextArea. In order to have numbers for lines i also changes the scroller to RTextScrollPane. To support different languages from BSF and JSR elements new private field languageProperties is added. This field keeps mapping between different languages and syntaxes available in SyntaxConstants interface. Mappings are defined in textarea.properties file Also the TextAreaEditor implements PropertyChangeListener so that propertyChange events can be captured. In summary:

public class TextAreaEditor extends PropertyEditorSupport implements FocusListener, PropertyChangeListener {

private RSyntaxTextArea textUI;

private RTextScrollPane scroller;

private Properties languageProperties;

... private final void init() {// called from ctor, so must not be overridable textUI = new RSyntaxTextArea(20,20); textUI.discardAllEdits(); textUI.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); textUI.setCodeFoldingEnabled(true); textUI.setAntiAliasingEnabled(true); textUI.addFocusListener(this); textUI.setWrapStyleWord(true); textUI.setLineWrap(true); scroller = new RTextScrollPane(textUI); scroller.setFoldIndicatorEnabled(true); languageProperties = JMeterUtils.loadProperties("org/apache/jmeter/testbeans/gui/textarea.properties"); } ... @Override public void propertyChange(PropertyChangeEvent evt){ Object source = evt.getSource(); if (source instanceof ComboStringEditor && source !=null){ ComboStringEditor cse = (ComboStringEditor)source; String lang = cse.getAsText().toLowerCase(); if (languageProperties.containsKey(lang)){ textUI.setSyntaxEditingStyle(languageProperties.getProperty(lang)); } else{ textUI.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_NONE); }

    }
}

Implementation Details BeanShellAssertionGui.java and BeanShellSamplerGui.java This is not a java bean element so direct change was applied:

private RSyntaxTextArea scriptField;// script area
...
private JPanel createScriptPanel() {
    scriptField = new RSyntaxTextArea(20,20);
    scriptField.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
    scriptField.setCodeFoldingEnabled(true);
    scriptField.setAntiAliasingEnabled(true);
    scriptField.setLineWrap(true);
    scriptField.setWrapStyleWord(true);
    ...
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(label, BorderLayout.NORTH);
    panel.add(new RTextScrollPane(scriptField), BorderLayout.CENTER);

Implementation Details GenericTestBeanCustomizer.java Changes made here were necessary to enable Syntax Highlighting changes when different language is selected in ComboBox in BSF and JSR elements.

GenericTestBeanCustomizer(BeanInfo beanInfo) {
    super();
    ...
    // Added in the "for" loop for descriptors
        //Find the index of textAreaEditor
        if (propertyEditor instanceof TextAreaEditor)
        {
            textAreaEditorIndex = i;
        }

        //Figure out the index of scriptLanguage ComboBOx
        if (name.equals("scriptLanguage")){
            scriptLanguageIndex=i;
        }
    ...

    // This is after the for loop. In case of BSF and JSR elements i want to add textAreaEditor as
    // a listener to scriptLanguage ComboBox.
    String beanName = this.beanInfo.getBeanDescriptor().getName();
    if (beanName.startsWith("BSF") || beanName.startsWith("JSR223")){
            WrapperEditor we = (WrapperEditor) editors[scriptLanguageIndex];
            TextAreaEditor tae = (TextAreaEditor) editors[textAreaEditorIndex];
            we.addChangeListener(tae);
    }
    ...

Implementation Details WrapperEditor.java In the GenericTestBeanCustomizer constructor i used e.addChangeListener(tae) to add listener to comboBox. Consequently, WrapperEditor class had to be modified, thus addChangeListener method is added that will do actual listener adding on the guiEditor

public void addChangeListener(PropertyChangeListener listener){
    guiEditor.addPropertyChangeListener(listener);
}

Conclusion I found Syntax Highlighting to significantly improve look and feel of Scripting elements in Jmeter. Especially revording was to find that RSyntaxTextArea has integrated undo/redo. It is available by simply right clicking in the TextArea. Nevertheless, all the changes proposed are cosmetic and up to you to decide if it would be worth changing in Jmeter.

Best Regards

Created attachment BeanShellAssertionGui.java.diff: Patch for BeanShellAssertionGui

BeanShellAssertionGui.java.diff ````diff Index: src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java =================================================================== --- src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java (revision 1496951) +++ src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java (working copy) @@ -32,6 +32,9 @@ import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.testelement.property.BooleanProperty; import org.apache.jmeter.util.JMeterUtils; +import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; +import org.fife.ui.rsyntaxtextarea.SyntaxConstants; +import org.fife.ui.rtextarea.RTextScrollPane; public class BeanShellAssertionGui extends AbstractAssertionGui { @@ -43,7 +46,7 @@ private JTextField parameters;// parameters to pass to script file (or script) - private JTextArea scriptField;// script area + private RSyntaxTextArea scriptField;// script area public BeanShellAssertionGui() { init(); @@ -139,8 +142,10 @@ } private JPanel createScriptPanel() { - scriptField = new JTextArea(); - scriptField.setRows(4); + scriptField = new RSyntaxTextArea(20,20); + scriptField.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); + scriptField.setCodeFoldingEnabled(true); + scriptField.setAntiAliasingEnabled(true); scriptField.setLineWrap(true); scriptField.setWrapStyleWord(true); @@ -149,7 +154,7 @@ JPanel panel = new JPanel(new BorderLayout()); panel.add(label, BorderLayout.NORTH); - panel.add(new JScrollPane(scriptField), BorderLayout.CENTER); + panel.add(new RTextScrollPane(scriptField), BorderLayout.CENTER); JTextArea explain = new JTextArea(JMeterUtils.getResString("bsh_assertion_script_variables")); //$NON-NLS-1$ explain.setLineWrap(true); ````

OS: All

asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment BeanShellSamplerGui.java.diff: Patch for BeanShellSamplerGui.java

BeanShellSamplerGui.java.diff ````diff Index: src/protocol/java/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java =================================================================== --- src/protocol/java/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java (revision 1496951) +++ src/protocol/java/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java (working copy) @@ -33,6 +33,9 @@ import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.testelement.property.BooleanProperty; import org.apache.jmeter.util.JMeterUtils; +import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; +import org.fife.ui.rsyntaxtextarea.SyntaxConstants; +import org.fife.ui.rtextarea.RTextScrollPane; public class BeanShellSamplerGui extends AbstractSamplerGui { @@ -44,7 +47,7 @@ private JTextField parameters;// parameters to pass to script file (or script) - private JTextArea scriptField;// script area + private RSyntaxTextArea scriptField;// script area public BeanShellSamplerGui() { init(); @@ -153,8 +156,9 @@ } private JPanel createScriptPanel() { - scriptField = new JTextArea(); - scriptField.setRows(4); + scriptField = new RSyntaxTextArea(20,20); + scriptField.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); + scriptField.setCodeFoldingEnabled(true); scriptField.setLineWrap(true); scriptField.setWrapStyleWord(true); @@ -163,7 +167,7 @@ JPanel panel = new JPanel(new BorderLayout()); panel.add(label, BorderLayout.NORTH); - panel.add(new JScrollPane(scriptField), BorderLayout.CENTER); + panel.add(new RTextScrollPane(scriptField), BorderLayout.CENTER); JTextArea explain = new JTextArea(JMeterUtils.getResString("bsh_script_variables")); //$NON-NLS-1$ explain.setLineWrap(true); ````
asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment GenericTestBeanCustomizer.java.diff: Patch for GenericTestBeanCusomizer.java

GenericTestBeanCustomizer.java.diff ````diff Index: src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java =================================================================== --- src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java (revision 1496951) +++ src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java (working copy) @@ -21,6 +21,7 @@ import java.awt.GridBagLayout; import java.awt.Insets; import java.beans.BeanInfo; +import java.beans.PropertyChangeListener; import java.beans.PropertyDescriptor; import java.beans.PropertyEditor; import java.beans.PropertyEditorManager; @@ -203,6 +204,8 @@ // Obtain the propertyEditors: editors = new PropertyEditor[descriptors.length]; + int scriptLanguageIndex=0; + int textAreaEditorIndex=0; for (int i = 0; i < descriptors.length; i++) { // Index is also used for accessing editors array PropertyDescriptor descriptor = descriptors[i]; String name = descriptor.getName(); @@ -218,7 +221,7 @@ PropertyEditor propertyEditor; Object guiType = descriptor.getValue(GUITYPE); if (guiType instanceof TypeEditor) { - propertyEditor = ((TypeEditor) guiType).getInstance(descriptor); + propertyEditor = ((TypeEditor) guiType).getInstance(descriptor); } else { Class editorClass = descriptor.getPropertyEditorClass(); if (log.isDebugEnabled()) { @@ -267,6 +270,11 @@ { ((TestBeanPropertyEditor)propertyEditor).setDescriptor(descriptor); } + + if (propertyEditor instanceof TextAreaEditor) + { + textAreaEditorIndex = i; + } if (propertyEditor.getCustomEditor() instanceof JScrollPane) { scrollerCount++; } @@ -275,9 +283,19 @@ // Initialize the editor with the provided default value or null: setEditorValue(i, descriptor.getValue(DEFAULT)); + + if (name.equals("scriptLanguage")){ + scriptLanguageIndex=i; + } } - + // In case of BSF and JSR elements i want to add textAreaEditor as a listener to scriptLanguage ComboBox. + String beanName = this.beanInfo.getBeanDescriptor().getName(); + if (beanName.startsWith("BSF") || beanName.startsWith("JSR223")){ + WrapperEditor we = (WrapperEditor) editors[scriptLanguageIndex]; + TextAreaEditor tae = (TextAreaEditor) editors[textAreaEditorIndex]; + we.addChangeListener(tae); + } // Obtain message formats: propertyFieldLabelMessage = new MessageFormat(JMeterUtils.getResString("property_as_field_label")); //$NON-NLS-1$ propertyToolTipMessage = new MessageFormat(JMeterUtils.getResString("property_tool_tip")); //$NON-NLS-1$ @@ -350,7 +368,7 @@ tags[j++] = additionalTag; } } - + boolean notNull = notNull(descriptor); boolean notExpression = notExpression(descriptor); boolean notOther = notOther(descriptor); @@ -363,7 +381,7 @@ e.setNoUndefined(notNull); e.setNoEdit(notExpression && notOther); e.setTags(tags); - + guiEditor = e; } @@ -372,7 +390,6 @@ !notExpression, // acceptsExpressions !notOther, // acceptsOther descriptor.getValue(DEFAULT)); - return wrapper; } ````
asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment TextAreaEditor.java.diff: Patch for TextAreaEditor.java

TextAreaEditor.java.diff ````diff Index: src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java =================================================================== --- src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java (revision 1496951) +++ src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java (working copy) @@ -24,18 +24,27 @@ import java.awt.Component; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; import java.beans.PropertyEditorSupport; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.ScrollPaneConstants; -public class TextAreaEditor extends PropertyEditorSupport implements FocusListener { +import org.apache.jmeter.util.JMeterUtils; +import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; +import org.fife.ui.rsyntaxtextarea.SyntaxConstants; +import org.fife.ui.rtextarea.RTextScrollPane; - private JTextArea textUI; +import java.util.Locale; +import java.util.Properties;; - private JScrollPane scroller; +public class TextAreaEditor extends PropertyEditorSupport implements FocusListener, PropertyChangeListener { + private RSyntaxTextArea textUI; + + private RTextScrollPane scroller; + + private Properties languageProperties; + /** {@inheritDoc} */ @Override public void focusGained(FocusEvent e) { @@ -45,15 +54,20 @@ @Override public void focusLost(FocusEvent e) { firePropertyChange(); - } + } private final void init() {// called from ctor, so must not be overridable - textUI = new JTextArea(); + textUI = new RSyntaxTextArea(20,20); + textUI.discardAllEdits(); + textUI.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); + textUI.setCodeFoldingEnabled(true); + textUI.setAntiAliasingEnabled(true); textUI.addFocusListener(this); textUI.setWrapStyleWord(true); textUI.setLineWrap(true); - scroller = new JScrollPane(textUI, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, - ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + scroller = new RTextScrollPane(textUI); + scroller.setFoldIndicatorEnabled(true); + languageProperties = JMeterUtils.loadProperties("org/apache/jmeter/testbeans/gui/textarea.properties"); } /** @@ -112,4 +126,20 @@ public boolean supportsCustomEditor() { return true; } + + @Override + public void propertyChange(PropertyChangeEvent evt){ + Object source = evt.getSource(); + if (source instanceof ComboStringEditor && source !=null){ + ComboStringEditor cse = (ComboStringEditor)source; + String lang = cse.getAsText().toLowerCase(); + if (languageProperties.containsKey(lang)){ + textUI.setSyntaxEditingStyle(languageProperties.getProperty(lang)); + } + else{ + textUI.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_NONE); + } + + } + } } ````
asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment WrapperEditor.java.diff: Patch for WrapperEditor.java

WrapperEditor.java.diff ````diff Index: src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java =================================================================== --- src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java (revision 1496951) +++ src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java (working copy) @@ -445,4 +445,8 @@ guiEditor.setAsText(lastValidValue); } } + + public void addChangeListener(PropertyChangeListener listener){ + guiEditor.addPropertyChangeListener(listener); + } } \ No newline at end of file ````
asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment build.properties: build.properties file that includes rsyntaxtextarea.jar

asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment textarea.properties: Mapping between ComboBox elements and Syntaxes

textarea.properties ````properties javascript = text/javascript js = text/javascript jacl = text/tcl netrexx = text/plain java = text/java javaclass = text/java bml = text/xml vbscript = text/vb jscript = text/javascript perlscript = text/perl perl = text/perl jpython = text/python jython = text/python lotusscript = text/vb xslt = text/mxml pnuts = text/java beanbasic = text/java beanshell = text/java bsh = text/unix ruby = text/ruby judoscript = text/plain groovy = text/groovy objectscript = text/javascript prolog = text/plain rexx = text/plain applescript = text/plain ecmascript = text/actionscript jexl = text/java jexl2 = text/java rhino = text/javascript edit = text/unix lua = text/lua php = text/php lisp = text/lisp sql = text/sql````
asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment build.xml.diff: Patch for ant build file to include rsysntaxtextarea.jar

build.xml.diff ````diff Index: build.xml =================================================================== --- build.xml (revision 1496951) +++ build.xml (working copy) @@ -400,6 +400,7 @@ + ````
asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment Screen Shot 2013-07-05 at 2.05.39 PM.png: ScreenShot of Syntax Highlight in jmeter

ScreenShot of Syntax Highlight in jmeter
asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment RSyntaxTextArea.patch: RSyntaxTextArea.patch contains the full patch of all java files

asfimport commented 11 years ago

@milamberspace (migrated from Bugzilla): Thanks for your contribution, seems to be a very cool improvement.

Can you confirm than the file textarea.properties is under Apache License 2 or upload a new version with the AL2 Header, please.

@Sebb, the component RSyntaxTextArea is distributed under a "modified BSD license." See: http://fifesoft.com/rsyntaxtextarea/RSyntaxTextArea.License.txt It's seems be compliant with the AL2, I think.

The only change (compare to BSD license) is :

For memory, the license compliant with AL2 (BSD is included) http://www.apache.org/legal/resolved.html#category-a

== The LICENSE and NOTICE files must modify to include the mention of RSyntaxTextArea's license. (I can do this)

asfimport commented 11 years ago

Sebb (migrated from Bugzilla): (In reply to Milamber from comment 10)

@Sebb, the component RSyntaxTextArea is distributed under a "modified BSD license." See: http://fifesoft.com/rsyntaxtextarea/RSyntaxTextArea.License.txt It's seems be compliant with the AL2, I think.

The only change (compare to BSD license) is :

  • Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

For memory, the license compliant with AL2 (BSD is included) http://www.apache.org/legal/resolved.html#category-a

That seems OK, but IANAL.

== The LICENSE and NOTICE files must modify to include the mention of RSyntaxTextArea's license. (I can do this)

Obviously the new license needs including in LICENSE (or as a separate file linked from it).

Are you sure that the NOTICE file needs updating? It's important not to add anything to NOTICE that is not strictly required. This may need asking on the legal-discuss list.

asfimport commented 11 years ago

Marko (migrated from Bugzilla): I will add the header to the file. No problem. Do you require unit test too? Documentation updates?

asfimport commented 11 years ago

Marko (migrated from Bugzilla): Created attachment textarea.properties: Adding mapping between languages and available syntaxes

textarea.properties ````properties # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # javascript = text/javascript js = text/javascript jacl = text/tcl netrexx = text/plain java = text/java javaclass = text/java bml = text/xml vbscript = text/vb jscript = text/javascript perlscript = text/perl perl = text/perl jpython = text/python jython = text/python lotusscript = text/vb xslt = text/mxml pnuts = text/java beanbasic = text/java beanshell = text/java bsh = text/unix ruby = text/ruby judoscript = text/plain groovy = text/groovy objectscript = text/javascript prolog = text/plain rexx = text/plain applescript = text/plain ecmascript = text/actionscript jexl = text/java jexl2 = text/java rhino = text/javascript edit = text/unix lua = text/lua php = text/php lisp = text/lisp sql = text/sql````
asfimport commented 11 years ago

@milamberspace (migrated from Bugzilla): (In reply to Sebb from comment 11)

(In reply to Milamber from comment 10)

> == > The LICENSE and NOTICE files must modify to include the mention of > RSyntaxTextArea's license. (I can do this)

Obviously the new license needs including in LICENSE (or as a separate file linked from it).

Are you sure that the NOTICE file needs updating?

I prefer, because in Mvnrepository site, the indicated license is LGPL, but perhaps it's a doc's bug. In official site, the license is clearly indicated.

http://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea/2.0.7

It's important not to add anything to NOTICE that is not strictly required. This may need asking on the legal-discuss list.

asfimport commented 11 years ago

@milamberspace (migrated from Bugzilla): (In reply to Marko from comment 12)

I will add the header to the file. No problem. Do you require unit test too? Documentation updates?

Test unit doesn't seems needed because this is only an visual improvement.

In the docs, some screenshots must be update, but I can do this too.

Now It's time for me to test your patch :-)

asfimport commented 11 years ago

Sebb (migrated from Bugzilla): (In reply to Milamber from comment 14)

(In reply to Sebb from comment 11) > (In reply to Milamber from comment 10) >

> Are you sure that the NOTICE file needs updating?

I prefer, because in Mvnrepository site, the indicated license is LGPL, but perhaps it's a doc's bug. In official site, the license is clearly indicated.

That's not sufficient reason to add anything to the NOTICE file.

It looks like the code is built using Ant, not Maven, so maybe it was uploaded by a 3rd party who got the pom wrong.

But clearly we cannot depend on the jar from Maven Central.

http://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea/2.0.7

> It's important not to add anything to NOTICE that is not strictly required. > This may need asking on the legal-discuss list.

asfimport commented 11 years ago

@milamberspace (migrated from Bugzilla):

Thanks. Committed in last trunk. (some changes in your patch: de-tabulation: prefer spaces for indentation, alphabetical order in jars listing, remove unused imports, formatting code)

Docs screenshots to do (tomorrow)

URL: http://svn.apache.org/r1500124 Log: https://github.com/apache/jmeter/issues/3157 - Proposal to add RSyntaxTextArea for BeanShell, BSF, and JSR223 elements https://github.com/apache/jmeter/issues/3157

Added: jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/textarea.properties (with props) Modified: jmeter/trunk/LICENSE jmeter/trunk/build.properties jmeter/trunk/build.xml jmeter/trunk/eclipse.classpath jmeter/trunk/res/maven/ApacheJMeter_parent.pom jmeter/trunk/src/components/org/apache/jmeter/assertions/gui/BeanShellAssertionGui.java jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/GenericTestBeanCustomizer.java jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/WrapperEditor.java jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/control/gui/BeanShellSamplerGui.java jmeter/trunk/xdocs/changes.xml

asfimport commented 11 years ago

@milamberspace (migrated from Bugzilla): URL: http://svn.apache.org/r1500390 Log: Get rsyntaxtextarea jar file from official binary zip https://github.com/apache/jmeter/issues/3157

Modified: jmeter/trunk/build.properties jmeter/trunk/build.xml

asfimport commented 11 years ago

@milamberspace (migrated from Bugzilla): URL: http://svn.apache.org/r1500408 Log: Update docs with new screenshots https://github.com/apache/jmeter/issues/3157

Added: jmeter/trunk/docs/images/screenshots/beanshell_assertion.png (with props) jmeter/trunk/xdocs/images/screenshots/beanshell_assertion.png (with props) Modified: jmeter/trunk/docs/images/screenshots/beanshell_listener.png jmeter/trunk/docs/images/screenshots/beanshell_postprocessor.png jmeter/trunk/docs/images/screenshots/beanshell_preprocessor.png jmeter/trunk/docs/images/screenshots/beanshellsampler.png jmeter/trunk/docs/images/screenshots/bsf_assertion.png jmeter/trunk/docs/images/screenshots/bsf_listener.png jmeter/trunk/docs/images/screenshots/bsf_postprocessor.png jmeter/trunk/docs/images/screenshots/bsf_preprocessor.png jmeter/trunk/docs/images/screenshots/bsfsampler.png jmeter/trunk/docs/images/screenshots/bsh_assertion.png jmeter/trunk/docs/images/screenshots/jsr223-sampler.png jmeter/trunk/docs/images/screenshots/mongodb-script.png jmeter/trunk/docs/images/screenshots/timers/beanshell_timer.png jmeter/trunk/docs/images/screenshots/timers/bsf_timer.png jmeter/trunk/xdocs/images/screenshots/beanshell_listener.png jmeter/trunk/xdocs/images/screenshots/beanshell_postprocessor.png jmeter/trunk/xdocs/images/screenshots/beanshell_preprocessor.png jmeter/trunk/xdocs/images/screenshots/beanshellsampler.png jmeter/trunk/xdocs/images/screenshots/bsf_assertion.png jmeter/trunk/xdocs/images/screenshots/bsf_listener.png jmeter/trunk/xdocs/images/screenshots/bsf_postprocessor.png jmeter/trunk/xdocs/images/screenshots/bsf_preprocessor.png jmeter/trunk/xdocs/images/screenshots/bsfsampler.png jmeter/trunk/xdocs/images/screenshots/bsh_assertion.png jmeter/trunk/xdocs/images/screenshots/jsr223-sampler.png jmeter/trunk/xdocs/images/screenshots/mongodb-script.png jmeter/trunk/xdocs/images/screenshots/timers/beanshell_timer.png jmeter/trunk/xdocs/images/screenshots/timers/bsf_timer.png jmeter/trunk/xdocs/usermanual/component_reference.xml

asfimport commented 11 years ago

@milamberspace (migrated from Bugzilla):

Seems everything is ok. I close it.

asfimport commented 11 years ago

@pmouawad (migrated from Bugzilla): Thanks. Great feature. There is still a little one, in JDBC Sampler syntax highlight is done on Java not SQL.

asfimport commented 11 years ago

Sebb (migrated from Bugzilla): URL: http://svn.apache.org/r1501306 Log: Add syntax color for scripts elements (BeanShell, BSF, and JSR223) with RSyntaxTextArea JDBC now uses SQL language format https://github.com/apache/jmeter/issues/3157

Modified: jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TextAreaEditor.java jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/JDBCTestElementBeanInfoSupport.java

asfimport commented 11 years ago

@pmouawad (migrated from Bugzilla): Date: Thu Sep 26 06:44:29 2013 New Revision: 1526398

URL: http://svn.apache.org/r1526398 Log: https://github.com/apache/jmeter/issues/3157 - Add syntax color for scripts elements (BeanShell, BSF, and JSR223) and JDBC elements with RSyntaxTextArea Add missing configuration properties in jmeter.properties https://github.com/apache/jmeter/issues/3157

Modified: jmeter/trunk/bin/jmeter.properties

Date: Thu Sep 26 06:46:36 2013 New Revision: 1526400

URL: http://svn.apache.org/r1526400 Log: https://github.com/apache/jmeter/issues/3157 - Add syntax color for scripts elements (BeanShell, BSF, and JSR223) and JDBC elements with RSyntaxTextArea Add a way to disable undo feature in JSyntaxtTextArea, thanks Robert Futrell https://github.com/apache/jmeter/issues/3157

Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/core/org/apache/jmeter/gui/util/JSyntaxTextArea.java

asfimport commented 11 years ago

@pmouawad (migrated from Bugzilla): Date: Thu Sep 26 19:39:31 2013 New Revision: 1526656

URL: http://svn.apache.org/r1526656 Log: https://github.com/apache/jmeter/issues/3157 - Add syntax color for scripts elements (BeanShell, BSF, and JSR223) and JDBC elements with RSyntaxTextArea Fixed bad configuration https://github.com/apache/jmeter/issues/3157

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JSyntaxTextArea.java