Search in sources :

Example 1 with AbstractHandler

use of org.eclipse.core.commands.AbstractHandler in project dbeaver by serge-rider.

the class CheckForUpdateAction method deactivateStandardHandler.

public static void deactivateStandardHandler(IWorkbenchWindow window) {
    if (p2UpdateHandlerActivation != null) {
        return;
    }
    IHandlerService srv = window.getService(IHandlerService.class);
    p2UpdateHandlerActivation = srv.activateHandler(CheckForUpdateAction.P2_UPDATE_COMMAND, new AbstractHandler() {

        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
            new CheckForUpdateAction().run();
            return null;
        }
    });
}
Also used : IHandlerService(org.eclipse.ui.handlers.IHandlerService) ExecutionEvent(org.eclipse.core.commands.ExecutionEvent) AbstractHandler(org.eclipse.core.commands.AbstractHandler)

Aggregations

AbstractHandler (org.eclipse.core.commands.AbstractHandler)1 ExecutionEvent (org.eclipse.core.commands.ExecutionEvent)1 IHandlerService (org.eclipse.ui.handlers.IHandlerService)1