Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » p2.inf setStartLevel not working(p2.inf setStartLevel not working)
p2.inf setStartLevel not working [message #516932] Thu, 25 February 2010 09:37 Go to next message
Farooq Kamal is currently offline Farooq Kamal
Messages: 40
Registered: January 2010
Location: Karachi, Pakistan
Member
My feature contains a couple of plugins in one of which I have included p2.inf as below

instructions.configure=\
org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(star tLevel:8);\
org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(starte d:true);

The setStartLevel does not work when I install this feature in a product but markStarted does. The startLevel always remains at 4 default.

Any ideas?
Re: p2.inf setStartLevel not working [message #516951 is a reply to message #516932] Thu, 25 February 2010 10:00 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon Kaegi
Messages: 381
Registered: July 2009
Senior Member
Your syntax looks fine. (Although for some reason in your post there are
spaces in "startLevel" and "started" -- you have "star tLevel" and "starte
d")
I'd suggest attaching a debugger and walking through the "SetStartLevel"
action.
-Simon

"Farooq Kamal" <farooq.kamal@gmail.com> wrote in message
news:hm61us$fof$1@build.eclipse.org...
> My feature contains a couple of plugins in one of which I have included
> p2.inf as below
>
> instructions.configure=\
> org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(star tLevel:8);\
> org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(starte d:true);
>
> The setStartLevel does not work when I install this feature in a product
> but markStarted does. The startLevel always remains at 4 default.
>
> Any ideas?
Re: p2.inf setStartLevel not working [message #516957 is a reply to message #516951] Thu, 25 February 2010 10:29 Go to previous messageGo to next message
Farooq Kamal is currently offline Farooq Kamal
Messages: 40
Registered: January 2010
Location: Karachi, Pakistan
Member
The spaces are not in the actual file, they just appeared here on the forum when I posted.

Could you please provide a reference (or any help) on how to attach a debugger (preferably the eclipse PDE debugger) to a standalone RCP product?

Thanks
Re: p2.inf setStartLevel not working [message #517042 is a reply to message #516957] Thu, 25 February 2010 16:19 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana Peco
Messages: 789
Registered: July 2009
Senior Member
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=253244

Snjeza

Farooq Kamal wrote:
> The spaces are not in the actual file, they just appeared here on the
> forum when I posted.
> Could you please provide a reference (or any help) on how to attach a
> debugger (preferably the eclipse PDE debugger) to a standalone RCP
> product?
>
> Thanks
Re: p2.inf setStartLevel not working [message #517169 is a reply to message #517042] Fri, 26 February 2010 08:12 Go to previous messageGo to next message
Farooq Kamal is currently offline Farooq Kamal
Messages: 40
Registered: January 2010
Location: Karachi, Pakistan
Member
Thanks. Is there an easy way to install this patch? and when would this become a part of standard p2 release?
Re: p2.inf setStartLevel not working [message #517320 is a reply to message #517169] Fri, 26 February 2010 17:09 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana Peco
Messages: 789
Registered: July 2009
Senior Member
The easiest way is to import the org.eclipse.equinox.p2.touchpoint.eclipse and org.eclipse.equinox.p2.metadata plugins including
source, apply patch and replace the plugins from your distribution with these plugins

Snjeza

Farooq Kamal wrote:
> Thanks. Is there an easy way to install this patch? and when would this
> become a part of standard p2 release?
Re: p2.inf setStartLevel not working [message #517519 is a reply to message #517320] Mon, 01 March 2010 01:39 Go to previous messageGo to next message
Farooq Kamal is currently offline Farooq Kamal
Messages: 40
Registered: January 2010
Location: Karachi, Pakistan
Member
Bingo!! That worked. Thanks a lot
Re: p2.inf setStartLevel not working [message #517640 is a reply to message #517042] Mon, 01 March 2010 10:08 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon Kaegi
Messages: 381
Registered: July 2009
Senior Member
Nice job Snjezana -- that's the problem.
One thing though is that the behaviour you are seeing is by design and so
this patch is unlikely to be applied.

When you want to provide your own custom behavior you should not be putting
this in your IU. For example another consumer of your bundle might have
totally different start-level constraints.
Instead you should provide your own IU fragment which is done by creating an
IU and setting it up with the host you want to bind to e.g.
"hostRequirements". An IU will be bound to exactly one fragment and will
choose the fragment that is the best fit so a fragment constructed in this
manner will be selected in preference to the default e.g
tooling.osgi.bundle.default IU fragment. You can still do this in your
p2.inf in 3.5.

HTH
-Simon



"Snjezana Peco" <snjeza.peco@gmail.com> wrote in message
news:hm6phf$h3t$1@build.eclipse.org...
> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=253244
>
> Snjeza
>
> Farooq Kamal wrote:
>> The spaces are not in the actual file, they just appeared here on the
>> forum when I posted.
>> Could you please provide a reference (or any help) on how to attach a
>> debugger (preferably the eclipse PDE debugger) to a standalone RCP
>> product?
>>
>> Thanks
Re: p2.inf setStartLevel not working [message #518775 is a reply to message #517640] Thu, 04 March 2010 18:17 Go to previous message
Snjezana Peco is currently offline Snjezana Peco
Messages: 789
Registered: July 2009
Senior Member
> When you want to provide your own custom behavior you should not be putting
> this in your IU. For example another consumer of your bundle might have
> totally different start-level constraints.

I have faced this issue while I was trying to implement Equinox Transforms http://wiki.eclipse.org/Equinox_Transforms
The org.eclipse.equinox.transforms.xslt plugin has to be started with an eager start level (1 is recommended).
If another consumer changes this, Equinox Transforms won't work correctly.
A similar behavior is required by the org.eclipse.equinox.weaving.aspectj plugin which is described in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253244
I don't know any plugin that is designed to be run at an eager start level, but allows a client to change the start level.

Snjeza
Previous Topic:Access multiple Equinox instances in Tomcat
Next Topic:Compile eclipse executable problem, wpf
Goto Forum:
  


Current Time: Thu Aug 21 18:11:25 EDT 2014

Powered by FUDForum. Page generated in 0.08468 seconds