GitHub user vherilier opened a pull request:
https://github.com/apache/jmeter/pull/236
Bug 59937: Sub menus addition
JMeter must offer developers to place elements in sub-menus too to improve
the user experience.
It is realised by introducing the "drawer" property into "MenuInfo".
The "MenuFactory" uses this property to place or not the "MenuItem" into a
sub "JMenu".
This property is defined for both JMeter element kinds (Graphical or
BeanInfo).
Like the "menuCategories" do, "subMenuCategories" offers to place an
element into multiple places (root menu and/or one/several submenus).
The definition is made like following:
* Graphical kind:
By Adding the "getSubMenuCategories()" method in the GUI related class and
defining the returned String array:
** "null" or [""]: lets the item in the root of the related category menu.
** ["AAA"]: places the item into the sub menu name "AAA"
** ["AAA", "BBB"]: places the item into the sub menu name "AAA" and into
the sub menu "BBB"
** ["", "AAA"]: places the item into the root of the related category menu
and into sub menu name "AAA".
NB: If the method is missing, it does change nothing. the item remains in
the root of the related category menu.
NB: The sub menu names must be translated by the resources mechanism.
* BeanInfo kind:
By twisting the BeanInfo "shortDescription" property to get the translated
sub menu names. Several places names must be separated by ";":
** property "shortDescription" undefined or set to "": lets the item in the
root of the related category menu.
** "AAA": places the item into the sub menu name "AAA"
** "AAA;BBB: places the item into the sub menu name "AAA" and into the sub
menu "BBB"
** ";AAA": places the item into the root of the related category menu and
into sub menu name "AAA".
Warning: general and specific resources related string must be identical or
different sub menus will appears.
===========================================================
Hope it will helpfull for other developpers, I really need it for my whole
sets of plugins
I've gathered some protocol specific elements to show the efficency of the
mechanism
Up to you to roll them back, gather them differently or change the name
used for the submenus
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vherilier/jmeter sub_menus
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jmeter/pull/236.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #236
----
commit 7c289b94d465fb24ae759fc5395514d17e6c26f4
Author: Vincent Herilier <[email protected]>
Date: 2016-12-02T16:29:18Z
introduce the submenu mechanism coming from the gui ot the beaninfo
definiton
commit d47a53eb14785296ba4fb1e4dc3ab4426b532ed1
Author: Vincent Herilier <[email protected]>
Date: 2016-12-02T16:33:29Z
gather HTTP Protocol related elements
commit e81ff6b992bae3a616e7133492d638133390813f
Author: Vincent Herilier <[email protected]>
Date: 2016-12-02T16:34:51Z
Gather FTP Protocol related elements
commit c6de2317fe459de99d7d0425c29fa1c540ca2073
Author: Vincent Herilier <[email protected]>
Date: 2016-12-02T16:36:39Z
Gather JDBC elements into "Databases"
commit df1c3c23c44b44566a97a546a8a94fef91f7717b
Author: Vincent Herilier <[email protected]>
Date: 2016-12-02T16:38:11Z
Gathers LDAP Protocol related elements
commit e3d4da9c10cfa74fa2fed5860782ac5412a52b10
Author: Vincent Herilier <[email protected]>
Date: 2016-12-02T16:39:00Z
Gathers 'MongoDB' related elements into "Databases" too
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---