Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352234

Summary: LAST_EAR_NAME is never used in new Java EE module wizards
Product: [WebTools] WTP Java EE Tools Reporter: Roberto Sanchez Herrera <shr31223>
Component: jst.j2eeAssignee: Roberto Sanchez Herrera <shr31223>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc
Version: 3.2.4Flags: cbridgha: review+
Target Milestone: 3.2.5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

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.