Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Referencing a fragment instance in a touchpoint action
Referencing a fragment instance in a touchpoint action [message #568220] Fri, 06 August 2010 09:47
Filip Hrbek is currently offline Filip Hrbek
Messages: 233
Registered: July 2009
Senior Member
Hi,

I am trying to extend p2 by addition touchpoint actions. The problem is that I am unable to reference a fragment in a fragment's touchpoint action (I am getting the host IU instead).

In the example below, when "actionOnFragment" is executed, the "iu" parameter is set to the instance of the "something/1.0.0" installable unit (as fragments's host). However, I need to get information about the fragment.

Is there a way to find which fragment contributed the action being executed?

Regards
Filip

Example:

<units size='2'>
<unit id='something' version='1.0.0' singleton='false'>
<provides size='1'>
<provided namespace='org.eclipse.equinox.p2.iu' name='something' version='1.0.0'/>
</provides>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='install'>
someAction()
</instruction>
</instructions>
</touchpointData>
</unit>
<unit id='fragment' version='1.0.0' singleton='false'>
<hostRequirements size='1'>
<required namespace='org.eclipse.equinox.p2.iu' name='something' range='1.0.0'/>
</hostRequirements>
<requires size='1'>
<required namespace='org.eclipse.equinox.p2.iu' name='something' range='1.0.0'/>
</requires>
<provides size='1'>
<provided namespace='org.eclipse.equinox.p2.iu' name='fragment' version='1.0.0'/>
</provides>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='install'>
actionOnFragment()
</instruction>
</instructions>
</touchpointData>
</unit>
</units>
Previous Topic:After migrating to Eclipse Helios, updating my RCP fails
Next Topic:No "General/Capabilities" preference page in Helios Platform Runtime
Goto Forum:
  


Current Time: Thu Jul 31 16:00:31 EDT 2014

Powered by FUDForum. Page generated in 0.01640 seconds