Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IEditorActionDelegate Equivalent
IEditorActionDelegate Equivalent [message #485555] Sun, 13 September 2009 14:09 Go to next message
Seth is currently offline SethFriend
Messages: 10
Registered: July 2009
Junior Member
I was just wandering, since I want to use Handlers instead of actions, is
there an equivalent to the above that uses handlers instead of actions? I
know i could simply get the current active editor, but that would involve
starting a ui thread, not hard but perhaps not desirable every single time
the action happens.
Re: IEditorActionDelegate Equivalent [message #485556 is a reply to message #485555] Sun, 13 September 2009 14:46 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
On Sun, 13 Sep 2009 14:09:59 +0000, Seth wrote:
> I was just wandering, since I want to use Handlers instead of actions,
> is there an equivalent to the above that uses handlers instead of
> actions? I know i could simply get the current active editor, but that
> would involve starting a ui thread, not hard but perhaps not desirable
> every single time the action happens.

When the handler is invoked (say, via a keybinding) you should be in the
UI thread already.

Regards,
Remy
Re: IEditorActionDelegate Equivalent [message #485689 is a reply to message #485555] Mon, 14 September 2009 13:35 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

you can use org.eclipse.ui.handlers.HandlerUtil.getActiveEditor(event) to extract the active editor from your execution event.

PW


Previous Topic:Programmatically Defining Keybinds
Next Topic:Perspective switch handle
Goto Forum:
  


Current Time: Thu Sep 26 06:49:22 GMT 2024

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

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

Back to the top