Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » React to closing of an editor
React to closing of an editor [message #463794] Thu, 15 February 2007 17:07 Go to next message
Peter is currently offline PeterFriend
Messages: 51
Registered: July 2009
Member
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 14:09 Go to previous message
Jason is currently offline JasonFriend
Messages: 45
Registered: July 2009
Member
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.
Previous Topic:Redo for Edit Tree Operation
Next Topic:Where do I put code for opening files? Editor or Action?
Goto Forum:
  


Current Time: Fri Sep 13 12:24:33 GMT 2024

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

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

Back to the top