提交 13c79c8c 编写于 作者: J Johannes Rieken

debt - remove some apparently unused service gymnastics

上级 f9c790a8
......@@ -61,7 +61,6 @@ const DEBUG_SELECTED_CONFIG_NAME_KEY = 'debug.selectedconfigname';
export class DebugService extends ee.EventEmitter implements debug.IDebugService {
public serviceId = debug.IDebugService;
private taskService: ITaskService;
private state: debug.State;
private session: session.RawDebugSession;
private model: model.Model;
......@@ -91,7 +90,8 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
@ILifecycleService private lifecycleService: ILifecycleService,
@IInstantiationService private instantiationService:IInstantiationService,
@IExtensionService private extensionService: IExtensionService,
@IMarkerService private markerService: IMarkerService
@IMarkerService private markerService: IMarkerService,
@ITaskService private taskService: ITaskService
) {
super();
......@@ -100,8 +100,6 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
this.debugStringEditorInputs = [];
this.session = null;
this.state = debug.State.Inactive;
// there is a cycle if taskService gets injected, use a workaround.
this.taskService = this.instantiationService.getInstance(ITaskService);
if (!this.contextService.getWorkspace()) {
this.state = debug.State.Disabled;
......
......@@ -37,7 +37,6 @@ import { IMarkerService, MarkerStatistics } from 'vs/platform/markers/common/mar
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IConfigurationService, ConfigurationServiceEventTypes } from 'vs/platform/configuration/common/configuration';
import { IFileService, FileChangesEvent, FileChangeType, EventType as FileEventType } from 'vs/platform/files/common/files';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IExtensionService } from 'vs/platform/extensions/common/extensions';
import { IModeService } from 'vs/editor/common/services/modeService';
......@@ -46,8 +45,6 @@ import { IModelService } from 'vs/editor/common/services/modelService';
import jsonContributionRegistry = require('vs/platform/jsonschemas/common/jsonContributionRegistry');
import { IJSONSchema } from 'vs/base/common/jsonSchema';
import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actionRegistry';
import { IStatusbarItem, IStatusbarRegistry, Extensions as StatusbarExtensions, StatusbarItemDescriptor, StatusbarAlignment } from 'vs/workbench/browser/parts/statusbar/statusbar';
import { IQuickOpenRegistry, Extensions as QuickOpenExtensions, QuickOpenHandlerDescriptor } from 'vs/workbench/browser/quickopen';
......@@ -792,16 +789,6 @@ class TaskService extends EventEmitter implements ITaskService {
}
}
export class TaskServiceParticipant implements IWorkbenchContribution {
constructor(@IInstantiationService private instantiationService: IInstantiationService) {
// Force loading the language worker service
this.instantiationService.getInstance(ITaskService);
}
public getId(): string {
return 'vs.taskService';
}
}
let tasksCategory = nls.localize('tasksCategory', "Tasks");
let workbenchActionsRegistry = <IWorkbenchActionRegistry>Registry.as(WorkbenchActionExtensions.WorkbenchActions);
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureTaskRunnerAction, ConfigureTaskRunnerAction.ID, ConfigureTaskRunnerAction.TEXT), tasksCategory);
......@@ -837,7 +824,7 @@ if (Env.enableTasks) {
let outputChannelRegistry = <IOutputChannelRegistry>Registry.as(OutputExt.OutputChannels);
outputChannelRegistry.registerChannel(TaskService.OutputChannelId, TaskService.OutputChannelLabel);
(<IWorkbenchContributionsRegistry>Registry.as(WorkbenchExtensions.Workbench)).registerWorkbenchContribution(TaskServiceParticipant);
// (<IWorkbenchContributionsRegistry>Registry.as(WorkbenchExtensions.Workbench)).registerWorkbenchContribution(TaskServiceParticipant);
// tasks.json validation
let schemaId = 'vscode://schemas/tasks';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册