Bug 57561 - Module controller UI : Replace combobox by tree
Summary: Module controller UI : Replace combobox by tree
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.12
Hardware: All All
: P2 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2015-02-10 20:38 UTC by maciej.franek
Modified: 2015-12-29 15:25 UTC (History)
1 user (show)



Attachments
Module Controller with JTree (12.78 KB, text/x-java)
2015-02-10 20:38 UTC, maciej.franek
Details
Improved verstion of ModuleControllerGui (15.28 KB, patch)
2015-02-16 21:01 UTC, maciej.franek
Details | Diff
Module controller with automatic name change (10.13 KB, patch)
2015-05-02 15:11 UTC, maciej.franek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description maciej.franek 2015-02-10 20:38:55 UTC
Created attachment 32447 [details]
Module Controller with JTree

I found very hard selecting controllers from a provided combo box in Module Controller UI. Especially for larger test plans.

Please consider rewritten UI with JTree instead of JComboBox, It is available in an attachement (ModuleControllerGui.java)

For that implementation, selecting of a module is done by selecting element of a tree. Element name is changed to a referenced module name with "[MC]" prefix
Expand button also is slightly changed, after pushing it, test plan is expanded and focus is set to referenced module.
Comment 1 Philippe Mouawad 2015-02-15 14:12:46 UTC
Hi,
Thanks for contribution.
I find it clearly much better than current behaviour.
Few notes:
- I don't think you should change element name to [MC]
- Methods should have minimum javadocs

Thanks.
Regards
Comment 2 maciej.franek 2015-02-16 21:01:26 UTC
Created attachment 32483 [details]
Improved verstion of ModuleControllerGui

- removed [MC] prefix
- added javadoc and some comments
Comment 3 Philippe Mouawad 2015-02-17 21:59:52 UTC
Date: Tue Feb 17 21:59:29 2015
New Revision: 1660514

URL: http://svn.apache.org/r1660514
Log:
Bug 57561 - Module controller UI : Replace combobox by tree
Bugzilla Id: 57561

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java
    jmeter/trunk/xdocs/changes.xml
Comment 4 Philippe Mouawad 2015-02-17 22:01:47 UTC
Hi,
Thanks a lot for your contribution and update.
I commited it with few changes:
- Removed the code that changes element name depending on selection as it might be annoying when you don't want this and it's a new behaviour
- Made internal class static
- Used more meaningful names for some fields

Your tests on nightly builds are welcome.
Regards
Comment 5 maciej.franek 2015-02-18 07:54:43 UTC
Changes are ok to me except:

- Removed the code that changes element name depending on selection as it might be annoying when you don't want this and it's a new behaviour

In my personal opinion it could be configured as a property in jmeter.properties. By default name is not changed, but it is possible to configure automatic change in jmeter.properties

What do you think about that?

I use JMeter a lot and Module Controller also, and I found it very convinient that name of Module Controller is automatically changed to a referenced module. When the name was not automatically changed I had a lot of elements named Module Controller and there was quite a lot of write/copy/paste/etc. work to name module controller elements (as almost always I changed it to a referenced element name)

Many thanks
Comment 6 UbikLoadPack support 2015-02-19 10:47:46 UTC
Hi,
What about instead of a new global property , add a checkbox that would be component property in GUI to enable or disable this behaviour ?

Regards
@ubikloadpack
Comment 7 maciej.franek 2015-02-20 08:52:35 UTC
Hi,

Ok for me, but still I would add global property to define if this checkbox is enabled/disabled by default

Regards,
Maciej Franek
Comment 8 UbikLoadPack support 2015-02-20 10:09:31 UTC
(In reply to maciej.franek from comment #7)
> Hi,
> 
> Ok for me, but still I would add global property to define if this checkbox
> is enabled/disabled by default
> 
> Regards,
> Maciej Franek

I suggest you discuss this on dev mailing list so that all team developers give their opinion to see if your patch would be accepted.
Comment 9 maciej.franek 2015-05-02 15:10:34 UTC
After discussing on dev mailing list I`ve prepared new version of Module Controller UI that contains two new fields:

1. Checkbox - enables/disables automatic name change. By default it is disabled. Default value is configurable in jmeter.properties
2. Text field for prefix automatic naming. By default it is empty. Also configurable in jmeter.properties

I`m attaching patch containing changes.

Many thanks,
Maciej Franek
Comment 10 maciej.franek 2015-05-02 15:11:53 UTC
Created attachment 32712 [details]
Module controller with automatic name change
Comment 11 UbikLoadPack support 2015-12-29 15:25:22 UTC
Bug fixed in 2.13.
A new Bug 58780 was created as followup of automatic name change.