Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to get Resource from Handler?
How to get Resource from Handler? [message #1001757] Thu, 17 January 2013 10:33
Marco Naddeo is currently offline Marco NaddeoFriend
Messages: 62
Registered: November 2012
Member
Hi Smile

I have to implement a handler for a context menu command, activable from the opened editor.

In this way:

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {

  System.out.println(HandlerUtil.getActiveEditorInputChecked(event).getName());
  return null;

}


I print on the console the name of opened (and selected) file in the editor.

But how can I obtain the corresponding Resource?

Is there a way to obtain it using, for example, HandlerUtil?


Thanks in advance. Smile

Marco
Previous Topic:How to get event on eclipse plugin installation / updation ?
Next Topic:How to format a <tool>`s <option>`s tip text?
Goto Forum:
  


Current Time: Wed Aug 23 08:10:49 GMT 2017

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

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