EditorSite:
final IDragAndDropService editorDTService = new EditorSiteDragAndDropServiceImpl();
serviceLocator.registerService(IDragAndDropService.class, editorDTService);
PartSite:
serviceLocator.registerService(IWorkbenchLocationService.class,
new WorkbenchLocationService(IServiceScopes.PARTSITE_SCOPE,
getWorkbenchWindow().getWorkbench(),
getWorkbenchWindow(), this, null, null, 2));
// added back for legacy reasons
serviceLocator.registerService(IWorkbenchPartSite.class, this);
Workbench:
final IContributionService contributionService = new ContributionService(getAdvisor());
serviceLocator.registerService(IContributionService.class,contributionService);
serviceLocator.registerService(ISaveablesLifecycleListener.class, new SaveablesList());
final CommandService [] commandService = new CommandService[1];
StartupThreading.runWithoutExceptions(new StartupRunnable() {
public void runWithException() {
commandService[0] = new CommandService(commandManager);
commandService[0].readRegistry();
final CommandImageManager commandImageManager = new CommandImageManager();
final CommandImageService commandImageService = new CommandImageService(
commandImageManager, commandService[0]);
commandImageService.readRegistry();
serviceLocator.registerService(ICommandImageService.class,
commandImageService);
final WorkbenchMenuService menuService = new WorkbenchMenuService(serviceLocator);
serviceLocator.registerService(IMenuService.class, menuService);
serviceLocator.registerService(ISelectionConversionService.class, new SelectionConversionService());
EditorSite: final IDragAndDropService editorDTService = new EditorSiteDragAndDropServiceImpl(); serviceLocator.registerService(IDragAndDropService.class, editorDTService);
PartSite: serviceLocator.registerService(IWorkbenchLocationService.class, new WorkbenchLocationService(IServiceScopes.PARTSITE_SCOPE, getWorkbenchWindow().getWorkbench(), getWorkbenchWindow(), this, null, null, 2)); // added back for legacy reasons serviceLocator.registerService(IWorkbenchPartSite.class, this);
Workbench: final IContributionService contributionService = new ContributionService(getAdvisor()); serviceLocator.registerService(IContributionService.class,contributionService);
serviceLocator.registerService(ISaveablesLifecycleListener.class, new SaveablesList());
final CommandService [] commandService = new CommandService[1]; StartupThreading.runWithoutExceptions(new StartupRunnable() {
serviceLocator.registerService(ICommandService.class, commandService[0]);
}});
final IContextService contextService = new ContextService( contextManager);
final IBindingService [] bindingService = new BindingService[1];
bindingService[0].readRegistryAndPreferences(commandService[0]); serviceLocator.registerService(IBindingService.class, bindingService[0]);
final CommandImageManager commandImageManager = new CommandImageManager(); final CommandImageService commandImageService = new CommandImageService( commandImageManager, commandService[0]); commandImageService.readRegistry(); serviceLocator.registerService(ICommandImageService.class, commandImageService);
final WorkbenchMenuService menuService = new WorkbenchMenuService(serviceLocator); serviceLocator.registerService(IMenuService.class, menuService);
serviceLocator.registerService(ISelectionConversionService.class, new SelectionConversionService());
serviceLocator.registerService(ISourceProviderService.class, sourceProviderService);
.getSourceProvider(ISources.ACTIVE_FOCUS_CONTROL_ID_NAME); serviceLocator.registerService(IFocusService.class, focusControl);
serviceLocator.registerService(IEvaluationService.class, evaluationService);
serviceLocator.registerService(IServiceLocatorCreator.class, slc); serviceLocator.registerService(IWorkbenchLocationService.class, new WorkbenchLocationService(IServiceScopes.WORKBENCH_SCOPE, this, null, null, null, null, 0)); // added back for legacy reasons serviceLocator.registerService(IWorkbench.class, this);
registration[0] = context.registerService(StartupMonitor.class .getName(), startupMonitor, properties);
WorkbenchWindow
serviceLocator.registerService(IWorkbenchLocationService.class, new WorkbenchLocationService(IServiceScopes.WINDOW_SCOPE, getWorkbench(), this, null, null, null, 1)); // added back for legacy reasons serviceLocator.registerService(IWorkbenchWindow.class, this);
serviceLocator.registerService(IActionCommandMappingService.class, mappingService);
serviceLocator.registerService(LegacyActionPersistence.class, actionPersistence);
MultiPageEditorSite
serviceLocator.registerService(IWorkbenchLocationService.class, new WorkbenchLocationService(IServiceScopes.MPESITE_SCOPE, getWorkbenchWindow().getWorkbench(), getWorkbenchWindow(), getMultiPageEditor().getSite(), this, null, 3)); serviceLocator.registerService(IMultiPageEditorSiteHolder.class, new IMultiPageEditorSiteHolder() { public MultiPageEditorSite getSite() { return MultiPageEditorSite.this; } });
PageSite serviceLocator.registerService(IWorkbenchLocationService.class, new WorkbenchLocationService(IServiceScopes.PAGESITE_SCOPE, getWorkbenchWindow().getWorkbench(), getWorkbenchWindow(), parentSite, null, this, 3)); serviceLocator.registerService(IPageSiteHolder.class, new IPageSiteHolder() { public IPageSite getSite() { return PageSite.this; } });