[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] How to set activate on startup to 'true' in bundles.info file
- From: "Yousouf, Shenol" <s.yousouf@xxxxxxx>
- Date: Tue, 16 Aug 2011 10:14:22 +0200
- Accept-language: en-US
- Acceptlanguage: en-US
- Delivered-to: firstname.lastname@example.org
- Thread-index: Acxb3RfCM2IxfPwDQpidXzO8Cq8fXgABZEqQ
- Thread-topic: [equinox-dev] How to set activate on startup to 'true' in bundles.info file
Whether a bundle will be marked for start or not in the bundles.info is determined by the metadata, published for this bundle in the p2 repository, from where it is installed. The description of the bundle's IU in the repo can include a touchpoint action (see the documentation about org.eclipse.equinox.p2.touchpoint.eclipse.markStarted on ) that explicitly instructs the p2 framework to mark the bundle to be started.
There are a few ways to add such actions for your components but the most straightforward one is through the <configuration> section in your .product file. There is a "Configuration" tab in the Product Editor in Eclipse IDE for this purpose, and since I was not able to find any specification about the contents of the .product file, I give a very basic example for reference:
<?xml version="1.0" encoding="UTF-8"?>
<product name="Simple Product" uid="SimpleProduct" version="1.0.0" useFeatures="false" includeLaunchers="true">
<plugin id="Bundle" autoStart="true" startLevel="0" />
Regarding your second question - if it is possible for all the bundles in a product to be started, there is a trick in p2 which can make this happen, although, as Neil pointed out, it is not recommended and not needed in most cases. Product publishing generates a special configuration unit ('tooling.osgi.bundle.default') in the repository which instruments the default behavior of all bundles in the product (). You can override this unit by means of a special p2.inf file () that customizes the product and replaces the osgi.bundle.default with another version which is capable of forcing the start of all bundles (unless the bundle comes with its own touchpoint action or CU that prevents the start).
SAP Labs Bulgaria
From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Pradeep Fernando
Sent: 16 август 2011 г. 09:23 ч.
To: Equinox development mailing list
Subject: Re: [equinox-dev] How to set activate on startup to 'true' in bundles.info file
On Tue, Aug 16, 2011 at 8:56 AM, Neil Bartlett <njbartlett@xxxxxxxxx> wrote:
> I don't actually know the answer to your question, but I'm hoping the
> answer is "no, that's not possible".
Yes I got your point. I too think you are correct here.
But I'm not clear the what makes it 'true' or 'true' in the bundles.info file.
like, "all bundles that has an activator will be activated by startup."
may be this is a trivial question, but I couldnt find a document
> Your bundle probably does not need to be activated when Eclipse is
> started. If you and all other plug-in authors were able to do this,
> then Eclipse would take hours to start.
> Please consider other ways to achieve what you want to do.
> On Tue, Aug 16, 2011 at 4:11 AM, Pradeep Fernando <pradeepfn@xxxxxxxxx> wrote:
>> Hi devs,
>> I have a p2-aware product that uses simpleconfigurator. In the
>> bundles.info file the activate on startup field is set to 'false' for
>> most of the bundles.
>> How simpleconfigurator decides weather to put to 'false' or 'true' in
>> bundles.info. Is it possible to make the default value to 'true'.
>> (activate bundle at startup)
>> --Pradeep Fernando
>> equinox-dev mailing list
> equinox-dev mailing list
equinox-dev mailing list