Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Get classes from RCP to plugin
Get classes from RCP to plugin [message #448724] Sun, 30 April 2006 09:42 Go to next message
Eclipse UserFriend
Hello !

I have created an editor as a plugin for my rcp-application.
The rcp-application is dependent on that plugin. In the context menu of that editor plugin i try to invoke some methods of the main rcp-application.
Now when i try to access classes from my rcp inside the plugin i get errors because of cycled dependencies.
My question is how can i access classes that are in my main rcp-application ?

Thanks in advance for any answer !
Re: Get classes from RCP to plugin [message #448739 is a reply to message #448724] Mon, 01 May 2006 07:43 Go to previous messageGo to next message
Eclipse UserFriend
Marcel wrote:
> Hello !
>
> I have created an editor as a plugin for my rcp-application.
> The rcp-application is dependent on that plugin. In the context menu of that editor plugin i try to invoke some methods of the main rcp-application.
> Now when i try to access classes from my rcp inside the plugin i get errors because of cycled dependencies.
> My question is how can i access classes that are in my main rcp-application ?
>
> Thanks in advance for any answer !

Option 1. Refactor your plugins so you don't have cyclic dependences!
Seriously, if you wrote the editor plugin and the RCP app plugin, create
a utilities plugin. Have the editor plugin and the RCP app plugin both
depend on the utilities plugin.

Option 2. Fool around with buddy classloading. You can set a policy on
the editor, and have the RCP app register itself with the editor plugin.
A google search should turn up some examples.

Later,
PW
Re: Get classes from RCP to plugin [message #448778 is a reply to message #448739] Tue, 02 May 2006 05:22 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the answer which is of course very helpful for me to get a better understanding!
But i think in my case the easiest solution would be to contribute a menu point to the editor from my rcp application.
So is it also possible to contribute a menu point in the context menu of the required editor from my rcp application ? And if it is possible how can i realize that ?
Re: Get classes from RCP to plugin [message #448782 is a reply to message #448778] Tue, 02 May 2006 08:08 Go to previous messageGo to next message
Eclipse UserFriend
Marcel wrote:
> Thanks for the answer which is of course very helpful for me to get a better understanding!
> But i think in my case the easiest solution would be to contribute a menu point to the editor from my rcp application.
> So is it also possible to contribute a menu point in the context menu of the required editor from my rcp application ? And if it is possible how can i realize that ?

Have your editor create its context menu. Then use the
org.eclipse.ui.popupMenu extension point in your RCP app to contribute
to your editor context menu (probably viewerContribution).

http://www.eclipse.org/articles/Article-action-contribution/ Contributing%20Actions%20to%20the%20Eclipse%20Workbench.html


Later,
PW
Re: Get classes from RCP to plugin [message #448799 is a reply to message #448782] Wed, 03 May 2006 02:36 Go to previous message
Eclipse UserFriend
Exactly what i need. Thank you very much for your help !
Previous Topic:key assist in RCP app
Next Topic:[How to] prepare a plugin to be patched?
Goto Forum:
  


Current Time: Sun Aug 31 16:49:11 EDT 2025

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

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

Back to the top