Karl Auer <kauer@biplane.com.au> wrote on 02/08/2006 08:03:47 AM:
> We have a few Java projects, developed using Eclipse, where packages
> weren't used properly. That is, all the application classes are in their
> project default packages.
>
> I can't seem to rename the default package in Eclipse. Hm.
>
> OK, what I could do (for each project) is create a new package in the
> same project, move all the sources (drag and drop) from the default
> package to the new package, then delete the default package. Actually, I
> think it deletes itself if it's empty.
>
> But what will this too in Subversion/Subclipse terms? Will the moves be
> properly tracked, to be recorded in the repository when I commit the
> project? It seems to me it should. Are there any other gotchas I should
> know about?
The main gotcha is just to make sure you do it the way you described.
Create all of the new packages first and do Team -> Add so that the
underlying folders are part of the Subversion working copy. You do not
need to commit, just do the Add step.
Now you should be able to use the Refactoring tools to move the classes to
those new packages and Subclipse should catch it and run svn move so that
the history is retained.
Note that a move in Subversion is really a copy and a delete, so until you
commit it looks like a delete and an add.
Finally, when you do commit, I would recommend selecting the Project and
doing Team -> Commit and commit everything at once.
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: users-help@subclipse.tigris.org
Received on Wed Feb 8 14:37:34 2006