Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Howto add a closelistener to a MPart?(Is there a way to know, when the part is Destroyed "from outside" the part?)
Howto add a closelistener to a MPart? [message #1211310] Tue, 26 November 2013 06:21 Go to next message
Alex Kipling is currently offline Alex Kipling
Messages: 246
Registered: July 2012
Senior Member
Hello!
I found the EPartService which allows me to listen to the parts,
when they are activated, deactivated, shown, hidden.

Is it possible to know when a part is closed?
Or what would be the right way to clean up the resources?


And again: I need to listen for the Part cycle from "outside"
(I will do something with a Shell, when the part is shown)
Further I wouldn't like to add a special @OnDestroy annotated method to the part, since my methods would only work with that parts, which would contain this method.
Re: Howto add a closelistener to a MPart? [message #1211540 is a reply to message #1211310] Tue, 26 November 2013 08:45 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 596
Registered: December 2010
Senior Member

From the outside you could listen to the event broker for events where toBeRendered is changed to false and the element is an MPart.
Previous Topic:Setting IEclipsePreferences in headless build
Next Topic:Overriding Edit command in Application.e4xmi from fragment.e4xmi
Goto Forum:
  


Current Time: Fri Jul 25 01:27:52 EDT 2014

Powered by FUDForum. Page generated in 0.32545 seconds