I have two copies of the same directory structure (basically, trunk and a feature branch) which both contain a Java project (call it ProjectX) in a subdirectory of the respective base directory.
I have painstakenly set up Eclipse the way I want it to work with regards to settings, colors etc.
Now, I want to be able to switch between working in either trunk\ProjectX or featurebranch\ProjectX. These are completely separate on disk (which is why I feel that the accepted answer to How to create multiple projects with same name in Eclipse? does not address my concern), but since they share the name ProjectX on disk, Eclipse doesn't seem to want to let me add them to the same workspace.
Working sets don't help me because the projects are not (yet) in the same workspace.
Removing and re-adding the projects very quickly becomes error-prone.
Making a copy of the workspace directory and opening that seemed to lose quite a few of my settings (colors, servers, etc.) (why that is is another interesting question) and as far as I could tell, there was no easy way to tell which workspace I am actually working in right now.
My question: What is the recommended way to deal with a situation like this?
I guess I am hoping for some way to define an alias of some kind, such that I can add trunk\ProjectX as TrunkProjectX and featurebranch\ProjectX as FbProjectX, then use working sets to switch between them.
When you import existing projects (depending on your Eclipse version) you can give it a new name in the import window. Otherwise import it as normal and rename it by right clicking the project in your Package Explorer and going Refactor > Rename .
Eclipse has a showlocation
parameter:
eclipse.exe -showlocation
This will show the location of the workspace in the title bar.
I use an extra workspace for each branch. That way I feel secure, that I don't accidentally forget something and change trunk instead of branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With