Re: Mobile source location (was: Great SWT Program)
blmblm@myrealbox.com wrote:
Yeah .... I'm not hearing you say anything, though, about how to
cope with -- really, it's kind of the filesystem equivalent of
rearranging the furniture, and it's something I do, well, maybe
more often than some people -- putting stuff one place, and then
deciding that a different organization of files and directories
would be better, and moving things around. I do sometimes wonder
whether I'm the only one that does such things, because some of
these new-fangled tools sure don't make it easy ....
Another way to cope, I suppose, would be to just put everything
in Eclipse's workspace (possibly having multiple workspaces), and
hope it provides drag-and-drop features that would make all that
rearranging easy. Then the source code files are less easy to
find with other tools (yeah, sometimes I'd rather just compile
and run something from a command line), but .... <shrug>
Here's how I do it, and it lets me move projects from directory to directory,
computer to computer or Eclipse to Netbeans and v.v.
Store everything in a source repository (CVS or Subversion). Use your IDE to
check it in and out (in CVS: 'cvs co <project> followed by a series of 'cvs
update' / 'cvs commit' cycles). All important IDEs play nicely with at least
CVS, and most with Subversion. When you want to pull the code into a
directory not in the workspace, use the version control to do it. Your
workspace and other directory cannot be out of synch if you are careful always
to check in changes through the version control.
Also, note that in the case of Java source, changing directory structures is
equivalent to changing package structures. Your IDE's refactoring
capabilities will handle that for you.
The beauty of this is that you can use each tool for what it does best. Use
Eclipse to develop. Use command-line tools to rearrange resource files. Use
Ant to deploy nightly. Use JUnit and JMeter to test. They all work off a
sane basis when you use version control to coordinate them.
--
Lew