Bug 250128 - Preference for statically compiled JET templates
Summary: Preference for statically compiled JET templates
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Milen Manov CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords: noteworthy, plan
Depends on: 249347
Blocks: 261778
  Show dependency tree
 
Reported: 2008-10-08 13:05 EDT by Kaloyan Raev CLA
Modified: 2009-02-06 08:41 EST (History)
0 users

See Also:


Attachments
patch (5.96 KB, patch)
2008-12-17 03:53 EST, Milen Manov CLA
no flags Details | Diff
patch with corrected messages (5.86 KB, patch)
2009-01-14 09:43 EST, Milen Manov CLA
no flags Details | Diff
patch with corrections (1.80 KB, patch)
2009-01-20 06:43 EST, Milen Manov CLA
no flags Details | Diff
patch (6.35 KB, patch)
2009-01-21 02:25 EST, Milen Manov CLA
kaloyan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kaloyan Raev CLA 2008-10-08 13:05:43 EDT
The solution in bug 249347 must be exposed as a preference, so users can choose either statically, or dynamically compiled JET templates.
Comment 1 Kaloyan Raev CLA 2008-10-22 04:15:19 EDT
We should think about where to put this property in the UI.
One approach is to create a new top-level "Java EE" preference page. It can be used later for other Java EE related preferences. 

The XDoclet preferences page can be move as a child of this new Java EE preference page. Other candidate is JPA. Link can be created to Web/JSP files and Web/JavaServer Faces Tools. 
Comment 2 Milen Manov CLA 2008-12-17 03:53:07 EST
Created attachment 120668 [details]
patch

I propose the following patch
Comment 3 Kaloyan Raev CLA 2008-12-17 08:06:18 EST
Milen, the patch is good. 

Just some cosmetic changes are needed.
1. Replace all "JEE" strings with "Java EE". If "JEE" occurs in an identifier, then replace it with "JavaEE". 
2. Replace the "JEE preferences page" string with "General settings for Java EE development:". 
3. Replace "Jet templates preferences" with "JET templates". 
4. Give more meaningful names to the "JETTemplatesPreferencesPage_X" NL keys. 
Comment 4 Milen Manov CLA 2009-01-14 09:43:51 EST
Created attachment 122535 [details]
patch with corrected messages

This new patch is changed messages according to Kaloyan's comment.
Comment 5 Kaloyan Raev CLA 2009-01-16 05:33:38 EST
Thank you, Milen. The UI looks much better. 
I have a few more remarks on the code. 

* The "Restore Defaults" button does not work. I guess you should implement performDefaults() in the preference page class. 
* JETTemplatesReferencePage has a typo in the name. But it is event better to rename it to JavaEEPreferencePage. 
* The org.eclipse.jst.j2ee.internal.iu.preference java package should be called org.eclipse.jst.j2ee.internal.iu.preferences. 
* The id of the page in plugin.xml should be "org.eclipse.jst.j2ee.ui.preferencePages.JavaEE". Let's follow the pattern established by the Platform.
* define the NLS constants in j2ee_ui.properties and J2EEUIMessages in the style JAVA_EE_PREFERENCE_PAGE_DESCRIPTION. Avoid curtailments. Use this constants in the preference page class. 
* Avoid the usage of the deprecated Preferences. Replace it with IPreferenceStore or IPreferencesService. 
* Add a spacer between the page description and the JET templates group. Spacer == label with no text. 
Comment 6 Milen Manov CLA 2009-01-20 06:43:56 EST
Created attachment 123065 [details]
patch with corrections

Comment taken in consideration except about the deprecated class
Comment 7 Milen Manov CLA 2009-01-21 02:25:00 EST
Created attachment 123173 [details]
patch

Previous attachment was of a wrong file.
Comment 8 Kaloyan Raev CLA 2009-01-21 05:11:48 EST
Thanks, Milen. The latest patch is committed to HEAD and released to build.