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 05:33
Marco Naddeo is currently offline Marco Naddeo
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 IWorkspace object from the path?
Next Topic:How to debug a plug-in project?
Goto Forum:
  


Current Time: Sat Aug 02 02:51:57 EDT 2014

Powered by FUDForum. Page generated in 0.01636 seconds