This post covers Eclipse Early start: How to ensure eclipse plugin has required bundles available?
This post covers configuring your plugin for "early start" after installed via p2 update: Require-Bundle and Import-Package versus feature.xml requires
This wiki entry covers Eclipse lazy start: http://wiki.eclipse.org/Lazy_Start_Bundles
In my case, I am loading a bundle (Apache Wink) that is required by my plugin bundle, and I need to ensure it is ACTIVE when my plugin is called. It is not enough that it present, what I mean is, I do not need to import any of its packages I just need it running so my plugin can do HTTP communication with it. I'm thinking of two solutions and would appreciate feedback on either, or welcome suggestions I haven't considered:
From what you are describing, it sounds like you are creating plugins that people will be installing into an existing Eclipse instance. Also, you don't have control over how the Apache Wink plugin gets installed.
This means that #1 would be tricky since the way to do this is to add a p2.inf file and add an auto-start property with a proper start level in it. If you were creating and bundling the apache wink plugin yourself, then this would be the way I'd recommend, but since you're not, I'd go with #2.
All you need to do is something like this in your activator:
Platform.getBundle("org.apache.foobar.wink").start();
Simple, but a couple of caveats: