|Re: how to call a class during eclipse plugin installation? [message #1694721 is a reply to message #1694665]
||Thu, 07 May 2015 11:20
| Rafael Barioni
Registered: October 2014
Pascal Rapicault wrote on Thu, 07 May 2015 02:26|
I recently did this and it worked.
I have not went through the details of the article but it seems to cover the most important points.
A couple things you need to know:
- The action needs to be in the installation before it can be executed. So the first thing I recommend you to do is to develop your action, install it in Eclipse, and then create an IU that uses this action. Either the action is found and it is executed or it fails by saying that the action can't be found.
- The action is loaded from plugin.xml, be sure it is loaded
- Add breakpoints in the p2 engine to to confirm the action is found. For example there is a class that loads the actions from the plugin.xml that may be interesting (sorry don't know the name by heart)
- Then in a real case you will likely want to cause the installation of the action "automatically" when the user installs the software. This can be achieved by having your plug-ins / feature define a meta-requirement on the plugin that delivers the action. This meta requirement will be seen by p2, and will cause the plugin with the action to be installsed before the actual software is installed.
- Meta requirements are specified through the means of p2.inf
Hello. Thanks for the help.
But it seems that, to achieve this, I need to have 2 separate plugins, correct?
I was trying to create my action class inside my plugin and make the call in the .inf file.
Sorry, but could you send some code to explain better the idea?
Powered by FUDForum
. Page generated in 0.03153 seconds