Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330511 - Manifest entries are duplicated when switching EARs in Manifest Entries page
Summary: Manifest entries are duplicated when switching EARs in Manifest Entries page
Status: RESOLVED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Jason Peterson CLA
QA Contact: Carl Anderson CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-17 14:43 EST by Jason Peterson CLA
Modified: 2010-11-23 08:44 EST (History)
2 users (show)

See Also:
ccc: review+


Attachments
patch (1.16 KB, patch)
2010-11-17 14:43 EST, Jason Peterson CLA
no flags Details | Diff
Moves call, not just adds it (1.14 KB, patch)
2010-11-19 04:07 EST, Rob Stryker CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Peterson CLA 2010-11-17 14:43:10 EST
Created attachment 183335 [details]
patch

Whenever the parent project(EAR) is switched on the Manifest Entries page the current entries are duplicated in the MANIFEST.MF file.  This is because when switched a refresh is done to get the current entries of the new parent.  However, the existing entries were not cleared out.
Comment 1 Carl Anderson CLA 2010-11-17 23:44:46 EST
Jason, I assume this means the code is calling refreshViewerFromNewParentProject() instead of performDefaults() when this happens.  When Rob wrote this, he explicitly made it so that performDefaults() clears the list (just as you want) and the calls refreshViewerFromNewParentProject().  Should the call be to performDefaults() instead?
Comment 2 Jason Peterson CLA 2010-11-18 09:40:23 EST
Carl,

You are asking the wrong person.  I have no idea how Rob intended it to work:)  Either way would fix the problem.  I assumed perform defaults was when the user selected to reset to defaults.
Comment 3 Rob Stryker CLA 2010-11-19 04:07:07 EST
Created attachment 183452 [details]
Moves call, not just adds it

Not sure on my intent but it clearly can be fixed either way. I think the cleanest solution is to move hte list.clear from performDefaults() into the method to avoid calling it twice and just keeping stuff organized. 

Not a big issue really ;)
Comment 4 Jason Sholl CLA 2010-11-23 08:44:32 EST
Code checked int 32M and HEAD for WTP 3.2.3 and 3.3