Bug 83861

Summary: Package declaration changed on copy
Product: [Eclipse Project] JDT Reporter: John Arthorne <john.arthorne>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P2    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description John Arthorne CLA 2005-01-27 14:43:17 EST
Build: I20050125

1) Create a simple Java project with two packages, p1 and p2
2) Create the type p1.A and leave the editor open
3) In the Package Explorer, copy p1.A to the package p2.

-> The package declaration of p1.A in the open editor gets changed to "p2". 
This results in a compile error.  The package declaration of the *source* of the
copy operation should not be changed.
Comment 1 Dirk Baeumer CLA 2005-01-28 03:59:23 EST
Tobias, can you please have a look and check if this is caused by the copy
refactoring or if this is caused by JDT/Core. 
Comment 2 Tobias Widmer CLA 2005-01-28 04:30:35 EST
We only call ICompilationUnit#copy(IJavaElement, IJavaElement, String, 
boolean, IProgressMonitor) throws JavaModelException

Moving to JDT Core for comments
Comment 3 Jerome Lanneluc CLA 2005-01-28 06:35:40 EST
Fixed by fixing bug 83599.

*** This bug has been marked as a duplicate of 83599 ***