diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 126fd66d08c..2ce4bbaa1db 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1131,8 +1131,6 @@ export enum TaskPanelKind { export class TaskGroup implements vscode.TaskGroup { private _id: string; - // @ts-ignore unused property - private _label: string; public static Clean: TaskGroup = new TaskGroup('clean', 'Clean'); @@ -1142,15 +1140,14 @@ export class TaskGroup implements vscode.TaskGroup { public static Test: TaskGroup = new TaskGroup('test', 'Test'); - constructor(id: string, label: string) { + constructor(id: string, _label: string) { if (typeof id !== 'string') { throw illegalArgument('name'); } - if (typeof label !== 'string') { + if (typeof _label !== 'string') { throw illegalArgument('name'); } this._id = id; - this._label = label; } get id(): string { diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index d534e3707c7..141fde0334b 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -200,8 +200,7 @@ export class QuickOpenActionContributor extends ActionBarContributor { private action: CustomizeTaskAction; - // @ts-ignore unused injected service - constructor( @ITaskService private taskService: ITaskService, @IQuickOpenService private quickOpenService: IQuickOpenService) { + constructor( @ITaskService taskService: ITaskService, @IQuickOpenService quickOpenService: IQuickOpenService) { super(); this.action = new CustomizeTaskAction(taskService, quickOpenService); } diff --git a/src/vs/workbench/parts/tasks/common/problemCollectors.ts b/src/vs/workbench/parts/tasks/common/problemCollectors.ts index c6222b5902a..f3f4621ab7e 100644 --- a/src/vs/workbench/parts/tasks/common/problemCollectors.ts +++ b/src/vs/workbench/parts/tasks/common/problemCollectors.ts @@ -297,18 +297,15 @@ export enum ProblemHandlingStrategy { export class StartStopProblemCollector extends AbstractProblemCollector implements IProblemMatcher { private owners: string[]; - // @ts-ignore unused property - private strategy: ProblemHandlingStrategy; private currentOwner: string; private currentResource: string; - constructor(problemMatchers: ProblemMatcher[], markerService: IMarkerService, modelService: IModelService, strategy: ProblemHandlingStrategy = ProblemHandlingStrategy.Clean) { + constructor(problemMatchers: ProblemMatcher[], markerService: IMarkerService, modelService: IModelService, _strategy: ProblemHandlingStrategy = ProblemHandlingStrategy.Clean) { super(problemMatchers, markerService, modelService); let ownerSet: { [key: string]: boolean; } = Object.create(null); problemMatchers.forEach(description => ownerSet[description.owner] = true); this.owners = Object.keys(ownerSet); - this.strategy = strategy; this.owners.forEach((owner) => { this.recordResourcesToClean(owner); }); diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 4eb99abea9a..b487239dcc2 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -47,8 +47,6 @@ import { IProgressService2, IProgressOptions, ProgressLocation } from 'vs/platfo import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IWindowService } from 'vs/platform/windows/common/windows'; - -import { IModeService } from 'vs/editor/common/services/modeService'; import { IModelService } from 'vs/editor/common/services/modelService'; import jsonContributionRegistry = require('vs/platform/jsonschemas/common/jsonContributionRegistry'); @@ -82,8 +80,6 @@ import { TerminalTaskSystem } from './terminalTaskSystem'; import { ProcessRunnerDetector } from 'vs/workbench/parts/tasks/node/processRunnerDetector'; import { QuickOpenActionContributor } from '../browser/quickOpen'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; - import { Themable, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_FOREGROUND } from 'vs/workbench/common/theme'; import { IThemeService } from 'vs/platform/theme/common/themeService'; @@ -122,8 +118,6 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem { constructor( @IPanelService private panelService: IPanelService, @IMarkerService private markerService: IMarkerService, - // @ts-ignore unused injected service - @IOutputService private outputService: IOutputService, @ITaskService private taskService: ITaskService, @IPartService private partService: IPartService, @IThemeService themeService: IThemeService, @@ -297,18 +291,8 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem { class TaskStatusBarItem extends Themable implements IStatusbarItem { constructor( - // @ts-ignore unused injected service - @IPanelService private panelService: IPanelService, - // @ts-ignore unused injected service - @IMarkerService private markerService: IMarkerService, - // @ts-ignore unused injected service - @IOutputService private outputService: IOutputService, @ITaskService private taskService: ITaskService, - // @ts-ignore unused injected service - @IPartService private partService: IPartService, @IThemeService themeService: IThemeService, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService, ) { super(themeService); } @@ -481,8 +465,6 @@ class TaskService extends EventEmitter implements ITaskService { public static OutputChannelId: string = 'tasks'; public static OutputChannelLabel: string = nls.localize('tasks', "Tasks"); - // @ts-ignore unused injected service - private modeService: IModeService; private configurationService: IConfigurationService; private markerService: IMarkerService; private outputService: IOutputService; @@ -513,7 +495,8 @@ class TaskService extends EventEmitter implements ITaskService { private _outputChannel: IOutputChannel; - constructor( @IModeService modeService: IModeService, @IConfigurationService configurationService: IConfigurationService, + constructor( + @IConfigurationService configurationService: IConfigurationService, @IMarkerService markerService: IMarkerService, @IOutputService outputService: IOutputService, @IMessageService messageService: IMessageService, @IChoiceService choiceService: IChoiceService, @IWorkbenchEditorService editorService: IWorkbenchEditorService, @@ -522,11 +505,8 @@ class TaskService extends EventEmitter implements ITaskService { @ILifecycleService lifecycleService: ILifecycleService, @IModelService modelService: IModelService, @IExtensionService extensionService: IExtensionService, @IQuickOpenService quickOpenService: IQuickOpenService, - // @ts-ignore unused injected service - @IEnvironmentService private environmentService: IEnvironmentService, @IConfigurationResolverService private configurationResolverService: IConfigurationResolverService, @ITerminalService private terminalService: ITerminalService, - @IWorkbenchEditorService private workbenchEditorService: IWorkbenchEditorService, @IStorageService private storageService: IStorageService, @IProgressService2 private progressService: IProgressService2, @IOpenerService private openerService: IOpenerService, @@ -534,7 +514,6 @@ class TaskService extends EventEmitter implements ITaskService { ) { super(); - this.modeService = modeService; this.configurationService = configurationService; this.markerService = markerService; this.outputService = outputService; @@ -1272,13 +1251,12 @@ class TaskService extends EventEmitter implements ITaskService { this._taskSystem = new TerminalTaskSystem( this.terminalService, this.outputService, this.markerService, this.modelService, this.configurationResolverService, this.telemetryService, - this.workbenchEditorService, this.contextService, - TaskService.OutputChannelId + this.contextService, TaskService.OutputChannelId ); } else { let system = new ProcessTaskSystem( this.markerService, this.modelService, this.telemetryService, this.outputService, - this.configurationResolverService, this.contextService, TaskService.OutputChannelId, + this.configurationResolverService, TaskService.OutputChannelId, ); system.hasErrors(this._configHasErrors); this._taskSystem = system; @@ -1992,8 +1970,7 @@ class TaskService extends EventEmitter implements ITaskService { }; let promise = this.getTasksForGroup(TaskGroup.Build).then((tasks) => { if (tasks.length > 0) { - // @ts-ignore unused local - let { none, defaults, users } = this.splitPerGroupType(tasks); + let { defaults, users } = this.splitPerGroupType(tasks); if (defaults.length === 1) { this.run(defaults[0]); return; @@ -2037,8 +2014,7 @@ class TaskService extends EventEmitter implements ITaskService { }; let promise = this.getTasksForGroup(TaskGroup.Test).then((tasks) => { if (tasks.length > 0) { - // @ts-ignore unused local - let { none, defaults, users } = this.splitPerGroupType(tasks); + let { defaults, users } = this.splitPerGroupType(tasks); if (defaults.length === 1) { this.run(defaults[0]); return; diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index a5cec7639db..a713b785fb9 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -27,7 +27,6 @@ import { ProblemMatcher, ProblemMatcherRegistry /*, ProblemPattern, getResource import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver'; import { ITerminalService, ITerminalInstance, IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal'; import { IOutputService, IOutputChannel } from 'vs/workbench/parts/output/common/output'; @@ -63,8 +62,6 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { private markerService: IMarkerService, private modelService: IModelService, private configurationResolverService: IConfigurationResolverService, private telemetryService: ITelemetryService, - // @ts-ignore unused injected service - private workbenchEditorService: IWorkbenchEditorService, private contextService: IWorkspaceContextService, outputChannelId: string) { super(); diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 2f03ec2ff94..6018a076566 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -24,7 +24,6 @@ import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ProblemMatcher, ProblemMatcherRegistry } from 'vs/platform/markers/common/problemMatcher'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { StartStopProblemCollector, WatchingProblemCollector, ProblemCollectorEvents } from 'vs/workbench/parts/tasks/common/problemCollectors'; import { @@ -44,8 +43,6 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { private outputService: IOutputService; private telemetryService: ITelemetryService; private configurationResolverService: IConfigurationResolverService; - // @ts-ignore unused injected service - private contextService: IWorkspaceContextService; private outputChannel: IOutputChannel; @@ -55,12 +52,11 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { private activeTaskPromise: TPromise; constructor(markerService: IMarkerService, modelService: IModelService, telemetryService: ITelemetryService, - outputService: IOutputService, configurationResolverService: IConfigurationResolverService, contextService: IWorkspaceContextService, outputChannelId: string) { + outputService: IOutputService, configurationResolverService: IConfigurationResolverService, outputChannelId: string) { super(); this.markerService = markerService; this.modelService = modelService; this.outputService = outputService; - this.contextService = contextService; this.telemetryService = telemetryService; this.configurationResolverService = configurationResolverService;