Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352234 - LAST_EAR_NAME is never used in new Java EE module wizards
Summary: LAST_EAR_NAME is never used in new Java EE module wizards
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.5   Edit
Assignee: Roberto Sanchez Herrera CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-15 12:55 EDT by Roberto Sanchez Herrera CLA
Modified: 2011-07-18 11:32 EDT (History)
1 user (show)

See Also:
cbridgha: review+


Attachments
Proposed fix (2.20 KB, patch)
2011-07-18 10:09 EDT, Roberto Sanchez Herrera CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Sanchez Herrera CLA 2011-07-15 12:55:54 EDT
The bug 346348 introduced an undesired behavior in the Java EE module wizards (i.e. new dynamic web project, new ejb project, etc) regarding the last EAR project used. 

In the past, the last EAR used to create a new dynamic web project was used as the EAR name the next time the new dynamic web project wizard was opened. But a flaw in the logic of the code for 346348 is causing that the last EAR name is completely ignored.
Comment 1 Roberto Sanchez Herrera CLA 2011-07-18 10:09:24 EDT
Created attachment 199835 [details]
Proposed fix

The fix consist in changing a wrong validation (use != instead of ==). I also set the IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME property only when an EAR was selected, because if this property is set and the last EAR name is used, some important validation is bypassed, and the wizard shows the name of the last EAR used even if that project does not exist in the workspace.
Comment 2 Chuck Bridgham CLA 2011-07-18 10:44:38 EDT
Thanks looks good
Comment 3 Roberto Sanchez Herrera CLA 2011-07-18 11:32:43 EDT
Code committed to R3_2_maintenance and HEAD for 3.2.5, 3.3.1 and 3.4.