MikeR13 / MAS

Masterthesis
0 stars 0 forks source link

E3 Standard-Services auflisten (siehe unten) #123

Closed MikeR13 closed 11 years ago

MikeR13 commented 11 years ago

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();

serviceLocator.registerService(ICommandService.class, commandService[0]);

}});

final IContextService contextService = new ContextService( contextManager);

    StartupThreading.runWithoutExceptions(new StartupRunnable() {

        public void runWithException() {
            contextService.readRegistry();
            }});

    serviceLocator.registerService(IContextService.class, contextService);

final IBindingService [] bindingService = new BindingService[1];

    StartupThreading.runWithoutExceptions(new StartupRunnable() {

        public void runWithException() {
            BindingManager.DEBUG = Policy.DEBUG_KEY_BINDINGS;
            bindingManager = new BindingManager(contextManager, commandManager);
            bindingService[0] = new BindingService(
                    bindingManager, commandService[0], Workbench.this);

        }});

bindingService[0].readRegistryAndPreferences(commandService[0]); serviceLocator.registerService(IBindingService.class, bindingService[0]);

((BindingService) bindingService[0]).getKeyboard().getKeyDownFilter().setEnabled(true);

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);

FocusControlSourceProvider focusControl = (FocusControlSourceProvider) 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);

    final ActionCommandMappingService mappingService = new ActionCommandMappingService();

serviceLocator.registerService(IActionCommandMappingService.class, mappingService);

    final LegacyActionPersistence actionPersistence = new LegacyActionPersistence(
            this);

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; } });