Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314191 - [NLS] Several issues found in 'New Reference Wizard' in 'Deployment Assembly' preference page
Summary: [NLS] Several issues found in 'New Reference Wizard' in 'Deployment Assembly'...
Status: CLOSED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: Aidyl Kareh CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 00:07 EDT by Aidyl Kareh CLA
Modified: 2010-05-27 17:36 EDT (History)
6 users (show)

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


Attachments
Patch (28.59 KB, patch)
2010-05-25 00:14 EDT, Aidyl Kareh CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aidyl Kareh CLA 2010-05-25 00:07:28 EDT
Build Identifier: WTP 3.2

Found the following problems with the 'New Reference Wizard' ('Deployment Assembly' preference page -> 'Deployment Assembly' tab -> 'Add...' button):
1. 'Finish' button is enabled when window is open and new reference information has not been filled out. If 'Finish' button is selected before filling out the new reference information a NullPointerException is being logged.
2. Labels for nodes in the wizard ('Project', 'Folder Mapping', 'Variable', etc) are being set directly in the plugin.xml without using the plugin.properties file for translation.
3. The width of the new project reference window for Web projects is cutting off the description.
4. The default size for TreeViewers of the 'New Reference Wizard' are not being set and currently the window gets expanded when the workspace contains a lot of projects. Saw this behavior when adding a references of the following types: 'Variable', 'Folder Mapping, 'Project', and 'References Projects Classpath Entries'.
5. VariableReferenceWizardFragment.handleNewSelection() method should not allow 'Finish' button to be enabled unless the path is not null, not empty and not a directory.
6. The 'Jar' and 'External Jar' labels should be replaced by 'Archive' and 'External Archive' labels since this should cover adding .jar, .war, .rar, and .zip files along with anything else a user might try to link in.
7. The 'External Jar' node's 'Browse' button ('JAR Selection' window) should include .war and .rar files in the default allowed file types.

Reproducible: Always
Comment 1 Aidyl Kareh CLA 2010-05-25 00:14:25 EDT
Created attachment 169760 [details]
Patch

The attached patch addresses all the problems mentioned in defect description.
Comment 2 Jason Sholl CLA 2010-05-25 10:38:56 EDT
Looks good.  These are several much needed bug fixes.
Comment 3 Carl Anderson CLA 2010-05-25 14:02:51 EDT
I approve of this change.
Comment 4 Chuck Bridgham CLA 2010-05-25 14:49:26 EDT
approved
Comment 5 Aidyl Kareh CLA 2010-05-25 14:56:08 EDT
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug"
(requested by an adopter) please document it as such. 

This patch fixes several important defects in the 'New Reference Wizard' such as UI issues, default allowed file types in the 'External Jar' wizard, and when the 'Finish' button should be enabled (See defect description for full list). This window is fairly new and these issues should be fixed since they are easily noticeable by users.


    * Is there a work-around? If so, why do you believe the work-around is
insufficient? 

No.


    * How has the fix been tested? Is there a test case attached to the
bugzilla record? Has a JUnit Test been added?

Fix has been manually tested.


    * Give a brief technical overview. Who has reviewed this fix?

This patch does the following:
- The extensions in the plugin.xml (org.eclipse.jst.common.ui, org.eclipse.jst.j2ee.ui, org.eclipse.jst.servlet.ui) that declare the labels for the different types of reference nodes in the 'New Reference Wizard' were updated to use labels declared in the plugin.properties.
- Messages.java and messages.properties were modified so that labels in the 'Jar' and 'External Jar' windows replace 'jar' with 'archive'.
- The different *ReferenceWizardFragment classes were modified to set the TreeViewers default size (to avoid it expanding with the content) and to set the conditions where the 'Finish' button should be enabled.
- ExternalJarReferenceWizardFragment class was modified to allow the 'External Jar' node's 'Browse' button ('JAR Selection' window) to include .war and .rar files in the default allowed file types. The IJstCommonUIConstants class was also created to hold the constant for the last path used by the 'External Jar' node's 'Browse' button window.
- AddModuleDependenciesPropertiesPage.handleAddNewReference() method now checks that the added reference value is not null before trying to add it to the current references (to avoid NPE). 
- CustomWebProjectReferenceWizardFragment class was modified to set the default size so that the wizard's description is not cutoff.

Jason sholl, Chuck Bridgham and Carl Anderson have reviewed this patch.


    * What is the risk associated with this fix? 

I believe the risk is minimal since changes are mostly fixing labels, window sizing, the default file types that should be allowed by the 'External Jar' option and when the 'Finish' button should be enabled (without fix an NPE is thrown if button pressed before reference has been created).
Comment 6 Tim deBoer CLA 2010-05-25 15:51:13 EDT
It's ugly that we are still having to make basic changes in this area in RC3. That said, we can't ship like this and the changes are fairly safe, so I am approving.

If there are any further changes known along these lines (beyond regular shutdown defect fixes), please give the PMC a heads-up so we can discuss.
Comment 7 Jason Sholl CLA 2010-05-26 14:13:45 EDT
code checked into head for wtp 3.2 rc3