@Override public Object getService(@SuppressWarnings("rawtypes") Class api) { return site.getService(api); }
@Override public void activated() { // add EOF submissions IPageSite site = fPage.getSite(); if(fActivatedContext == null && fActivatedHandler == null) { IHandlerService handlerService = site.getService(IHandlerService.class); IContextService contextService = site.getService(IContextService.class); fActivatedContext = contextService.activateContext(fContextId); fActivatedHandler = handlerService.activateHandler("org.eclipse.debug.ui.commands.eof", fEOFHandler); //$NON-NLS-1$ } }
@Override public void deactivated() { // remove EOF submissions IPageSite site = fPage.getSite(); IHandlerService handlerService = site.getService(IHandlerService.class); IContextService contextService = site.getService(IContextService.class); handlerService.deactivateHandler(fActivatedHandler); contextService.deactivateContext(fActivatedContext); fActivatedContext = null; fActivatedHandler = null; }
.getService(ICommandService.class); IHandlerService hsrv = (IHandlerService) site .getService(IHandlerService.class); Command cmd = srv.getCommand(HistoryViewCommands.SHOWVERSIONS); Parameterization[] parms;
@Override public void createControl(Composite parent) { super.createControl(parent); IActionBars bars= getSite().getActionBars(); IMenuManager menu= bars.getMenuManager(); menu.add(fToggleLinkingAction); IHandlerService handlerService= getSite().getService(IHandlerService.class); handlerService.activateHandler(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR, new ActionHandler(fToggleLinkingAction)); }
@Override public void createControl(Composite parent) { super.createControl(parent); IActionBars bars= getSite().getActionBars(); IMenuManager menu= bars.getMenuManager(); menu.add(fToggleLinkingAction); IHandlerService handlerService= getSite().getService(IHandlerService.class); handlerService.activateHandler(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR, new ActionHandler(fToggleLinkingAction)); }
IHandlerService handlerService= site.getService(IHandlerService.class); handlerService.activateHandler(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR, new ActionHandler(fToggleLinkingAction)); handlerService.activateHandler(CollapseAllHandler.COMMAND_ID, new ActionHandler(fCollapseAllAction));
IHandlerService handlerService= site.getService(IHandlerService.class); handlerService.activateHandler(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR, new ActionHandler(fToggleLinkingAction)); handlerService.activateHandler(CollapseAllHandler.COMMAND_ID, new ActionHandler(fCollapseAllAction));