Bug 52160 - Don't display TestBeanGui items which are flagged as hidden
Summary: Don't display TestBeanGui items which are flagged as hidden
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.5.1
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 13:48 UTC by stef
Modified: 2011-11-09 18:19 UTC (History)
1 user (show)



Attachments
MenuFactory patch to enable the feature (5.41 KB, application/x-sdlc)
2011-11-09 13:48 UTC, stef
Details
Patch in unified diff format (1.85 KB, patch)
2011-11-09 16:34 UTC, stef
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description stef 2011-11-09 13:48:19 UTC
Created attachment 27912 [details]
MenuFactory patch to enable the feature

In order to hide programmatically a test bean from add menu, it would be nice if jmetter checks the BeanDescriptor hidden flag and not add the item to menu if true.

Find attached the patch to enable the feature, based on trunk r1199633.

Stef
Comment 1 Sebb 2011-11-09 14:18:46 UTC
Could you provide the patch as a unified diff please?

That's the format generated by SVN and Eclipse (and various other tools).
If using Eclipse, please create a project-relative patch, not workspace-relative.
Comment 2 stef 2011-11-09 16:34:25 UTC
Created attachment 27914 [details]
Patch in unified diff format

Here is the patch with unified diff format. It is based on trunk (r1199829)

Stef
Comment 3 Sebb 2011-11-09 18:04:31 UTC
Patch format is better - the diff function now works in Bugzilla.

However, the patch uses path names that don't exist in the JMeter project:

--- C:\JMeter\old\src\org\apache\jmeter\gui\util\MenuFactory.java
+++ C:\JMeter\new\src\org\apache\jmeter\gui\util\MenuFactory.java

I would expect the patch to have a header such as:

Index: src/core/org/apache/jmeter/gui/util/MenuFactory.java
===================================================================
--- src/core/org/apache/jmeter/gui/util/MenuFactory.java	(revision 1199781)
+++ src/core/org/apache/jmeter/gui/util/MenuFactory.java	(working copy)

Note that the file is under src/core/org/..., not src/org/...

Luckily that is relatively easy to fix, but please ensure any future patches are generated relative to the JMeter root directory.

==

I applied a variation of the fix so that GUIs are treated the same as properties within the GUIs.

URL: http://svn.apache.org/viewvc?rev=1199895&view=rev
Log:
Bug 52160 - Don't display TestBeanGui items which are flagged as hidden

Modified:
   jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
   jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TestBeanGUI.java
   jmeter/trunk/xdocs/changes.xml
Comment 4 stef 2011-11-09 18:19:02 UTC
(In reply to comment #3)

Great thanks!
I'll be careful to the diff headers if I'll propose another one.

Stef
Comment 5 The ASF infrastructure team 2022-09-24 20:37:48 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2641