How to create a Plugin in an existing RCP3 App? [message #1373731] |
Thu, 22 May 2014 05:47  |
Eclipse User |
|
|
|
Hello everybody!
I've read some tutorials and stuff about Eclipse RCP 3.x but I still have a lot of questions.
If I have a RCP 3 Application and now I want to add a plugin, wich should add a context menu-entry in this application.
How should I create the plugin?
Shall I check "would you like to create a 3.x client application?" or not (because somehow its not an application itself or?
But I have to check the "this plugin will make contributions to the UI" checkbox or? (Because it will add a context-menu entry.)
What would be the best template for the plugin?
I know that I need a Handler class. Is there a template maybe that generates this for me or do I have to do it myself?
How can I make the link from the main eclipse application to my little menu item contributing plugin?
And of course: If someone knows good basic tutorials about Eclipse RCP3 development (not these from vogella, because I've read them already)
it would be very nice if you could tell me where to find them.
|
|
|
|
|
Re: How to create a Plugin in an existing RCP3 App? [message #1384903 is a reply to message #1384813] |
Mon, 02 June 2014 19:31  |
Eclipse User |
|
|
|
alloisxp alloisxp wrote on Mon, 02 June 2014 11:26
I'am working on an already existing Eclipse RCP project, wich is not Eclipse itself.
So you just want to extend/enhance a certain Eclipse RCP Application?
Therefore you should choose the following options:
- >eclipse 3.5 (not OSGI)
- RCP Application -> no
- Contributions to UI -> yes
- (maybe) Hello RCP Template
- Creates a plugin project based on Eclipse >3.5
- Actually you do not want to create a new RCP Application, but just want to extend a certain Eclipse RCP Application
- With this option you just define that a dependency to the org.eclipse.ui is added to the MANIFEST.MF and you are able to create certain Templates, which affect the UI.
- For instance "Plugin with a view"
alloisxp alloisxp wrote on Mon, 02 June 2014 11:26
For example the point "makes Contributions to UI" is very confusing... wich UI? To my eclipse-rcp app UI? To the Eclipse Project in general? What exactly is meant with a "contribution to the UI" (Is a simple new button in my own rcp-app a contribution to the UI or not? )
As I mentioned before the "makes Contributions to UI" option just adds org.eclipse.ui to your dependencies and gives you more options for certain templates.
So you could archieve the same by adding a dependency to org.eclipse.ui manually, but if you choose this option more templates will be offered and org.eclipse.ui is added automatically.
By the way org.eclipse.ui reexports the SWT and JFace Bundles, which you usually use for UI Control like a Button and other UI Widgets.
Also the command, handler and menu extension point is defined in the org.eclipse.ui bundle.
In your case I suggest to take a deeper look at the Command Framework (Commands, Handlers and menuContributions).
Inside a menuContribution you can define a locationURI for a certain command. This locationURI defines where a Command should be shown in the UI.
I consider to write a blogentry concerning your questions with more details about the Command Framework and let you know about it.
I hope I could help you and make things clearer.
Best regards,
Simon
|
|
|
Powered by
FUDForum. Page generated in 0.07678 seconds