Bug 73079 - [model] ICompilationUnit.createImport() after ICompilationUnit.move() fails
Summary: [model] ICompilationUnit.createImport() after ICompilationUnit.move() fails
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-01 13:38 EDT by Min Idzelis CLA
Modified: 2009-08-30 02:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Min Idzelis CLA 2004-09-01 13:38:02 EDT
Scenerio is this. This is being run inside of a runnable in JavaCore.run(). 

You have an IType and you get the compilation unit for it. 
You invoke ICompilationUnit.move() with a proper existing destination
IPackageFragment. If you try to add imports using createImport() to this
compilation unit it will not work. 

Workaround - creating imports first, and then performing the move works. 

Secondary (related problem). 

After the move, if you do ICompilationUnit.getParent() it still reports its
parent as the old IPackageFragment (not the new one that was where it was
supposed to move to) Also, things like type.getFullyQualifiedName() report the
original name, not the new name.
Comment 1 Philipe Mulet CLA 2005-04-07 09:44:19 EDT
Deferring post 3.1
Comment 2 Eclipse Webmaster CLA 2009-08-30 02:36:28 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.