Monday, February 18, 2008

[Eclipse] Finding an Eclipse Plugin


A PDF version of this post, complete with screenshots, is available here.


One of the issues I had with learning eclipse early on was the frustration of finding all those dependent plugins that were prerequisites for the plugin I wanted to load. First I would find the dependent plugin, load it then load my new plugin only to find another dependency showing up.

Then I stumbled on the update manager and life is far easier now! (Although you can still do the installation the tedious way if you really have to.)

Instead of downloading the files from the supplier site and installing them yourself to the correct eclipse plugins directory use the update approach instead.

The update approach works for most plugins that I have encountered so far. Here is the way that it works:

From the eclipse Help menu select "Software Updates" then "Find and Install". A dialog pops up with a choice of "Search for updates of the currently installed features" or "Search for new features to install". The latter is the choice that you want.

Now a dialog pops up (“Update sites to visit”) with a list of check boxes for features and various buttons. In your case click on the "New Remote Site...". In the next dialog enter some name by which you want to remember the site such as "Omnesoft", and enter the url on the next line.

For example, I know Jeff wanted to use an obfuscator plugin so enter "Obfuscate" for the name. For the url you should open your browser to the site of the plugin provider and search for the eclipse plugin update url. In his case he first chose http://obfuscate4e.partmaster.de/download.

However, this gives rise to errors if you continue. Digging deeper into the site you will find the correct url as follows:

http://obfuscate4e.partmaster.de/updates.

This is the url specifically for the eclipse update manager to use.

Clicking OK closes this dialog and returns you to the “Update sites to visit” dialog. The site that you have entered now shows up with a check box beside it.


Having entered the info for the new remote site you still do not know if there are dependencies for the new plugin (unless you were really diligent and actually read the new plugin site for instructions!).


Now click on the finish button to go to the next stage. At this point the manager is merely searching for the "updates" and "new" plugins.

Now the “Search Results” dialog pops up. It actually shows you the results of the search, amazing! Of course you might get the error message if you site url is incorrect. Now check the box beside the Obfuscate to indicate that you want this to be installed. (If you expand the selection you can find all the components that are in the selection).


Here is where the manager shines: click on the "Select Required" button to allow it to search for dependencies and populate the list of features with those others, if any. You should get into the habit of clicking on this button to save some aggravation later! You may or may not see additional features to be installed. You may have already installed some pre-requisite plugins from an earlier feature install.


One last bit of setup: click next to accept the license terms (or abandon if it is not for you!) in the new dialog box “Feature License”.


Click next again to finally get to the “Installation” dialog. Wow that is a l ot of setup. Now you see a list of the features and their description that have been selected for installation. Usually the default installation location is ok, but you can can change it if you know the consequences. (Meaning that you have some advanced knowledge that has been painfully extricated from the various help guides).


One last click of the “Finish” button and ...oops you may get a “Duplicate Conflicts” detection dialog popup. This really means that some version of a plugin already uses a version of a plugin and there might be two versions. Well now is where your risk taking part of your brain starts to vacillate. (In other words do a backup of your entire eclipse directory structure if you are unsure in case the warning really does kill the eclipse setup!). Being bold we continue anyway...


So the “Update Manager” windows appears and starts to initialize but whoa...another warning pops up! My goodness who wrote all this paranoia code? Well I for one appreciate the warnings so I can make an, ahem, informed decision.


A “Feature Verification” dialog pops up and is requesting you to make yet another commitment. I typically just click the “Install All” button because I get fed up reading all the warnings from all the dependent features! Well I do live dangerously.


Assuming all goes well the last dialog asks if it can restart eclipse for the changes to take effect. So this is it. Might as well continue and take the plunge and test it...restart it is.


So by the time eclipse shuts down and restarts your fourth coffee is now cold. Go and check that the feature you have installed is installed properly. Since there are many types of plugins you will have to do that part on your own.


Good luck now.


Rolling your own”.

For those wanting to install their own plugins into the eclipse directory and then find that a plugin is still missing from another source then follow these steps.


On the eclipse web site for plugins do a search for the missing plugin.


Try this central site first and choose a secondary site that best suits your needs.:

http://www.eclipse.org/community/pluginsites.php


Read the instructions for this missing plugin/feature in case it too has dependents that have to be loaded. For example Matisse, the GUI designer for Java, has three or more plugins for it to run properly.


Jeff's problem: (finally!)

Searching for documentation on eclipse plugins is somewhat tedious. When I started searching for “org.eclipse.pde” under plugins it failed, so I tried “pde” by itself and got some answers but they did not stem to be a good match. Digging around a bit more I thought I would see if it was a project under eclipse and found:


http://www.eclipse.org/pde/


This has a good description of the project. PDE is the “Plug-in Development Environment“ for those wishing to make plugins for eclipse. There you can find that it is comprised of two components itself.


Note that this statement:

“PDE is built atop the Platform and JDT, and ships as part of the Eclipse SDK. “ indicates that pde should have been installed with the original eclipse install but perhaps there was something not quite right about the initial installation so you might want to revisit that to ensure that pde is already there or not.


By searching for a list of projects I did find the PDE project itself and the download here:

http://www.eclipse.org/projects/project_summary.php?projectid=eclipse.pde


I hope that this is not TMI (too much information).


Regards,

Tom

1 comments:

Jeff Bader said...

Thanks for this excellent information, and for helping me find the specific dependencies I needed. The feature installation/update process certainly makes more sense to me now. :-)

Post a Comment