| [news.eclipse.platform.rcp] Re: Declarative DoubleClickListener? |
Is there a way to associate a handler with a double-click event via the plugin.xml?
No.
This is the code (in a ViewPart) that I'd like to get rid of:
viewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
try {
handlerService.executeCommand(TestHandler.ID, null);
}
catch (Exception e) {
throw new RuntimeException("Can't execute", e);
}
}
});