[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] How to register custom touchpoint

There is a working example[1] for your reference.

[1]Âhttp://stackoverflow.com/a/6179632/390513


Kane


On Mon, Jul 8, 2013 at 11:04 PM, Shameera Rathnayaka <shameerainfo@xxxxxxxxx> wrote:
Hi Devs,

I started to write my own touchpoint to edit XML file when new features get installed, using p2.inf , I configured my touchpoint in plugin.xml file but this will not available when ActionManger call getActionMap() here is the code segment i am refering

ÂÂÂ ÂÂÂ IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(EngineActivator.ID, PT_ACTIONS);
ÂÂÂ ÂÂÂ IExtension[] extensions = point.getExtensions();

How can i register my touchpoint ? Following are the configurations I used, appreciate any help on this.

in my plugin.xm i add following configurations

ÂÂ <extension
ÂÂÂÂÂÂÂÂ point="org.eclipse.equinox.p2.engine.actions">
ÂÂÂÂÂ <action
ÂÂÂÂÂÂÂÂÂÂÂ class="my.custom.p2.touchpoint.actions.xml.AddElementAction"
ÂÂÂÂÂÂÂÂÂÂÂ name="addElement"
ÂÂÂÂÂÂÂÂÂÂÂ touchpointType="org.eclipse.equinox.p2.osgi"
ÂÂÂÂÂÂÂÂÂÂÂ tochpointVersion="1.0.0"
ÂÂÂÂÂÂÂÂÂÂÂ version="1.0.0">
ÂÂÂÂÂ </action>
ÂÂ </extension>


I
added following to p2.inf file of the feature which get installed

metaRequirements.0.namespace=org.eclipse.equinox.p2.osgi
metaRequirements.0.name=my.custom.p2.touchpoint
metaRequirements.0.range=[4.2.0-SNAPSHOT,4.3)

instructions.configure =
my.custom.p2.touchpoint.addElement(file:/home/shameera/Desktop/sample.xml,xpath:/configuration/param1,element:<node>value</node>);\


Thanks,
Shameera.


--
Best Regards,
Shameera Rathnayaka.

email: shameera AT apache.org , shameerainfo AT gmail.com
Blog : http://shameerarathnayaka.blogspot.com/

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev