Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to create a Plugin in an existing RCP3 App?
How to create a Plugin in an existing RCP3 App? [message #1373731] Thu, 22 May 2014 09:47 Go to next message
alloisxp alloisxp is currently offline alloisxp alloisxpFriend
Messages: 6
Registered: May 2014
Junior Member
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 #1375834 is a reply to message #1373731] Fri, 23 May 2014 06:29 Go to previous messageGo to next message
Simon Scholz is currently offline Simon ScholzFriend
Messages: 73
Registered: April 2012
Location: Germany
Member
Hello alloisxp,

first of all: What is wrong about the tutorials @vogella?
I would appreciate some comments on that question...

Not according your problem:

Quote:

Shall I check "would you like to create a 3.x client application?" or not (because somehow its not an application itself or?


It depends on what you really intent to do. Do you want to add this menu item to the Eclipse IDE or do you want to create your own application, which is based on Eclipse?

If you answer this question I can give you further assistance.

Best regards,

Simon
Re: How to create a Plugin in an existing RCP3 App? [message #1384813 is a reply to message #1375834] Mon, 02 June 2014 09:26 Go to previous messageGo to next message
alloisxp alloisxp is currently offline alloisxp alloisxpFriend
Messages: 6
Registered: May 2014
Junior Member
Hello! Thanks for the answer!

I'am working on an already existing Eclipse RCP project, wich is not Eclipse itself.

My little problem with vogella-tutorials:

He is more saying, push this, write this, ... fast approach. But he is not telling why for example I have to do things sometimes.
For example I can't solve my question with his tutorial because he doesnt explain the details on the creation of plugins.
(But dont get me wrong, I think generally he writes good tutorials).

Until now I somehow came to the conclusion that I have to do it that way:


  • >eclipse 3.5 (not OSGI)
  • RCP Application -> yes
  • Contributions to UI -> no
  • (maybe) Hello RCP Template


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? Very Happy )

I was able to create a command in a context menu and to somehow make it work, but still I don't understand the real mechanics behind all this and vogella is not helping THAT much with it (maybe I have to give it more time...).

Re: How to create a Plugin in an existing RCP3 App? [message #1384903 is a reply to message #1384813] Mon, 02 June 2014 23:31 Go to previous message
Simon Scholz is currently offline Simon ScholzFriend
Messages: 73
Registered: April 2012
Location: Germany
Member
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:



  1. >eclipse 3.5 (not OSGI)
  2. RCP Application -> no
  3. Contributions to UI -> yes
  4. (maybe) Hello RCP Template



  1. Creates a plugin project based on Eclipse >3.5
  2. Actually you do not want to create a new RCP Application, but just want to extend a certain Eclipse RCP Application
  3. 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.
  4. 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? Very Happy )


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
Previous Topic:Color and size for menuContribution
Next Topic:Building RCP bundled with a JRE
Goto Forum:
  


Current Time: Sat May 04 14:30:16 GMT 2024

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

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

Back to the top