Tuesday, April 22, 2008

Using link files to manage an Eclipse install

You might want to consider a more managed environment instead of just dumping all the cool plug-ins (with referencing features I hope) into your Eclipse directory tree. If you need to update Eclipse, you really don't want to either unzip a new Eclipse on top or hunt through the list of features and plug-ins to find those you want to move forward.

Here is an approach for organizing your Eclipse or Eclipse-based product and builds on the capabilities of link files:

  • Keep Eclipse or an Eclipse-based product clean. That is, don't add any of your features or plug-ins to the eclipse\features and eclipse\plugins directories.
  • Create both an eclipse\links and eclipse\links-out directory in the existing Eclipse directory. If you are using an Eclipse-based product, the eclipse\links directory may already exist. The directory is not special, just a convenient place to hide link files when not in use.
  • Create a one or more add-ons directories for the features and plug-ins you want to add to your configuration. In these directories, create an eclipse\features and eclipse\plugins directory structure.
  • For each add-ons directory, create a link file in the eclipse\links-out directory. Copy those you currently want as part of your active configuration to the eclipse\links directory.

For example, assume you unzipped Eclipse into a directory named Eclipse-2.1.1, then created an add-ons directory named CoolTools, also in the Eclipse-2.1.1directory. In the CoolTools directory, you could have multiple directories, one for each tool or family of tools you want to add to Eclipse. Your structure might look something like

The EditorList.link file would contain either of these entries (not both):

path=D:/Eclipse-2.1.1/CoolTools/EditorList path=D:\\Eclipse-2.1.1\\CoolTools\\EditorList

The slash is either one (/) or two (\\) depending on direction.

Be sure that the entry does not end with a space as this causes it to be ignored by Eclipse — it took me several hours to determine this the first time I used link files.

If you start Eclipse with a new workspace, all of Eclipse and the features and plug-ins found via link files will be available.

Please refer to the link below for further details : www.ibm.com/developerworks/opensource/library/os-ecfeat/#link-ref

1 comments:

sabir pasha said...

thanks for the info about using link files to manage by add-ons plugins ,
Here i want to know how can i update my add-ons using eclipse update , For example i have a directory addons where i keep all my interesting features and plugins that is
C:\addons\eclipse\features\com.myfeature and C:\addons\eclipse\plugins\com.myplugins.jar and if i am using these feature using a link file in my C:\eclipse\links directory
So here ,if i want to update these feature or plugins present in my addons which i use it from my eclipse using a link file how do i do that ??
Because when i tried updating these feature using a update site , it actually updates the plugins and puts it in the C:\eclipse\features directory rather
than adding it to the C:\addons\eclipse\features\.. directory . So if i want to update the feature such that the updated feature is copied into my addons directory
that is C:\addons\eclipse\features\.. instead of C:\eclipse\features directory . How can i do that ???
Thanks
sabir pasha