Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » IType.move() brings "Invalid destination"
IType.move() brings "Invalid destination" [message #226675] Tue, 28 March 2006 06:52 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:class browse widget in jdt?
Next Topic:How can I turn off the source lookup in the debug framework
Goto Forum:
  


Current Time: Fri Nov 07 05:23:26 EST 2025

Powered by FUDForum. Page generated in 0.03632 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top