tags:

views:

83

answers:

4

My projects changes location, and I need to tell Eclipse this. (I'm not the one moving the project, it already exists in different folders. To work on a different branch, I work in a different folder.) Today I just delete the project from Eclipse and import it from the new location.

But I have a lot of projects, they change location often and the paths a very complicated. I'd like a better way to manage this in Eclipse.

For example:

J:\iteration234_abc\foo\bar\baz\iffle\dizzle\Project

Only the root-folder changes (iteration-number and the idenfier "abc"). After that there are lot of folders. Many folders has tons of subfolders with similar names, which makes finding the folder with GUI time-consuming and very boring.

It would be so nice if I could just edit the path.

As you may have guessed: The J-drive is a network drive, provided by the source control system. The way to tell source control that I'm working on another iteration, is to continue my work in a different folder. My actual Eclipse workspace normally doesn't contain any projects.

A: 

I don't see why your source control should cause your local project to change location. Maybe you should consider using SVN or another SCM that won't require you to change the path at all.

Alb
You don't understand that part because I didn't explain it. I didn't explain it because it isn't relevant.The revision control system is actually a very complicated enterprise setup, and the same source is available in many locations. So to implement one feature I edit the project in J:\abc123456_foo, and to fix an unrelated bug in the same project I edit in J:\abc123457_bar. To continue work on the new feature I go back to J:\abc123456_foo.That's just the way it works, and we are not going to change that just because I don't like selecting a folder in a deep structure in a GUI.
myplacedk
ok, I've experienced similar 'branching' using other SCMs. I think the best solution then is as to use different workspaces for each different varient of the same project.
Alb
A: 

Export your project in the "Project Interchange" format (a zip file basically). And then reimport the zip into the "new" location -- all of the old fixed paths will be mapped to the new paths.

Joe Zitzelberger
+1  A: 

I find that the easier in this case is to have two different eclipse workspaces, each pointing to the projects in a different location.

Then you can just use "File->Switch Workspaces" to change all of the open projects at once.

Mario Ortegón
Good idea. But it doesn't really help me, as it is often a new location.
myplacedk
A: 

Another option is to export a "Team Project Set". You get an XML file like:

<?xml version="1.0" encoding="UTF-8"?>
<psf version="2.0">
<provider id="org.tigris.subversion.subclipse.core.svnnature">
<project reference="0.9.3,https://xxx/trunk/com.image4j,com.image4j"/&gt;
<project reference="0.9.3,https://xxx/trunk/com.jacob,com.jacob"/&gt;
</provider>
</psf>

This is a file that you can then edit by hand, then import in a blank eclipse workspace

Mario Ortegón