joejag
joejag

Reputation: 314

Eclipse plugin won't go from RESOLVED to ACTIVE

I have a Eclipse plugin Bundle I've created which won't go from the RESOLVED state to ACTIVE.

I've tried opening the OSGI console to see why the bundle won't start but there doesn't appear to be any problems. If I type "start bundleid" then it starts as you would expect.

The bundle is using the 'org.eclipse.ui.startup' extension point which I'm using to perform a task during the Eclipse workspace startup.

This is the manifest in use:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: My Bundle
Bundle-SymbolicName: com.joejag.bundle;singleton:=true
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: com.joejag.bundle.Activator
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.core.resources
Bundle-Vendor: Joejag
Bundle-RequiredExecutionEnvironment: J2SE-1.5

The bundle is intended to be used by others. So asking them to start up an OSGI console and manually start the bundle isn't a viable solution.

This is the nearest I could get to help on the subject which isn't very helpful.See Wiki Eclipse.

Upvotes: 3

Views: 1685

Answers (2)

Andrew Eisenberg
Andrew Eisenberg

Reputation: 28757

If you need to set your plugin to autostarted and you are expecting that people will install the plugin through p2, then you need to add a p2.inf file. This file contains some extra install instructions.

Add the following p2.inf file to your metadata directory of your plugin:

instructions.configure = setStartLevel(startLevel:4);
markStarted(started: true);

More information on the p2.inf file can be found here.

Upvotes: 5

Tim
Tim

Reputation: 2831

I assume you try to start a Eclipse application!? If it the case, please set go into your Eclipse application launch configuration and there into the Plug-Ins tab. Set the parameter Default Auto-Start to true and try it again.

Upvotes: 1

Related Questions