Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311909 - Project preferences UI, "restore defaults" button skips 2 fields
Summary: Project preferences UI, "restore defaults" button skips 2 fields
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC1   Edit
Assignee: Hari Shankar CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 11:19 EDT by Hari Shankar CLA
Modified: 2010-05-13 23:13 EDT (History)
3 users (show)

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


Attachments
Patch (2.85 KB, patch)
2010-05-06 11:20 EDT, Hari Shankar CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hari Shankar CLA 2010-05-06 11:19:17 EDT
Build Identifier: 32

Restore defaults should fill in default values.
                     EAR content :  empty
                     Ejb:   ejbModule, ejbModule
                     Web :  src, /WebContent/WEB-INF/classes/, WebContent/
                     Appclient:   appClientModule, appClientModule
                     Connector:  connectorModule,  connectorModule
                     Utility :  src, src
The result is:

EJB and Application Client projects' output folder fields are not restored to defaults.

Reproducible: Always
Comment 1 Hari Shankar CLA 2010-05-06 11:20:59 EDT
Created attachment 167322 [details]
Patch

The issue was that we were getting the current instead of the default value during initialization, and setting it to the default value. This patch fixes the issue by getting the values from the default scope for initializing the default values.

I have also added a getDefaultBoolean method for consistency with the older preferences class and future use.
Comment 2 Chuck Bridgham CLA 2010-05-06 15:23:20 EDT
approved
Comment 3 Hari Shankar CLA 2010-05-12 12:16:42 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 bug prevents the 'Restore Defaults' button from completely performing the associated functionality.

    * Is there a work-around? If so, why do you believe the work-around is insufficient? 
Manually edit the fields that are not restored. This may result in support tickets being opened against adopter products.

    * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
Fix was tested by using the restore defaults button on windows. Ensured that all the default values are restored. Also several other operations such as project creation for various modules were tested to ensure that the defaults for other scenarios are not affected.

    * Give a brief technical overview. Who has reviewed this fix? 
This fix has been reviewed by Chuck Brdigham
    * What is the risk associated with this fix? 
There is no risk associated with this fix.
Comment 4 Jason Sholl CLA 2010-05-12 15:19:57 EDT
code checked into head for WTP 3.2 RC1