/** * {@inheritDoc} */ public Object execute(final ExecutionEvent event) throws ExecutionException { return fDelegateHandler.execute(event); }
@Override public Object execute(final ExecutionEvent event) throws ExecutionException { if (loadHandler()) { if (!isEnabled()) { MessageDialog.openInformation(Util.getShellToParentOn(), WorkbenchMessages.Information, WorkbenchMessages.PluginAction_disabledMessage); return null; } return handler.execute(event); } if(loadException !=null) throw new ExecutionException("Exception occured when loading the handler", loadException); //$NON-NLS-1$ return null; }
@Override public void runWithEvent(Event event) { if (handler == null || !handler.isEnabled()) return; try { handleTargetSaveableChange(); } catch (InvocationTargetException e) { handle(e); return; } catch (InterruptedException e) { // Canceled so return return; } try { handler.execute(new ExecutionEvent(null, Collections.EMPTY_MAP, event, null)); } catch (ExecutionException e) { handle(e); } }
public void runWithEvent(Event event) { if (handler == null || !handler.isEnabled()) return; try { handleTargetSaveableChange(); } catch (InvocationTargetException e) { handle(e); return; } catch (InterruptedException e) { // Canceled so return return; } try { handler.execute(new ExecutionEvent(null, Collections.EMPTY_MAP, event, null)); } catch (ExecutionException e) { handle(e); } }
final Object returnValue = handler.execute(event); if (shouldFireEvents) { firePostExecuteSuccess(returnValue);
final Object returnValue = handler.execute(event); if (shouldFireEvents) { firePostExecuteSuccess(returnValue);
final Object returnValue = handler.execute(event); if (shouldFireEvents) { firePostExecuteSuccess(returnValue);
@Execute public Object execute(IEclipseContext context, @Optional @Named(HandlerServiceImpl.PARM_MAP) Map parms, @Optional Event trigger, @Optional IEvaluationContext staticContext) throws ExecutionException, NotHandledException { if (Policy.DEBUG_CMDS) { Activator.trace(Policy.DEBUG_CMDS_FLAG, "execute " + command + " and " //$NON-NLS-1$ //$NON-NLS-2$ + handler + " with: " + context, null); //$NON-NLS-1$ } IEvaluationContext appContext = staticContext; if (appContext == null) { appContext = new ExpressionContext(context); } ExecutionEvent event = new ExecutionEvent(command, parms == null ? Collections.EMPTY_MAP : parms, trigger, appContext); if (handler != null) { if (handler.isHandled()) { final Object returnValue = handler.execute(event); return returnValue; } throw new NotHandledException("Handler " + handler //$NON-NLS-1$ + " is not handled for for command " + command); //$NON-NLS-1$ } throw new NotHandledException("There is no handler to execute for command " + command); //$NON-NLS-1$ }
handler.execute(new ExecutionEvent(null, Collections.EMPTY_MAP, event, null)); } catch (ExecutionException e) { handle(e);
handler.execute(new ExecutionEvent(null, Collections.EMPTY_MAP, event, null)); } catch (ExecutionException e) { handle(e);