问题
I am using Google's Workspace Mechanic to configure my eclipse environment. All seems to work fine, except that for any fresh installation, the workspace mechanic opens up with a default location of its own (~/.eclipse/mechanic)
to look for preference files.
As given in their documentation i tried including their code
(/instance/com.google.eclipse.mechanic/mechanicSourceDirectories=/shared/eclipse/tasks\:${user_homedir}/.eclipse/mechanic)
in my plugin_customization.ini
, but it does not work for me.
Does anyone have any other idea as to how to achieve this?
回答1:
Under Windows, I found that when using the recent Eclipse Juno and the latest Workspace Mechanic I had to do the following:
Edit the (Java EE):
...\Eclipse_Juno_SR1\plugins\org.eclipse.epp.package.jee_1.5.1.20120828-0743\plugin_customization.ini
and add the following line at the end:
com.google.eclipse.mechanic/mechanicSourceDirectories=c:\\...\\eclipse_extensions\\WorkspaceMechanics
in order for the plugin to recognize the above directory as the shared folder... The plugin preferences now correctly references the folder !
回答2:
Quite late, but I just needed the same configuration.
First locate your plugin_customization.ini (eg. 'find -name plugin_customization.ini' in your eclipse folder). I had two files with same name, located in org.eclipse.platform and org.eclipse.epp.package.jee.
For me, the jee one was relevant and you can configure it as JSON Array.
com.google.eclipse.mechanic/mechanicSourceDirectories=["http\://server/mechanics/tasks.json","/tmp"]
This example shows how to configure a folder (/tmp) and via http location.
回答3:
The documentation is for Eclipse on Linux/Unix. If you are running Eclipse on Windows you will need a different path.
Another aproch is to put the preferencces in another file and point to that file from your eclipse.ini
with a line such as
-Declipse.pluginCustomization=/var/wsm/current/my.properties
or eclipse startup with
eclipse -pluginCustomization /var/wsm/current/my.properties
回答4:
The following worked for me (for Eclipse Luna in Windows).
- Open the
Luna/plugins
folder - Search for a folder that begins with
org.eclipse.epp.package
. (and I ended up withorg.eclipse.epp.package.java_4.4.1.20140925-1820
) - Go inside that folder and edit
plugin_customization.ini
- Append the following at the end (to point to
\\sharedserver\share\DEV\Workspace-Prefs-Luna
):
#Workspace Mechanic Settings
com.google.eclipse.mechanic/mechanicSourceDirectories=\\\\\sharedserver\\share\\DEV\\Workspace-Prefs-Luna
- Save and Close the file
- Restart Eclipse
来源:https://stackoverflow.com/questions/8008319/enterprise-configuration-of-workspace-mechanic