React to closing of an editor [message #463794] |
Thu, 15 February 2007 12:07  |
Eclipse User |
|
|
|
Hi,
i have written a rcp-application where i open an editor. When this editor
is closed i want certain things in my workbench to be updated. For this i
have written a method in my core-plugin that does this updating. I need
this method in a lot of situations, thatŽs why it has to be in this
central location.
The problem is, that the editor is opend via an actionSet that is a
contribution from another plugin. And this plugin is not allowed to call
code from the core-plugin (only the other way around). So how can i
achieve that my update-method is called after my editor is closed? The
only connection to the editor in my core-plugin is a GroupMarker in my
MenuManager that acts as a placeholder for the actionSet contributed by
the other plugin. But i canŽt stick any listeners to that. How can react
to the Event of the menu- and toolbar-items beeing selected?
Or what else can i do?
Thanks for any help.
Peter
|
|
|
Re: React to closing of an editor [message #464989 is a reply to message #463794] |
Wed, 21 March 2007 10:09  |
Eclipse User |
|
|
|
Peter,
I'm confused by one of your statements. You said that the contributing plug-in is not allowed to call any code in the core plug-in, only the other way around. But that to me is backwards. Your core plug-in shouldn't depend on any code in contributing plug-ins...however, on the flipside, a contributing plug-in should be able to depend on the "core" plug-in.
So, in your situation, I would think that the core plug-in would expose the code needed to perform your work and then the contributing plug-in would create a dependency on the core. If it truly is the "core", then all plug-ins around it should need that "core" code.
I'm not really sure how you would do it otherwise, without duplicating code.
Just my two cents.
|
|
|
Powered by
FUDForum. Page generated in 0.04996 seconds