Conveniently move a class to a different package in eclipse without borking svn

Schneehenry picture Schneehenry · Jan 7, 2009 · Viewed 19.4k times · Source

When moving a file from old.package to new.package I want two things to happen:

  1. Update all references to that class (in all files of the project) so that the new package is used
  2. svn move old/package/Foo.java new/package/Foo.java

I use subversive within Eclipse Ganymede. When I just drag the file from one package to the other, all references get updated and the file is moved around on the filesystem. But SVN is unaware of this and therefore the svn move old/package/foo.java new/package/Foo.java command does not work (obviously) when old/package/Foo.java does not exist (because eclipse has moved it already).

Is there a way to have eclipse do it's refactoring but using svn to move the file on the filesystem? I hope I'm just missing something obvious :-)

Answer

Yuval Adam picture Yuval Adam · Jan 7, 2009

I use Subclipse and it does support moving files between packages