@Override public void init(final IWorkbench workbench) { activityManager = workbench.getActivitySupport().getActivityManager(); bindingService = workbench.getService(IBindingService.class); commandService = workbench.getService(ICommandService.class); contextService = workbench.getService(IContextService.class); }
@Override public void init(IWorkbench workbench) { keyController = new KeyController(); keyController.init(workbench); commandService = workbench.getService(ICommandService.class); fDefaultCategory = commandService.getCategory(null); fBindingService = workbench.getService(IBindingService.class); commandImageService = workbench.getService(ICommandImageService.class); }
private void clearExpressions() { IEvaluationService evaluationService = PlatformUI .getWorkbench().getService(IEvaluationService.class); Iterator<IEvaluationReference> i = refsByActivityDefinition.values().iterator(); while (i.hasNext()) { IEvaluationReference ref = i.next(); evaluationService.removeEvaluationListener(ref); } refsByActivityDefinition.clear(); }
EHandlerService getEHandlerService() { if (ehandlerService == null) { if (currentSnapshot instanceof ExpressionContext) { IEclipseContext ctx = ((ExpressionContext) currentSnapshot).eclipseContext; ehandlerService = ctx.get(EHandlerService.class); } else { ehandlerService = PlatformUI.getWorkbench().getService( EHandlerService.class); } } return ehandlerService; }
ICommandService getCommandService() { if (commandService == null) { if (currentSnapshot instanceof ExpressionContext) { IEclipseContext ctx = ((ExpressionContext) currentSnapshot).eclipseContext; commandService = ctx.get(ICommandService.class); } else { commandService = PlatformUI.getWorkbench().getService( ICommandService.class); } } return commandService; }
public ICommandImageService getCommandImageService() { if (commandImageService == null) { if (currentSnapshot instanceof ExpressionContext) { IEclipseContext ctx = ((ExpressionContext) currentSnapshot).eclipseContext; commandImageService = ctx.get(ICommandImageService.class); } else { commandImageService = PlatformUI.getWorkbench().getService(ICommandImageService.class); } } return commandImageService; }
@Override public IStatus runInUIThread(IProgressMonitor monitor) { IMenuService service = PlatformUI.getWorkbench() .getService(IMenuService.class); service.releaseContributions((ContributionManager) managerM); return Status.OK_STATUS; }
private boolean getCustomThemeFlag() { IThemeEngine engine = PlatformUI.getWorkbench().getService(IThemeEngine.class); if (engine != null) { ITheme activeTheme = engine.getActiveTheme(); if (activeTheme != null) { return !DEFAULT_THEME.equals(activeTheme.getId()); } } return false; } }
public static boolean isUpdateManagerInstallerPresent() { ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); Command command = commandService.getCommand(UPDATE_MANAGER_FIND_AND_INSTALL); return command.isDefined(); }
private ParameterizedCommand getParametrizedCommand(String workbenchCommand) { final ICommandService commandService = window.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(workbenchCommand); ParameterizedCommand parameterizedCommand = new ParameterizedCommand(command, null); return parameterizedCommand; }
@Override protected ParameterizedCommand getForwardCommand() { final ICommandService commandService = window.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(ORG_ECLIPSE_UI_WINDOW_OPEN_EDITOR_DROP_DOWN); ParameterizedCommand commandF = new ParameterizedCommand(command, null); return commandF; }
@Override protected ParameterizedCommand getForwardCommand() { final ICommandService commandService = window.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(IWorkbenchCommandConstants.WINDOW_NEXT_PERSPECTIVE); ParameterizedCommand commandF = new ParameterizedCommand(command, null); return commandF; }
@Override protected void fillMenu(IMenuManager menu) { if (!(menu instanceof ContributionManager)) { return; } IMenuService service = PlatformUI.getWorkbench() .getService(IMenuService.class); service.populateContributionManager((ContributionManager) menu, locationURI); menu.addMenuListener(QuickMenuHandler.this); }
@Override protected ParameterizedCommand getForwardCommand() { final ICommandService commandService = window.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(IWorkbenchCommandConstants.WINDOW_NEXT_EDITOR); ParameterizedCommand commandF = new ParameterizedCommand(command, null); return commandF; }
@Override public void init(IWorkbench workbench) { MApplication application = workbench.getService(MApplication.class); IEclipseContext context = application.getContext(); defaultTheme = (String) context.get(E4Application.THEME_ID); engine = context.get(IThemeEngine.class); }
@Override protected ParameterizedCommand getBackwardCommand() { final ICommandService commandService = window .getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(IWorkbenchCommandConstants.NAVIGATE_PREVIOUS_PAGE); ParameterizedCommand commandF = new ParameterizedCommand(command, null); return commandF; }
@Override protected ParameterizedCommand getBackwardCommand() { final ICommandService commandService = window.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(IWorkbenchCommandConstants.WINDOW_PREVIOUS_PERSPECTIVE); ParameterizedCommand commandBack = new ParameterizedCommand(command, null); return commandBack; }
public NestedProjectsContentProvider() { ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); this.projectPresetionCommand = commandService.getCommand(ProjectPresentationHandler.COMMAND_ID); try { HandlerUtil.updateRadioState(this.projectPresetionCommand, Boolean.TRUE.toString()); } catch (ExecutionException ex) { WorkbenchNavigatorPlugin.log(ex.getMessage(), new Status(IStatus.ERROR, WorkbenchNavigatorPlugin.PLUGIN_ID, ex.getMessage(), ex)); } ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); }
@Override public void init(IWorkbench workbench, IStructuredSelection currentSelection) { eventBroker = workbench.getService(IEventBroker.class); setWindowTitle(PreferencesMessages.PreferencesImportWizard_import); setDefaultPageImageDescriptor(WorkbenchImages .getImageDescriptor(IWorkbenchGraphicConstants.IMG_WIZBAN_IMPORT_PREF_WIZ)); setNeedsProgressMonitor(true); }
private IWorkbenchWindow getActiveWindow() { final Shell newActiveShell = workbench.getDisplay().getActiveShell(); final IContextService contextService = workbench .getService(IContextService.class); if (contextService != null) { final int shellType = contextService.getShellType(newActiveShell); if (shellType != IContextService.TYPE_DIALOG) { return workbench.getActiveWorkbenchWindow(); } } return null; }