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

Bug 61270

Summary: Wrong delta when copying a package that overrides another package
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M9   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dirk Baeumer CLA 2004-05-06 14:07:16 EDT
I200405060200

Test case

P1
  src
     p1
       A.java

P2
  src
     p1
       B.java

- select p1 in P1/src and execute Copy
- select src in P2
- execute Paste
- confirm the override dialog with yes

The delta you get looks as follows:

Java Model[*]: {CHILDREN}
	Test6[*]: {CHILDREN}
		src2[*]: {CHILDREN}
			p1[+]: {}

Shouldn't the delta be A.java added to p1 ?

Philippe, the current delta results in the fact that the package explorer 
doesn't update correctly since the package p1 already exists. The only change 
to get the package explorer in sync again is to close and reopen the project
Comment 1 Philipe Mulet CLA 2004-05-06 18:56:33 EDT
I believe it should indeed consider only A being added.
Comment 2 Jerome Lanneluc CLA 2004-05-07 11:39:33 EDT
Changed CopyResourceElementsOperation to not create the delta itself but let 
the DeltaProcessor create it in this case.

Added regression test JavaElementDeltaTests.testCopyAndOverwritePackage().
Comment 3 Frederic Fusier CLA 2004-05-19 05:27:20 EDT
Verified for 3.0 M9 with build I200405180816.