Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added discussion of "internal" bundles.

...

  • Import-Package and Require-Bundle don't overlap, you can specify a requirement in one or the other, but Import-Package is recommended over Require-Bundle. To have a multi line header, start the continuation line after a blank in column 1.
  • Put a blank line at the end of the manifest.mf file - due to a bug in felix.
  • The igb, genometry and genoviz projects can by accessed as bundles. If a class/method is needed from igb/genometry/genoviz, it must be public, and the package must be exported in the MANIFEST.MF Export-Package list of the bundle that contains the class (igb, genometry or genoviz).
  • If you want to add a tab panel as a bundle, there is a helper abstract class, com.affymetrix.igb.window.service.WindowActivator, that you can extend.
  • The order that OSGi starts the bundles is not specified, so at any given time, one bundle cannot assume that another bundle has been started. So, if your bundle needs access to other bundles or services (like IGBService), you will not be sure when the bundle is available. For Services, like IGBService and WindowService, you can use a ServiceTracker to be notified when the required service is available - see WindowActivator for an example.
  • In the IGB source code repository, in the plugins/ directory, you will find several embedded bundles that IGB uses. You can look through these to help you understand bundles.

Sample plug-in

  1. to To create a our plugin, you we will create (at least) two three files, the MANIFEST.MF file and the Activatorwe , an activator (OSGi term), and a transformer (IGB term).
  2. We will create a bundle that adds a new graph function.
  3. create Create the following MANIFEST.MF file:

...

See the Quick-Start Guide.

Including a Bundle in the IGB Distribution

Some bundles are included in the normal IGB distribution. Above we discussed how to build an "external" bundle for use with IGB. Here are the additional things you need to do to include a bundle with IGB. Such bundles are sometimes referred to as "internal".

  • Put your bundle in our svn repository in the "plugins" folder.
  • Add your bundle to the list of include.bundles in build.properties.
  • Add a line to the optional bundle section of build.xml. This might be avoided in future if we can figure out how to get this elsewhere.