Reputation: 12384
I'm developing applications that depend on libraries, under Eclipse (OS X). That makes the following:
I used to have only one workspace with projects A, B, C, L1, L2, L3, with the libraries usually a simple git clone
from their repository.
I have then:
~/projects/ProjectA
~/projects/ProjectB
~/projects/ProjectC
~/projects/Lib1
~/projects/Lib2
~/projects/Lib3
That was working for some time, but now as projects A, B, C... are published and used, it can happen that projects may not use the same versions of libraries... and everything gets overcomplicated.
I had a look at working sets, but I don't think this is what I want.
I created a new workspace, and cloned libraries again so that I have:
~/projects/ProjectA/Project
~/projects/ProjectA/Lib1
~/projects/ProjectA/Lib2
~/projects/ProjectA/Lib3
~/projects/ProjectB
~/projects/ProjectC
~/projects/Lib1
~/projects/Lib2
~/projects/Lib3
So A's libs won't conflict with other copies used in B and C.
The problem is that the new workspace has the default settings, and all my perspectives, keyboard shortcuts and other stuff are gone.
I arranged my folder like that:
~/projects/EclipseSettings
~/projects/.metadata/.plugins/org.eclipse.core.runtime/.settings -> ~/projects/EclipseSettings
~/projects/ProjectA/.metadata/.plugins/org.eclipse.core.runtime/.settings -> ~/projects/EclipseSettings
~/projects/ProjectA/Project
~/projects/ProjectA/Lib1
~/projects/ProjectA/Lib2
~/projects/ProjectA/Lib3
~/projects/ProjectB
~/projects/ProjectC
~/projects/Lib1
~/projects/Lib2
~/projects/Lib3
As you can see I moved the .settings
folder of my initial workspace to a new folder, EclipseSettings
, and then symlinked the .settings
of every workspace to that Eclipse settings folder.
Doesn't work.
For example, I have assigned command + M to SVN commit:
~/projects
workspace, the keyboard shortcut works.~/projects/ProjectA
new workspace, the keyboard shortcut IS inside the 'Keys' section of Eclipse settings, assigned to SVN Commit, but it does not work. Nothing happens when I use that shortcut.Why? Are there other files than org.eclipse.core.runtime/.settings
that define my workspace?
Also, the perspectives are not there, the Java Formatter seems to be gone, it wasn't enabled in Save actions while I did enable it on my initial workspace...
I'm wondering if I should use that workspace thing to manage my projects, and also I'm wondering why I'm using Eclipse that uses workspaces/projects while IntelliJ seems to have a better way of managing everything. But I tried switching already and sticked to Eclipse.
Maybe I should give IntelliJ another chance, however I'd like to have some SO feedback on that first.
Upvotes: 0
Views: 370
Reputation: 22080
Don't nest workspaces into each other. Otherwise changes in one of them will make the other go out of sync with the file system, causing much confusion the next time you open that workspace. Be aware that Eclipse manages its own state for resources in the workspace, that is not just a 1:1 copy of your file system.
Don't symlink (or otherwise) share the metadata folder. Many people have tried that , but is does not work. While much of the meta-information of the eclipse plugins are stored in the metadata folder, there is no requirement to do so. That's why many plugins also store some information in sub folders of your project, in hidden files and other places. As long as you cannot copy or symlink all that information also, just symlinking the metadata folder will lead to inconsistencies.
Use available tools instead:
Upvotes: 2