Bug 287452 - [hotbug] Make Java EE Module Dependencies page optional
Summary: [hotbug] Make Java EE Module Dependencies page optional
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P1 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-24 12:18 EDT by Rob Stryker CLA
Modified: 2009-09-03 14:44 EDT (History)
4 users (show)

See Also:
ccc: pmc_approved? (david_williams)
ccc: pmc_approved? (raghunathan.srinivasan)
ccc: pmc_approved? (naci.dai)
deboer: pmc_approved+
ccc: pmc_approved? (neil.hauge)
kaloyan: pmc_approved+
cbridgha: review+


Attachments
Add a preference and a PropertyTester (5.11 KB, patch)
2009-08-27 09:51 EDT, Carl Anderson CLA
no flags Details | Diff
Add a product preference, too (7.92 KB, patch)
2009-08-28 15:15 EDT, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Stryker CLA 2009-08-24 12:18:42 EDT
RedHat, an adopter of WTP, needs a way to hide/disable the Java EE Module Dependencies Properties page, such as a product preference. 

=]
Comment 1 Carl Anderson CLA 2009-08-26 08:49:57 EDT
This bug is quite important to that adopter.  I'll do the initial investigation.
Comment 2 Carl Anderson CLA 2009-08-27 09:51:42 EDT
Created attachment 145789 [details]
Add a preference and a PropertyTester

I added a J2EEPreference called showJavaEEModuleDependencyPage. If this is set to anything besides true (as per Boolean.parseBoolean()), the Java EE Module Dependency page will not appear in any project's properties.

Please note that the J2EEPreferencePropertyTester is an extremely generic and flexible class that can be used to test the boolean value of any J2EEPreference, and can thus key enablement of various sections of code, both via code and via injection into the plugin.xml (as in this case).
Comment 3 Carl Anderson CLA 2009-08-27 09:52:26 EDT
Accepting this as a hotbug.
Comment 4 Carl Anderson CLA 2009-08-28 15:15:26 EDT
Created attachment 145977 [details]
Add a product preference, too
Comment 5 Rob Stryker CLA 2009-08-28 16:35:35 EDT
It seems the product setting is only used as the default value and that this can be overridden via API and setting the preference directly? (IE some other setting page which could change the preference and re-enable the page)  If that's the case, this is a great patch. Flexible and satisfies all usecases. 
Comment 6 Chuck Bridgham CLA 2009-09-01 10:29:23 EDT
Patches look good.

Yes Carl did a good job looking to the future for other applications of this solution
Comment 7 Carl Anderson CLA 2009-09-01 12:01:54 EDT
This is a hotbug.  There is no workaround.
I ran the entire jeetools JUnit suite against it.  I also tested this by hand, using both the default and a mocked up product preference usage.  No test case nor JUnit have been added.
Simply put, a product preference has been added that allows adopters to prevent the Java EE Module Dependencies page from showing.  The default for this product preference is to show the Java EE Module Dependencies page.
Chuck Bridgham has reviewed this fix.
This is a low risk fix- only the Java EE Module Dependencies preference page is effected by this change.  (And the change will have no effect on a default WTP set up.)
Comment 8 Tim deBoer CLA 2009-09-01 13:49:12 EDT
Approving. In the future, please use the PMC approval template to speed approval.
Comment 9 Carl Anderson CLA 2009-09-01 15:33:54 EDT
Committed to R3_1_maintenance for 3.1.1 and HEAD for WTP 3.2.
(Note that if bug 277482 is finished, that will replace the Java EE Module Dependencies page in 3.2, and part of this will be removed.)