Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Eclipse 4 System Events
Eclipse 4 System Events [message #937045] Mon, 08 October 2012 11:56 Go to previous message
Wim Jongman is currently offline Wim Jongman
Messages: 221
Registered: July 2009
Senior Member

Hi, how can I catch system events. For example, I want to catch an event if somebody closes a part like so:

@Inject
@Optional
public void closeHandler(@EventTopic(UIEvents.ALL_SUB_TOPICS) MPart part,
                         @EventTopic(UIEvents.ALL_SUB_TOPICS) Event event) { 
    if (part != null)
	System.out.println(part.isToBeRendered() + " : " + event.getTopic());
    }


I receive the following from the method. The method is in the part that I am closing.

....
true : org/eclipse/e4/ui/LifeCycle/activate
true : org/eclipse/e4/ui/model/application/ApplicationElement/tags/REMOVE
true : org/eclipse/e4/ui/model/application/ApplicationElement/tags/REMOVE
false : org/eclipse/e4/ui/model/ui/ElementContainer/selectedElement/SET
false : org/eclipse/e4/ui/model/ui/UIElement/widget/SET
false : org/eclipse/e4/ui/model/ui/UIElement/renderer/SET
false : org/eclipse/e4/ui/model/application/Contribution/object/SET
false : org/eclipse/e4/ui/model/ui/Context/context/SET
false : org/osgi/service/log/LogEntry/LOG_INFO

What is the exact part close event? Or don't i get it because I am in the part that is closed?

thanks in advance

Wim
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:XWT and control binding
Next Topic:(Announce) Jeeeyul's Eclipse Theme - Chrome supports Juno SR1 fully now.
Goto Forum:
  


Current Time: Wed May 22 15:55:46 EDT 2013

Powered by FUDForum. Page generated in 0.02463 seconds