eclipse-rcpeclipse-pluginupdate-site

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.


Solution

  • 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/