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

Bug 330511

Summary: Manifest entries are duplicated when switching EARs in Manifest Entries page
Product: [WebTools] WTP Common Tools Reporter: Jason Peterson <jasonpet>
Component: wst.commonAssignee: Jason Peterson <jasonpet>
Status: RESOLVED FIXED QA Contact: Carl Anderson <ccc>
Severity: normal    
Priority: P3 CC: jsholl, stryker
Version: 3.2.2Flags: ccc: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch
none
Moves call, not just adds it none

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