View RSS Feed

My Java Tips

Plugin project - Dependencies page (II)

Rate this Entry
by , 11-17-2011 at 06:26 PM (575 Views)
In this post, I will talk about the Eclipse project's dependencies page.



The Dependencies page shows the dependencies that your plug-in has on other plug-ins. You must list on this page all the plug-ins that contribute code required on your plug-in project's classpath to compile. When you modify the list of dependencies and save the file, PDE will automatically update your classpath.


Note that the order of the plug-ins in the list is important because it dictates the class loading order at runtime, so use the Up and Down buttons to organize the list as appropriate.

A plug-in listed in the Required Plug-ins section can be marked as re-exported in its Properties dialog. Re-exporting a dependency means that clients of your plug-in will get that dependency for free. It is important that you do not abuse this functionality and use it only when it makes sense to do so.



If your plug-in requires a specific version of a plug-in to function properly, then you can specify the version required along with the version match rule. You can read more about valid values in the Platform ISV guide.

The Eclipse runtime gives the flexibility to declare a dependency on a package without explicitly identifying its originating plug-in. These packages are listed in the Imported Packages section.

The Dependency Analysis contain several useful features such as finding cycles in the dependency graph. Such cycles are forbidden by the runtime, making the analysis useful for performing a sanity check on your plug-in's dependency graph before testing it.

For a selected plug-in in the list, Compute Dependency Extent will give you a list of all the Java types and all the extension points that your plug-in needs from that dependency. So, in essence, it tells you why you need that plug-in.

Since the JARs from all the plug-ins in the list of dependencies will be on your plug-in's classpath at runtime, it is very important to not have any dependencies that you do not need, as they would slow down classloading. To find such extraneous entries and remove them, use the Find Unused Dependencies feature available on this page.

Submit "Plugin project - Dependencies page (II)" to Facebook Submit "Plugin project - Dependencies page (II)" to Digg Submit "Plugin project - Dependencies page (II)" to del.icio.us Submit "Plugin project - Dependencies page (II)" to StumbleUpon Submit "Plugin project - Dependencies page (II)" to Google

Comments