Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » HandlerServiceImpl scoping
HandlerServiceImpl scoping [message #804486] Wed, 22 February 2012 17:28 Go to next message
Thomas  Mäder is currently offline Thomas Mäder
Messages: 46
Registered: July 2009
Member
I've noticed that during startup of the workbench in 4.2 M5, multiple instances of HandlerServiceImpl are created. I would have thought there is only one. What is the scope of each instance?
I'm trying to manually activate a command via an EHandlerService injected into a JFace dialog but I'm not getting the instance I registered the handler into when I'm debugging through the KeyDownFilter in the KeyBindingDispatcher. How can I debug this?
Re: HandlerServiceImpl scoping [message #805075 is a reply to message #804486] Thu, 23 February 2012 09:55 Go to previous message
Thomas  Mäder is currently offline Thomas Mäder
Messages: 46
Registered: July 2009
Member
To answer my own question, I was foiled by the class org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener. It seems every context has their own EHandlerService and the shell activation listener was creating a new context for the dialogs shell. I had to set DIALOG_IGNORE_KEY into my shell's data in order to prevent this. I know this is internal, but I'm dont't know how else to populate the context that the shell activation listener creates; adding a shell listener might not work reliably, becuase I can't be sure that my shell listener will be called AFTER the workbench ShellActivationListener.

Any pointers are appreciated.
Previous Topic:How to use IResourcePool
Next Topic:Eclipse 4: how do perspectives work?
Goto Forum:
  


Current Time: Sat Oct 25 20:58:29 GMT 2014

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

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