|
Pegar evento do ctr+space do Editor |
|
|
|
|
Escrito por Administrator
|
|
Qua, 07 de Julho de 2010 13:29 |
|
private IExecutionListener listener = new IExecutionListener() { public void notHandled(String commandId, NotHandledException exception) { insertTab(); }
public void postExecuteFailure(String commandId, ExecutionException exception) { insertTab(); }
public void postExecuteSuccess(String commandId, Object returnValue) { insertTab(); }
public void preExecute(String commandId, ExecutionEvent event) { saveEvent(commandId, event); } }; /** * Add the execution listener. */ public void startListener() { ICommandService cs = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); if (cs != null) { cs.addExecutionListener(listener); } }
|