Bug 61270 - Wrong delta when copying a package that overrides another package
Summary: Wrong delta when copying a package that overrides another package
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-06 14:07 EDT by Dirk Baeumer CLA
Modified: 2004-05-19 05:27 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.