If you’ve been following these little articles you’ll already have read about how to set up eclipse to use external configuration directories for individual context / plugins and their associated features. I mentioned briefly about setting the .eclipseextension file to the correct version of your eclipse install otherwise you run the risk of issues when using update sites as the initial installation source.
To this end I thought I’d post up some details of how to actually add a context to eclipse via an update site; as well as installing it directly into an external configuration directory at the same time. The steps are fairly painless to achieve this and I’ve added in a few images to provide pointers in case there is any confusion, I’ve also covered off the two commonest ways to install plugins via this method – those being having already added your external configuarion to eclipse via the Manage Configuration menu, (see the previous article). Or by actually adding the external location once we have selected our remote site to install from.
I’m going to use the Actionscript Development Tool (ASDT) as the example context that I wish to install, and I’m going to install it into an external directory structure – If you’re not sure how to create an external configuration you can read about the process here.
First of all create the external directory structure for your context – in my case the root folder is called ASDT. Next fire up eclipse if it isn’t already running and click on Help > Software Updates > Find and Install.
Next we are presented with a dialog where we can chose to either Install or Update, select the option to “Search for new features to install”.
This will open another dialog which will allow us to add our site details for the location we wish to install from. This can be a remote site (the commonest option) or a local site (if you installed the Flex Builder 2 alpha plugin for eclipse you’ll know all about this option). The local option is for the installation of plugins for, as you may have guessed, a locally held version. To add our site location click either the New Remote Site or New Local Site. In our case we want to add a new remote site so select that option. As you can see the dialog that opens once you click on a new location requires a ‘friendly name’ and an actual location.
For this example I’m going to coninue on my acronym theme and put ‘ASDT’ in the name field and the URL for the update repository for ASDT in the URL field, in case you don’t already know the ASDT URL is ‘http://aseclipseplugin.sf.net/updates/’. Click OK once you’ve entered these details to add the new entry.
You’ll now see that the initial dialog that opened has a new entry, which should be selected by default, called ASDT. The ‘Finish’ button is now active so click this to progress to the next step. At this point eclipse will attempt to connect to the URL making sure it is valid, i.e. it exists at the very least :P. If all goes to plan you’ll be presented with yet another dialog listing the available options for you to chose from for that particular context.
The image below shows the expanded ASDT repository and I have selected the most recent version available, (which at this time is an unstable build 0.0.8.build5). If there were more options they would be listed below the root ASDT folder on expansion.
Click the ‘Next’ button and you’ll get, yes you guessed it, another dialog box indicating what you have selected, you should also be able to see the path that the selection will be installed into, in the case of the image below it is:
Next to this is a button called ‘Change Location’, this is where we set our external path for installing our selection into our external configuration.
Now this is where we have a split in configuration. If on the one hand you have already added your external configuration path to eclipse via my previous article upon clicking the ‘Change Location’ button you will have the option of selecting the external directory you wish to use. However if you haven’t added your external directory yet once the pop up opens you can use the ‘Add Location’ button to browse to the folder and add it in there and then – Remember you need to navigate down into your external configuration directoy to the ‘eclipse’ folder within it.
Once you have added / selected your location click OK to close and apply this setting. Now all that is left to do it click Finish on the visible ‘Installation’ dialog and the installation will start. Once the files have been downloaded you’ll be asked to restart your eclipse IDE to load up the new files – you do get the option to just apply it, however I would recommend restarting if this is the initial install just to make sure it loads correctly first time round.