提交 ba029064 编写于 作者: D Dirk Baeumer

Clean up unused code

上级 fe12f6de
...@@ -1131,8 +1131,6 @@ export enum TaskPanelKind { ...@@ -1131,8 +1131,6 @@ export enum TaskPanelKind {
export class TaskGroup implements vscode.TaskGroup { export class TaskGroup implements vscode.TaskGroup {
private _id: string; private _id: string;
// @ts-ignore unused property
private _label: string;
public static Clean: TaskGroup = new TaskGroup('clean', 'Clean'); public static Clean: TaskGroup = new TaskGroup('clean', 'Clean');
...@@ -1142,15 +1140,14 @@ export class TaskGroup implements vscode.TaskGroup { ...@@ -1142,15 +1140,14 @@ export class TaskGroup implements vscode.TaskGroup {
public static Test: TaskGroup = new TaskGroup('test', 'Test'); public static Test: TaskGroup = new TaskGroup('test', 'Test');
constructor(id: string, label: string) { constructor(id: string, _label: string) {
if (typeof id !== 'string') { if (typeof id !== 'string') {
throw illegalArgument('name'); throw illegalArgument('name');
} }
if (typeof label !== 'string') { if (typeof _label !== 'string') {
throw illegalArgument('name'); throw illegalArgument('name');
} }
this._id = id; this._id = id;
this._label = label;
} }
get id(): string { get id(): string {
......
...@@ -200,8 +200,7 @@ export class QuickOpenActionContributor extends ActionBarContributor { ...@@ -200,8 +200,7 @@ export class QuickOpenActionContributor extends ActionBarContributor {
private action: CustomizeTaskAction; private action: CustomizeTaskAction;
// @ts-ignore unused injected service constructor( @ITaskService taskService: ITaskService, @IQuickOpenService quickOpenService: IQuickOpenService) {
constructor( @ITaskService private taskService: ITaskService, @IQuickOpenService private quickOpenService: IQuickOpenService) {
super(); super();
this.action = new CustomizeTaskAction(taskService, quickOpenService); this.action = new CustomizeTaskAction(taskService, quickOpenService);
} }
......
...@@ -297,18 +297,15 @@ export enum ProblemHandlingStrategy { ...@@ -297,18 +297,15 @@ export enum ProblemHandlingStrategy {
export class StartStopProblemCollector extends AbstractProblemCollector implements IProblemMatcher { export class StartStopProblemCollector extends AbstractProblemCollector implements IProblemMatcher {
private owners: string[]; private owners: string[];
// @ts-ignore unused property
private strategy: ProblemHandlingStrategy;
private currentOwner: string; private currentOwner: string;
private currentResource: 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); super(problemMatchers, markerService, modelService);
let ownerSet: { [key: string]: boolean; } = Object.create(null); let ownerSet: { [key: string]: boolean; } = Object.create(null);
problemMatchers.forEach(description => ownerSet[description.owner] = true); problemMatchers.forEach(description => ownerSet[description.owner] = true);
this.owners = Object.keys(ownerSet); this.owners = Object.keys(ownerSet);
this.strategy = strategy;
this.owners.forEach((owner) => { this.owners.forEach((owner) => {
this.recordResourcesToClean(owner); this.recordResourcesToClean(owner);
}); });
......
...@@ -47,8 +47,6 @@ import { IProgressService2, IProgressOptions, ProgressLocation } from 'vs/platfo ...@@ -47,8 +47,6 @@ import { IProgressService2, IProgressOptions, ProgressLocation } from 'vs/platfo
import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IWindowService } from 'vs/platform/windows/common/windows'; 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 { IModelService } from 'vs/editor/common/services/modelService';
import jsonContributionRegistry = require('vs/platform/jsonschemas/common/jsonContributionRegistry'); import jsonContributionRegistry = require('vs/platform/jsonschemas/common/jsonContributionRegistry');
...@@ -82,8 +80,6 @@ import { TerminalTaskSystem } from './terminalTaskSystem'; ...@@ -82,8 +80,6 @@ import { TerminalTaskSystem } from './terminalTaskSystem';
import { ProcessRunnerDetector } from 'vs/workbench/parts/tasks/node/processRunnerDetector'; import { ProcessRunnerDetector } from 'vs/workbench/parts/tasks/node/processRunnerDetector';
import { QuickOpenActionContributor } from '../browser/quickOpen'; 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 { Themable, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_FOREGROUND } from 'vs/workbench/common/theme';
import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IThemeService } from 'vs/platform/theme/common/themeService';
...@@ -122,8 +118,6 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem { ...@@ -122,8 +118,6 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
constructor( constructor(
@IPanelService private panelService: IPanelService, @IPanelService private panelService: IPanelService,
@IMarkerService private markerService: IMarkerService, @IMarkerService private markerService: IMarkerService,
// @ts-ignore unused injected service
@IOutputService private outputService: IOutputService,
@ITaskService private taskService: ITaskService, @ITaskService private taskService: ITaskService,
@IPartService private partService: IPartService, @IPartService private partService: IPartService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
...@@ -297,18 +291,8 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem { ...@@ -297,18 +291,8 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
class TaskStatusBarItem extends Themable implements IStatusbarItem { class TaskStatusBarItem extends Themable implements IStatusbarItem {
constructor( 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, @ITaskService private taskService: ITaskService,
// @ts-ignore unused injected service
@IPartService private partService: IPartService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
// @ts-ignore unused injected service
@IWorkspaceContextService private contextService: IWorkspaceContextService,
) { ) {
super(themeService); super(themeService);
} }
...@@ -481,8 +465,6 @@ class TaskService extends EventEmitter implements ITaskService { ...@@ -481,8 +465,6 @@ class TaskService extends EventEmitter implements ITaskService {
public static OutputChannelId: string = 'tasks'; public static OutputChannelId: string = 'tasks';
public static OutputChannelLabel: string = nls.localize('tasks', "Tasks"); public static OutputChannelLabel: string = nls.localize('tasks', "Tasks");
// @ts-ignore unused injected service
private modeService: IModeService;
private configurationService: IConfigurationService; private configurationService: IConfigurationService;
private markerService: IMarkerService; private markerService: IMarkerService;
private outputService: IOutputService; private outputService: IOutputService;
...@@ -513,7 +495,8 @@ class TaskService extends EventEmitter implements ITaskService { ...@@ -513,7 +495,8 @@ class TaskService extends EventEmitter implements ITaskService {
private _outputChannel: IOutputChannel; private _outputChannel: IOutputChannel;
constructor( @IModeService modeService: IModeService, @IConfigurationService configurationService: IConfigurationService, constructor(
@IConfigurationService configurationService: IConfigurationService,
@IMarkerService markerService: IMarkerService, @IOutputService outputService: IOutputService, @IMarkerService markerService: IMarkerService, @IOutputService outputService: IOutputService,
@IMessageService messageService: IMessageService, @IChoiceService choiceService: IChoiceService, @IMessageService messageService: IMessageService, @IChoiceService choiceService: IChoiceService,
@IWorkbenchEditorService editorService: IWorkbenchEditorService, @IWorkbenchEditorService editorService: IWorkbenchEditorService,
...@@ -522,11 +505,8 @@ class TaskService extends EventEmitter implements ITaskService { ...@@ -522,11 +505,8 @@ class TaskService extends EventEmitter implements ITaskService {
@ILifecycleService lifecycleService: ILifecycleService, @ILifecycleService lifecycleService: ILifecycleService,
@IModelService modelService: IModelService, @IExtensionService extensionService: IExtensionService, @IModelService modelService: IModelService, @IExtensionService extensionService: IExtensionService,
@IQuickOpenService quickOpenService: IQuickOpenService, @IQuickOpenService quickOpenService: IQuickOpenService,
// @ts-ignore unused injected service
@IEnvironmentService private environmentService: IEnvironmentService,
@IConfigurationResolverService private configurationResolverService: IConfigurationResolverService, @IConfigurationResolverService private configurationResolverService: IConfigurationResolverService,
@ITerminalService private terminalService: ITerminalService, @ITerminalService private terminalService: ITerminalService,
@IWorkbenchEditorService private workbenchEditorService: IWorkbenchEditorService,
@IStorageService private storageService: IStorageService, @IStorageService private storageService: IStorageService,
@IProgressService2 private progressService: IProgressService2, @IProgressService2 private progressService: IProgressService2,
@IOpenerService private openerService: IOpenerService, @IOpenerService private openerService: IOpenerService,
...@@ -534,7 +514,6 @@ class TaskService extends EventEmitter implements ITaskService { ...@@ -534,7 +514,6 @@ class TaskService extends EventEmitter implements ITaskService {
) { ) {
super(); super();
this.modeService = modeService;
this.configurationService = configurationService; this.configurationService = configurationService;
this.markerService = markerService; this.markerService = markerService;
this.outputService = outputService; this.outputService = outputService;
...@@ -1272,13 +1251,12 @@ class TaskService extends EventEmitter implements ITaskService { ...@@ -1272,13 +1251,12 @@ class TaskService extends EventEmitter implements ITaskService {
this._taskSystem = new TerminalTaskSystem( this._taskSystem = new TerminalTaskSystem(
this.terminalService, this.outputService, this.markerService, this.terminalService, this.outputService, this.markerService,
this.modelService, this.configurationResolverService, this.telemetryService, this.modelService, this.configurationResolverService, this.telemetryService,
this.workbenchEditorService, this.contextService, this.contextService, TaskService.OutputChannelId
TaskService.OutputChannelId
); );
} else { } else {
let system = new ProcessTaskSystem( let system = new ProcessTaskSystem(
this.markerService, this.modelService, this.telemetryService, this.outputService, this.markerService, this.modelService, this.telemetryService, this.outputService,
this.configurationResolverService, this.contextService, TaskService.OutputChannelId, this.configurationResolverService, TaskService.OutputChannelId,
); );
system.hasErrors(this._configHasErrors); system.hasErrors(this._configHasErrors);
this._taskSystem = system; this._taskSystem = system;
...@@ -1992,8 +1970,7 @@ class TaskService extends EventEmitter implements ITaskService { ...@@ -1992,8 +1970,7 @@ class TaskService extends EventEmitter implements ITaskService {
}; };
let promise = this.getTasksForGroup(TaskGroup.Build).then((tasks) => { let promise = this.getTasksForGroup(TaskGroup.Build).then((tasks) => {
if (tasks.length > 0) { if (tasks.length > 0) {
// @ts-ignore unused local let { defaults, users } = this.splitPerGroupType(tasks);
let { none, defaults, users } = this.splitPerGroupType(tasks);
if (defaults.length === 1) { if (defaults.length === 1) {
this.run(defaults[0]); this.run(defaults[0]);
return; return;
...@@ -2037,8 +2014,7 @@ class TaskService extends EventEmitter implements ITaskService { ...@@ -2037,8 +2014,7 @@ class TaskService extends EventEmitter implements ITaskService {
}; };
let promise = this.getTasksForGroup(TaskGroup.Test).then((tasks) => { let promise = this.getTasksForGroup(TaskGroup.Test).then((tasks) => {
if (tasks.length > 0) { if (tasks.length > 0) {
// @ts-ignore unused local let { defaults, users } = this.splitPerGroupType(tasks);
let { none, defaults, users } = this.splitPerGroupType(tasks);
if (defaults.length === 1) { if (defaults.length === 1) {
this.run(defaults[0]); this.run(defaults[0]);
return; return;
......
...@@ -27,7 +27,6 @@ import { ProblemMatcher, ProblemMatcherRegistry /*, ProblemPattern, getResource ...@@ -27,7 +27,6 @@ import { ProblemMatcher, ProblemMatcherRegistry /*, ProblemPattern, getResource
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; 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 { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver';
import { ITerminalService, ITerminalInstance, IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal'; import { ITerminalService, ITerminalInstance, IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal';
import { IOutputService, IOutputChannel } from 'vs/workbench/parts/output/common/output'; import { IOutputService, IOutputChannel } from 'vs/workbench/parts/output/common/output';
...@@ -63,8 +62,6 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { ...@@ -63,8 +62,6 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem {
private markerService: IMarkerService, private modelService: IModelService, private markerService: IMarkerService, private modelService: IModelService,
private configurationResolverService: IConfigurationResolverService, private configurationResolverService: IConfigurationResolverService,
private telemetryService: ITelemetryService, private telemetryService: ITelemetryService,
// @ts-ignore unused injected service
private workbenchEditorService: IWorkbenchEditorService,
private contextService: IWorkspaceContextService, private contextService: IWorkspaceContextService,
outputChannelId: string) { outputChannelId: string) {
super(); super();
......
...@@ -24,7 +24,6 @@ import { IMarkerService } from 'vs/platform/markers/common/markers'; ...@@ -24,7 +24,6 @@ import { IMarkerService } from 'vs/platform/markers/common/markers';
import { IModelService } from 'vs/editor/common/services/modelService'; import { IModelService } from 'vs/editor/common/services/modelService';
import { ProblemMatcher, ProblemMatcherRegistry } from 'vs/platform/markers/common/problemMatcher'; import { ProblemMatcher, ProblemMatcherRegistry } from 'vs/platform/markers/common/problemMatcher';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; 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 { StartStopProblemCollector, WatchingProblemCollector, ProblemCollectorEvents } from 'vs/workbench/parts/tasks/common/problemCollectors';
import { import {
...@@ -44,8 +43,6 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { ...@@ -44,8 +43,6 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem {
private outputService: IOutputService; private outputService: IOutputService;
private telemetryService: ITelemetryService; private telemetryService: ITelemetryService;
private configurationResolverService: IConfigurationResolverService; private configurationResolverService: IConfigurationResolverService;
// @ts-ignore unused injected service
private contextService: IWorkspaceContextService;
private outputChannel: IOutputChannel; private outputChannel: IOutputChannel;
...@@ -55,12 +52,11 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { ...@@ -55,12 +52,11 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem {
private activeTaskPromise: TPromise<ITaskSummary>; private activeTaskPromise: TPromise<ITaskSummary>;
constructor(markerService: IMarkerService, modelService: IModelService, telemetryService: ITelemetryService, constructor(markerService: IMarkerService, modelService: IModelService, telemetryService: ITelemetryService,
outputService: IOutputService, configurationResolverService: IConfigurationResolverService, contextService: IWorkspaceContextService, outputChannelId: string) { outputService: IOutputService, configurationResolverService: IConfigurationResolverService, outputChannelId: string) {
super(); super();
this.markerService = markerService; this.markerService = markerService;
this.modelService = modelService; this.modelService = modelService;
this.outputService = outputService; this.outputService = outputService;
this.contextService = contextService;
this.telemetryService = telemetryService; this.telemetryService = telemetryService;
this.configurationResolverService = configurationResolverService; this.configurationResolverService = configurationResolverService;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册