| IType.move() brings "Invalid destination" [message #226675] |
Tue, 28 March 2006 06:52  |
Eclipse User |
|
|
|
When calling move() of IType in order to move a class to another
package, I receive an exception complaining an "Invalid destination". I
am doing:
assertTrue(targetPackageFragment.exists());
type.move(targetPackageFragment, null, null, true, null);
In which way could the destination be invalid?
Thanks for any help.
Michael
|
|
|
| Re: IType.move() brings "Invalid destination" [message #226743 is a reply to message #226675] |
Tue, 28 March 2006 18:46  |
Eclipse User |
|
|
|
Michael Pradel wrote:
> When calling move() of IType in order to move a class to another
> package, I receive an exception complaining an "Invalid destination". I
> am doing:
>
> assertTrue(targetPackageFragment.exists());
> type.move(targetPackageFragment, null, null, true, null);
>
> In which way could the destination be invalid?
>
simple---you can't move a class to a package.
classes live in compilation units.
you may want to enter a bug report again JDT CORE to make the spec clear about
this and the error message more informative
/adam
|
|
|
Powered by
FUDForum. Page generated in 0.03632 seconds