OSGi templates in Eclipse IDE 3.7

Eclipse IDE provides a useful tooling for OSGi bundle development. There’s even the Templates screen (of the New Plug-in Project) in which you can pick the template for your OSGi bundle.

While reading Using OSGi in JBoss AS7, I found the above Template panel a little “incomplete” comparing to what’s in the blog entry. I begun clicking here and there to find out what options drive the number of the available templates, and there are a few.

The above template set (the above screenshot) is available when you select “an OSGi Framework” (Equinox or standard) and uncheck the “Generate an activator, a Java class that controls the plug-in’s life cycle” checkbox.

The first panel in the New Plug-in Project lets you select the runtime (execution) environment the plugin (or an OSGi bundle) targets at.

The second panel of the wizard, however, lets you select whether to generate an activator or not.

Uncheck the checkbox and you’ll be presented with the needed (complete) set of templates.

Selecting different options in the panels will yield different templates available. Know it before you learn it upon presenting your OSGi skills to a wider audience and they’ll notice your wrinkling a brow ;-)

Be Sociable, Share!
This entry was posted in Frameworks.

Leave a Reply

%d bloggers like this: