Turgay Celik
Turgay Celik

Reputation: 663

Defining auto start for a plug-in within an eclipse update site project

I have created an update site for my product which consists of a set of Eclipse plug-ins. I want some of the plug-ins start automatically when Eclipse starts after the product is installed.

Actually I know that Eclipse holds auto-start properties of the installed plug-ins in configuration\org.eclipse.equinox.simpleconfigurator\bundles.info file and modifying this file manually after plug-in installation works fine. But I want an automated method to provide a user friendly installation process.

Is there a way to specify the plugins to start automatically in a feature based Eclipse update site project? (e.g. something similar to Eclipse Product Configurations).

As I googled, there are some maven based installation tools but I am looking for an easier way via standard Eclipse plug-in development capabilities.

Upvotes: 2

Views: 846

Answers (2)

mart
mart

Reputation: 2577

You can create plugin/META-INF/p2.inf file:

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

Look also at:

http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/tree/bundles/org.eclipse.equinox.weaving.caching/META-INF/p2.inf

http://chamibuddhika.wordpress.com/2011/05/18/installing-configuration-files-with-p2-inf-feature-installation/

Upvotes: 4

oberlies
oberlies

Reputation: 11723

When you open your product file with the standard Product Configuration Editor, you can configure the auto-start setting on the Configuration tab in the Start Levels section.

When exporting/including this product into an update site, the setting should be taken into account when users install the product.

It is not supported to set auto-start independent of a product.

Upvotes: 1

Related Questions