Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Execute custom touchpoint that is not pre-installed
Execute custom touchpoint that is not pre-installed [message #1695198] Tue, 12 May 2015 14:58 Go to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 197
Registered: July 2009
Location: Graz, Austria
Senior Member
Today I tried to provide a sample p2 custom touchpoint action. The taret is to install the action along with the new UI.

So I tried to follow Ian Bulls Blog:
http://eclipsesource.com/blogs/2013/05/23/custom-touchpoints-in-p2/

There is also a forum post from Simon Kaegi:
https://www.eclipse.org/forums/index.php/mv/msg/39856/129768/#msg_129768

But still I was not able to run my custom action. When my action is already installed it is perfectly executed when installing my client feature. But if the action is not available locally, it will raise an error.
Tracked it back to the ActionManager.getActionMap() method, which seems to be populated only once. There is a method registryChanged() but it seems not to be triggered.

My sample projects are available online, in case someone wants to have a look:
https://github.com/Pontesegger/codeandme/tree/master/custom_installation_step

thanks
Christian
Re: Execute custom touchpoint that is not pre-installed [message #1695247 is a reply to message #1695198] Wed, 13 May 2015 03:59 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
Hi Christian, in order for your touchpoint action to be available in the installation by the time the plug-in that uses it is installed, the plug-in needs to declare a meta requirements on the plug-in that delivers teh touchpoint plug-in.

So if you have a touchpoint devliered by plugin TP, and a plug-in A using the action defined in TP, then your plug-in A should have a p2.inf that looks like this

metaRequirements.0.namespace=org.eclipse.equinox.p2.iu
metaRequirements.0.name=TP
metaRequirements.0.range=[1.2.0, 1.3.0)

HTH
Re: Execute custom touchpoint that is not pre-installed [message #1695539 is a reply to message #1695247] Fri, 15 May 2015 21:02 Go to previous messageGo to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 197
Registered: July 2009
Location: Graz, Austria
Senior Member
My plug-in A defines a p2.inf of

metaRequirements.0.namespace=org.eclipse.equinox.p2.iu
metaRequirements.0.name=com.codeandme.touchpoint.action
metaRequirements.0.range=[1,2)

where com.codeandme.touchpoint.action matches plugin TP from your example. Still it does not work. If the action plug-in is already installed, everything works fine. If the plug-in is fetched through the same install action, it does not work.
Re: Execute custom touchpoint that is not pre-installed [message #1697371 is a reply to message #1695198] Wed, 03 June 2015 13:37 Go to previous messageGo to next message
Kaloyan Raev is currently offline Kaloyan RaevFriend
Messages: 201
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
I hit the same problem as Christian with Eclipse 4.4.2. In my case the issue is not always reproducible and I suspect there is some synchronization problem in the update process.

I also traced the problem down to the ActionManager.getActionMap() method. The registryChanged() method is actually invoked after the first stage of the update finishes, i.e. installing the bundle with the touchpoint action. But it seems the event is processed too late - after the getActionMap() is called for the new touchpoint action. Hence it's not found and MissingAction error is displayed in this case.

I really hope there is a reliable way to have the custom touchpoint pre-installed.
Re: Execute custom touchpoint that is not pre-installed [message #1697392 is a reply to message #1697371] Wed, 03 June 2015 14:56 Go to previous message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 197
Registered: July 2009
Location: Graz, Austria
Senior Member
As it seems to be a reproducible problem, I raised a bug on this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=469291
Previous Topic:how to enable p2 commands in osgi console
Next Topic:Unresolved requirement: Require-Capability: eclipse.platform
Goto Forum:
  


Current Time: Tue Sep 25 16:36:07 GMT 2018

Powered by FUDForum. Page generated in 0.01814 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top