Bug 24685

Summary: Inner package fragments gets deleted - model out of synch
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Dani Megert CLA 2002-10-11 03:58:46 EDT
Build 20021008

1. Create new workspace with JUnit
2. In Package Explorer disable all empty package filters
   ==> you see empty package fragment 'junit'
3. Try to delete the fragment.
   ==> ok: does not work - fragment stays
3. Rename the fragment
   ==> BAD: element delta reports removal of 'junit'. 'junit' goes away.
4. Close Package Explorer
5. Reopen Package Explorer
   ==> BAD: 'junit' still not there
6. Close project and reopen project (or restart the workbench)
   ==> empty inner package 'junit' is back again

An empty inner package should never be reported as removed in a Java element
delta nor should it be removed from the model or its cache.
Comment 1 Jerome Lanneluc CLA 2002-10-11 08:37:45 EDT
Fixed CopyResourceElementsOperation.prepareDeltas() to create an added delta 
(instead of a move delta) in this case.

Added regression test JavaElementDeltaTests.testRenameOuterPkgFragment()
Comment 2 David Audel CLA 2002-10-17 10:07:12 EDT
Verified.