You can start a plug-in when a specific personality is started.
In the majority of cases, plug-ins that are exporting packages for use by other plug-ins, and contain the Bundle-ActivationPolicy: lazy
(or Eclipse-LazyStart: true
) attribute, are started automatically by the framework when there are requests for a class from that plug-in. In cases where a plug-in does not provide packages for use by other plug-ins, or the plug-in needs to start prior to later package references, then use this mechanism to start the plug-in with a personality.
Personalities allow you to customize the look and feel depending on the desired applications. Applications can have completely different requirements in terms of the plug-ins that are used, so when starting a personality, it is advantageous for resource reasons to start only what is needed. Because the Lotus
® Expeditor Client allows multiple personalities to run when using the default RCPApplication, you can control which plug-ins start based on a specific personality.
To contribute a plug-in when a specific personality is started:
- Identify the target personality (com.ibm.rcp.platform.personality is the ID of the default personality used by the RCPApplication).
- Add the plug-in to start either by adding the com.ibm.rcp.lifecycle.personality.startBundles to the service providing bundle or to another bundle independent of both the personality bundle or the service providing bundle.
The plug-in starts when the target personality is started.
A plug-in that needs to start DB2
® could define the following extension to start the com.ibm.db2e plug-in when the com.ibm.rcp.platform.personality starts:
Parent topic: Managing life cycle
<?xml version="1.0" encoding="UTF-8"?>