From 7bf5879ce094f61c3275e29b4f2ffd059f29fee6 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 7 Nov 2017 18:55:59 +0100 Subject: [PATCH] tslint input for #37212 --- src/vs/base/browser/ui/findinput/findInput.ts | 3 +- src/vs/base/browser/ui/inputbox/inputBox.ts | 5 --- .../browser/ui/progressbar/progressbar.ts | 7 ---- src/vs/base/browser/ui/sash/sash.ts | 21 +++--------- src/vs/base/browser/ui/selectBox/selectBox.ts | 3 -- src/vs/base/common/async.ts | 3 +- .../parts/quickopen/common/quickOpenScorer.ts | 3 +- src/vs/code/electron-main/app.ts | 3 +- src/vs/code/electron-main/menus.ts | 6 ++-- src/vs/code/electron-main/windows.ts | 7 ++-- .../backup/electron-main/backupMainService.ts | 6 ++-- .../electron-main/backupMainService.test.ts | 4 +-- .../lifecycle/electron-main/lifecycleMain.ts | 3 -- .../browser/actions/workspaceActions.ts | 4 +-- src/vs/workbench/browser/part.ts | 3 +- .../parts/activitybar/activitybarPart.ts | 6 ---- .../browser/parts/editor/editorActions.ts | 2 -- .../browser/parts/editor/editorPicker.ts | 3 -- .../browser/parts/editor/editorStatus.ts | 2 -- .../browser/parts/editor/textDiffEditor.ts | 4 +-- .../browser/parts/editor/textEditor.ts | 10 ------ .../parts/editor/textResourceEditor.ts | 4 +-- .../parts/quickopen/quickOpenController.ts | 14 +------- src/vs/workbench/browser/quickopen.ts | 32 +------------------ src/vs/workbench/electron-browser/actions.ts | 5 --- src/vs/workbench/electron-browser/window.ts | 10 +----- .../workbench/electron-browser/workbench.ts | 3 -- .../files/browser/editors/textFileEditor.ts | 4 +-- .../files/browser/fileActions.contribution.ts | 8 +---- .../parts/files/browser/fileActions.ts | 12 +------ .../files/browser/fileResultsNavigation.ts | 5 --- .../parts/files/browser/files.contribution.ts | 7 +--- .../parts/files/browser/views/explorerView.ts | 7 ---- .../files/browser/views/explorerViewer.ts | 20 ++---------- .../files/common/editors/fileEditorTracker.ts | 10 ++---- .../parts/output/browser/outputPanel.ts | 4 +-- .../parts/output/browser/outputServices.ts | 4 +-- .../preferences/browser/preferencesEditor.ts | 7 ++-- .../quickopen/browser/commandsHandler.ts | 29 +---------------- .../relauncher.contribution.ts | 3 -- .../parts/search/browser/openFileHandler.ts | 2 -- .../search/browser/patternInputWidget.ts | 3 +- .../services/backup/node/backupFileService.ts | 4 +-- .../test/node/backupFileService.test.ts | 14 -------- .../editor/test/browser/editorService.test.ts | 3 -- .../services/history/browser/history.ts | 4 --- .../common/textModelResolverService.ts | 2 -- .../test/browser/actionRegistry.test.ts | 8 ----- .../parts/editor/editorStacksModel.test.ts | 2 +- .../common/editor/editorDiffModel.test.ts | 7 ---- .../workbench/test/workbenchTestServices.ts | 5 +-- 51 files changed, 43 insertions(+), 307 deletions(-) diff --git a/src/vs/base/browser/ui/findinput/findInput.ts b/src/vs/base/browser/ui/findinput/findInput.ts index 958297431e2..fe0788dbf3a 100644 --- a/src/vs/base/browser/ui/findinput/findInput.ts +++ b/src/vs/base/browser/ui/findinput/findInput.ts @@ -268,8 +268,7 @@ export class FindInput extends Widget { placeholder: this.placeholder || '', ariaLabel: this.label || '', validationOptions: { - validation: this.validation || null, - showMessage: true + validation: this.validation || null }, inputBackground: this.inputBackground, inputForeground: this.inputForeground, diff --git a/src/vs/base/browser/ui/inputbox/inputBox.ts b/src/vs/base/browser/ui/inputbox/inputBox.ts index c93367a5518..8dfb882931c 100644 --- a/src/vs/base/browser/ui/inputbox/inputBox.ts +++ b/src/vs/base/browser/ui/inputbox/inputBox.ts @@ -54,7 +54,6 @@ export interface IMessage { export interface IInputValidationOptions { validation: IInputValidator; - showMessage?: boolean; } export enum MessageType { @@ -90,8 +89,6 @@ export class InputBox extends Widget { private placeholder: string; private ariaLabel: string; private validation: IInputValidator; - // @ts-ignore unused property - private showValidationMessage: boolean; private state = 'idle'; private cachedHeight: number; @@ -136,7 +133,6 @@ export class InputBox extends Widget { if (this.options.validationOptions) { this.validation = this.options.validationOptions.validation; - this.showValidationMessage = this.options.validationOptions.showMessage || false; } this.element = dom.append(container, $('.monaco-inputbox.idle')); @@ -498,7 +494,6 @@ export class InputBox extends Widget { this.placeholder = null; this.ariaLabel = null; this.validation = null; - this.showValidationMessage = null; this.state = null; this.actionbar = null; diff --git a/src/vs/base/browser/ui/progressbar/progressbar.ts b/src/vs/base/browser/ui/progressbar/progressbar.ts index ac24174cc72..19e5657414c 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.ts +++ b/src/vs/base/browser/ui/progressbar/progressbar.ts @@ -40,8 +40,6 @@ export class ProgressBar { private toUnbind: IDisposable[]; private workedVal: number; private element: Builder; - // @ts-ignore unused property - private animationRunning: boolean; private bit: HTMLElement; private totalWork: number; private animationStopToken: ValueCallback; @@ -65,11 +63,6 @@ export class ProgressBar { builder.div({ 'class': css_progress_bit }).on([DOM.EventType.ANIMATION_START, DOM.EventType.ANIMATION_END, DOM.EventType.ANIMATION_ITERATION], (e: Event) => { switch (e.type) { - case DOM.EventType.ANIMATION_START: - case DOM.EventType.ANIMATION_END: - this.animationRunning = e.type === DOM.EventType.ANIMATION_START; - break; - case DOM.EventType.ANIMATION_ITERATION: if (this.animationStopToken) { this.animationStopToken(null); diff --git a/src/vs/base/browser/ui/sash/sash.ts b/src/vs/base/browser/ui/sash/sash.ts index cd0de3f9b84..22947e67d88 100644 --- a/src/vs/base/browser/ui/sash/sash.ts +++ b/src/vs/base/browser/ui/sash/sash.ts @@ -51,7 +51,6 @@ export enum Orientation { export class Sash extends EventEmitter { private $e: Builder; - // @ts-ignore unused property private gesture: Gesture; private layoutProvider: ISashLayoutProvider; private isDisabled: boolean; @@ -141,10 +140,6 @@ export class Sash extends EventEmitter { let $window = $(window); let containerCSSClass = `${this.getOrientation()}-cursor-container${isMacintosh ? '-mac' : ''}`; - // @ts-ignore unused local - let lastCurrentX = startX; - // @ts-ignore unused local - let lastCurrentY = startY; $window.on('mousemove', (e) => { DOM.EventHelper.stop(e, false); @@ -157,9 +152,6 @@ export class Sash extends EventEmitter { currentY: mouseMoveEvent.posy }; - lastCurrentX = mouseMoveEvent.posx; - lastCurrentY = mouseMoveEvent.posy; - this.emit('change', event); }).once('mouseup', (e) => { DOM.EventHelper.stop(e, false); @@ -193,11 +185,6 @@ export class Sash extends EventEmitter { currentY: startY }); - // @ts-ignore unused local - let lastCurrentX = startX; - // @ts-ignore unused local - let lastCurrentY = startY; - listeners.push(DOM.addDisposableListener(this.$e.getHTMLElement(), EventType.Change, (event: GestureEvent) => { if (types.isNumber(event.pageX) && types.isNumber(event.pageY)) { this.emit('change', { @@ -206,9 +193,6 @@ export class Sash extends EventEmitter { startY: startY, currentY: event.pageY }); - - lastCurrentX = event.pageX; - lastCurrentY = event.pageY; } })); @@ -282,6 +266,11 @@ export class Sash extends EventEmitter { this.$e = null; } + if (this.gesture) { + this.gesture.dispose(); + this.gesture = null; + } + super.dispose(); } } diff --git a/src/vs/base/browser/ui/selectBox/selectBox.ts b/src/vs/base/browser/ui/selectBox/selectBox.ts index 186ba115671..76e76cd5be3 100644 --- a/src/vs/base/browser/ui/selectBox/selectBox.ts +++ b/src/vs/base/browser/ui/selectBox/selectBox.ts @@ -36,8 +36,6 @@ export class SelectBox extends Widget { private selectElement: HTMLSelectElement; private options: string[]; private selected: number; - // @ts-ignore unused property - private container: HTMLElement; private _onDidSelect: Emitter; private toDispose: IDisposable[]; private selectBackground: Color; @@ -114,7 +112,6 @@ export class SelectBox extends Widget { } public render(container: HTMLElement): void { - this.container = container; dom.addClass(container, 'select-container'); container.appendChild(this.selectElement); this.setOptions(this.options, this.selected); diff --git a/src/vs/base/common/async.ts b/src/vs/base/common/async.ts index cc2749f492a..37c69b0f5bd 100644 --- a/src/vs/base/common/async.ts +++ b/src/vs/base/common/async.ts @@ -510,8 +510,7 @@ export class Queue extends Limiter { * A helper to organize queues per resource. The ResourceQueue makes sure to manage queues per resource * by disposing them once the queue is empty. */ -// @ts-ignore unused generic parameter -export class ResourceQueue { +export class ResourceQueue { private queues: { [path: string]: Queue }; constructor() { diff --git a/src/vs/base/parts/quickopen/common/quickOpenScorer.ts b/src/vs/base/parts/quickopen/common/quickOpenScorer.ts index 4ab821398e6..75b33c6ebf6 100644 --- a/src/vs/base/parts/quickopen/common/quickOpenScorer.ts +++ b/src/vs/base/parts/quickopen/common/quickOpenScorer.ts @@ -352,8 +352,7 @@ export function scoreItem(item: T, query: IPreparedQuery, fuzzy: boolean, acc return itemScore; } -// @ts-ignore unused generic parameter -function doScoreItem(label: string, description: string, path: string, query: IPreparedQuery, fuzzy: boolean): IItemScore { +function doScoreItem(label: string, description: string, path: string, query: IPreparedQuery, fuzzy: boolean): IItemScore { // 1.) treat identity matches on full path highest if (path && isEqual(query.value, path, true)) { diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 7c67597e716..5683665f46b 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -76,8 +76,7 @@ export class CodeApplication { @ILogService private logService: ILogService, @IEnvironmentService private environmentService: IEnvironmentService, @ILifecycleService private lifecycleService: ILifecycleService, - // @ts-ignore unused injected service - @IConfigurationService private configurationService: ConfigurationService, + @IConfigurationService configurationService: ConfigurationService, @IStorageService private storageService: IStorageService, @IHistoryMainService private historyService: IHistoryMainService ) { diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index b9932b45ceb..9d48e22e95d 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -22,7 +22,7 @@ import { mnemonicMenuLabel as baseMnemonicLabel, unmnemonicLabel, getPathLabel } import { KeybindingsResolver } from 'vs/code/electron-main/keyboard'; import { IWindowsMainService, IWindowsCountChangedEvent } from 'vs/platform/windows/electron-main/windows'; import { IHistoryMainService } from 'vs/platform/history/common/history'; -import { IWorkspaceIdentifier, IWorkspacesMainService, getWorkspaceLabel, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; +import { IWorkspaceIdentifier, getWorkspaceLabel, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; interface IExtensionViewlet { id: string; @@ -71,9 +71,7 @@ export class CodeMenu { @IWindowsMainService private windowsService: IWindowsMainService, @IEnvironmentService private environmentService: IEnvironmentService, @ITelemetryService private telemetryService: ITelemetryService, - @IHistoryMainService private historyService: IHistoryMainService, - // @ts-ignore unused injected service - @IWorkspacesMainService private workspacesService: IWorkspacesMainService + @IHistoryMainService private historyService: IHistoryMainService ) { this.extensionViewlets = []; this.nativeTabMenuItems = []; diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index d3704cd95b8..f0d030a42ef 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -143,8 +143,7 @@ export class WindowsManager implements IWindowsMainService { @IEnvironmentService private environmentService: IEnvironmentService, @ILifecycleService private lifecycleService: ILifecycleService, @IBackupMainService private backupService: IBackupMainService, - // @ts-ignore unused injected service - @ITelemetryService private telemetryService: ITelemetryService, + @ITelemetryService telemetryService: ITelemetryService, @IConfigurationService private configurationService: IConfigurationService, @IHistoryMainService private historyService: IHistoryMainService, @IWorkspacesMainService private workspacesService: IWorkspacesMainService, @@ -153,7 +152,7 @@ export class WindowsManager implements IWindowsMainService { this.windowsState = this.storageService.getItem(WindowsManager.windowsStateStorageKey) || { openedWindows: [] }; this.fileDialog = new FileDialog(environmentService, telemetryService, storageService, this); - this.workspacesManager = new WorkspacesManager(workspacesService, lifecycleService, backupService, environmentService, this); + this.workspacesManager = new WorkspacesManager(workspacesService, backupService, environmentService, this); this.migrateLegacyWindowState(); } @@ -1673,8 +1672,6 @@ class WorkspacesManager { constructor( private workspacesService: IWorkspacesMainService, - // @ts-ignore unused injected service - private lifecycleService: ILifecycleService, private backupService: IBackupMainService, private environmentService: IEnvironmentService, private windowsMainService: IWindowsMainService diff --git a/src/vs/platform/backup/electron-main/backupMainService.ts b/src/vs/platform/backup/electron-main/backupMainService.ts index 0c23b2c208d..ceb1a0e5cbc 100644 --- a/src/vs/platform/backup/electron-main/backupMainService.ts +++ b/src/vs/platform/backup/electron-main/backupMainService.ts @@ -14,7 +14,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IFilesConfiguration, HotExitConfiguration } from 'vs/platform/files/common/files'; import { ILogService } from 'vs/platform/log/common/log'; -import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspacesMainService, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; +import { IWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, isSingleFolderWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; export class BackupMainService implements IBackupMainService { @@ -28,9 +28,7 @@ export class BackupMainService implements IBackupMainService { constructor( @IEnvironmentService environmentService: IEnvironmentService, @IConfigurationService private configurationService: IConfigurationService, - @ILogService private logService: ILogService, - // @ts-ignore unused injected service - @IWorkspacesMainService private workspacesService: IWorkspacesMainService + @ILogService private logService: ILogService ) { this.backupHome = environmentService.backupHome; this.workspacesJsonPath = environmentService.backupWorkspacesPath; diff --git a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts index 96f8242c326..ae7618cefd3 100644 --- a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts +++ b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts @@ -22,7 +22,6 @@ import { TestConfigurationService } from 'vs/platform/configuration/test/common/ import { LogMainService } from 'vs/platform/log/common/log'; import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces'; import { createHash } from 'crypto'; -import { WorkspacesMainService } from 'vs/platform/workspaces/electron-main/workspacesMainService'; import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices'; suite('BackupMainService', () => { @@ -31,12 +30,11 @@ suite('BackupMainService', () => { const backupWorkspacesPath = path.join(backupHome, 'workspaces.json'); const environmentService = new EnvironmentService(parseArgs(process.argv), process.execPath); - const logService = new LogMainService(environmentService); class TestBackupMainService extends BackupMainService { constructor(backupHome: string, backupWorkspacesPath: string, configService: TestConfigurationService) { - super(environmentService, configService, new LogMainService(environmentService), new WorkspacesMainService(environmentService, logService)); + super(environmentService, configService, new LogMainService(environmentService)); this.backupHome = backupHome; this.workspacesJsonPath = backupWorkspacesPath; diff --git a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts index 50dc285444f..28bf62c5654 100644 --- a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts @@ -7,7 +7,6 @@ import { ipcMain as ipc, app } from 'electron'; import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ILogService } from 'vs/platform/log/common/log'; import { IStorageService } from 'vs/platform/storage/node/storage'; import Event, { Emitter } from 'vs/base/common/event'; @@ -94,8 +93,6 @@ export class LifecycleService implements ILifecycleService { onBeforeWindowUnload: Event = this._onBeforeWindowUnload.event; constructor( - // @ts-ignore unused injected service - @IEnvironmentService private environmentService: IEnvironmentService, @ILogService private logService: ILogService, @IStorageService private storageService: IStorageService ) { diff --git a/src/vs/workbench/browser/actions/workspaceActions.ts b/src/vs/workbench/browser/actions/workspaceActions.ts index 3c394c6ff8f..07f7c530ddc 100644 --- a/src/vs/workbench/browser/actions/workspaceActions.ts +++ b/src/vs/workbench/browser/actions/workspaceActions.ts @@ -14,7 +14,7 @@ import { IWorkspaceContextService, WorkbenchState, IWorkspaceFolder } from 'vs/p import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing'; import URI from 'vs/base/common/uri'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; +import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { WORKSPACE_FILTER, IWorkspacesService } from 'vs/platform/workspaces/common/workspaces'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { isLinux } from 'vs/base/common/platform'; @@ -204,8 +204,6 @@ export class AddRootFolderAction extends BaseWorkspacesAction { @IWindowService windowService: IWindowService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IEnvironmentService environmentService: IEnvironmentService, - // @ts-ignore unused injected service - @IInstantiationService private instantiationService: IInstantiationService, @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, @IViewletService private viewletService: IViewletService, @IHistoryService historyService: IHistoryService diff --git a/src/vs/workbench/browser/part.ts b/src/vs/workbench/browser/part.ts index edecfa020ee..ad324177d50 100644 --- a/src/vs/workbench/browser/part.ts +++ b/src/vs/workbench/browser/part.ts @@ -111,8 +111,7 @@ const TITLE_HEIGHT = 35; export class PartLayout { - // @ts-ignore unused property - constructor(private container: Builder, private options: IPartOptions, private titleArea: Builder, private contentArea: Builder) { + constructor(container: Builder, private options: IPartOptions, titleArea: Builder, private contentArea: Builder) { } public layout(dimension: Dimension): Dimension[] { diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index c75fb219d65..299431306fe 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -20,8 +20,6 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IBadge } from 'vs/workbench/services/activity/common/activity'; import { IPartService, Position as SideBarPosition } from 'vs/workbench/services/part/common/partService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IExtensionService } from 'vs/platform/extensions/common/extensions'; -import { IStorageService } from 'vs/platform/storage/common/storage'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import { dispose, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; @@ -54,10 +52,6 @@ export class ActivitybarPart extends Part { constructor( id: string, @IViewletService private viewletService: IViewletService, - // @ts-ignore unused injected service - @IExtensionService private extensionService: IExtensionService, - // @ts-ignore unused injected service - @IStorageService private storageService: IStorageService, @IContextMenuService private contextMenuService: IContextMenuService, @IInstantiationService private instantiationService: IInstantiationService, @IPartService private partService: IPartService, diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index dd3cce2d126..7dce52b6198 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -113,8 +113,6 @@ export class JoinTwoGroupsAction extends Action { constructor( id: string, label: string, - // @ts-ignore unused injected service - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEditorGroupService private editorGroupService: IEditorGroupService ) { super(id, label); diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index 188ae01b8f4..979df653a59 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -20,7 +20,6 @@ import { Position } from 'vs/platform/editor/common/editor'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { EditorInput, toResource, IEditorGroup, IEditorStacksModel } from 'vs/workbench/common/editor'; import { compareItemsByScore, scoreItem, ScorerCache, prepareQuery } from 'vs/base/parts/quickopen/common/quickOpenScorer'; @@ -91,8 +90,6 @@ export abstract class BaseEditorPicker extends QuickOpenHandler { constructor( @IInstantiationService protected instantiationService: IInstantiationService, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService, @IWorkbenchEditorService protected editorService: IWorkbenchEditorService, @IEditorGroupService protected editorGroupService: IEditorGroupService ) { diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 227c1aa57d7..28dcafe4a0f 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -795,8 +795,6 @@ export class ChangeModeAction extends Action { @IQuickOpenService private quickOpenService: IQuickOpenService, @IPreferencesService private preferencesService: IPreferencesService, @IInstantiationService private instantiationService: IInstantiationService, - // @ts-ignore unused injected service - @ICommandService private commandService: ICommandService, @IUntitledEditorService private untitledEditorService: IUntitledEditorService ) { super(actionId, actionLabel); diff --git a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts index 641e62414b7..bfc099a30fb 100644 --- a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts @@ -31,7 +31,6 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { IWorkbenchEditorService, DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IEditorInput } from 'vs/platform/editor/common/editor'; import { ScrollType } from 'vs/editor/common/editorCommon'; @@ -55,10 +54,9 @@ export class TextDiffEditor extends BaseTextEditor { @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IThemeService themeService: IThemeService, @IEditorGroupService editorGroupService: IEditorGroupService, - @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService ) { - super(TextDiffEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, modeService, textFileService, editorGroupService); + super(TextDiffEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorGroupService); } public getTitle(): string { diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index 9ef9310354f..dc250322285 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -24,7 +24,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Scope } from 'vs/workbench/common/memento'; import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; -import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService, SaveReason, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; @@ -32,13 +31,6 @@ import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; const TEXT_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'textEditorViewState'; -// @ts-ignore unused type -interface ITextEditorViewState { - 0?: IEditorViewState; - 1?: IEditorViewState; - 2?: IEditorViewState; -} - export interface IEditorConfiguration { editor: object; diffEditor: object; @@ -61,8 +53,6 @@ export abstract class BaseTextEditor extends BaseEditor { @IStorageService private storageService: IStorageService, @ITextResourceConfigurationService private _configurationService: ITextResourceConfigurationService, @IThemeService protected themeService: IThemeService, - // @ts-ignore unused injected service - @IModeService private modeService: IModeService, @ITextFileService private _textFileService: ITextFileService, @IEditorGroupService protected editorGroupService: IEditorGroupService ) { diff --git a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts index 7d723508d2a..cfabfc41b0e 100644 --- a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts @@ -20,7 +20,6 @@ import { ITextResourceConfigurationService } from 'vs/editor/common/services/res import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { once } from 'vs/base/common/event'; import { ScrollType } from 'vs/editor/common/editorCommon'; @@ -40,10 +39,9 @@ export class TextResourceEditor extends BaseTextEditor { @ITextResourceConfigurationService configurationService: ITextResourceConfigurationService, @IThemeService themeService: IThemeService, @IEditorGroupService editorGroupService: IEditorGroupService, - @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService ) { - super(TextResourceEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, modeService, textFileService, editorGroupService); + super(TextResourceEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorGroupService); } public getTitle(): string { diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 69b64066d51..d40e65a496d 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -98,8 +98,6 @@ export class QuickOpenController extends Component implements IQuickOpenService private promisesToCompleteOnHide: ValueCallback[]; private previousActiveHandlerDescriptor: QuickOpenHandlerDescriptor; private actionProvider = new ContributableActionProvider(); - // @ts-ignore unused property - private previousValue = ''; private visibilityChangeTimeoutHandle: number; private closeOnFocusLost: boolean; private editorHistoryHandler: EditorHistoryHandler; @@ -108,12 +106,8 @@ export class QuickOpenController extends Component implements IQuickOpenService @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IMessageService private messageService: IMessageService, @ITelemetryService private telemetryService: ITelemetryService, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService, @IContextKeyService private contextKeyService: IContextKeyService, @IConfigurationService private configurationService: IConfigurationService, - // @ts-ignore unused injected service - @IHistoryService private historyService: IHistoryService, @IInstantiationService private instantiationService: IInstantiationService, @IPartService private partService: IPartService, @IListService private listService: IListService, @@ -554,8 +548,6 @@ export class QuickOpenController extends Component implements IQuickOpenService let inputSelection = options ? options.inputSelection : void 0; let autoFocus = options ? options.autoFocus : void 0; - this.previousValue = prefix; - const promiseCompletedOnHide = new TPromise(c => { this.promisesToCompleteOnHide.push(c); }); @@ -750,7 +742,6 @@ export class QuickOpenController extends Component implements IQuickOpenService } private onType(value: string): void { - this.previousValue = value; // look for a handler const registry = Registry.as(Extensions.Quickopen); @@ -1179,8 +1170,6 @@ class EditorHistoryHandler { constructor( @IHistoryService private historyService: IHistoryService, @IInstantiationService private instantiationService: IInstantiationService, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService, @IFileService private fileService: IFileService ) { this.scorerCache = Object.create(null); @@ -1269,8 +1258,7 @@ export class EditorHistoryEntry extends EditorQuickOpenEntry { @IWorkspaceContextService contextService: IWorkspaceContextService, @IConfigurationService private configurationService: IConfigurationService, @IEnvironmentService environmentService: IEnvironmentService, - // @ts-ignore unused injected service - @IFileService private fileService: IFileService + @IFileService fileService: IFileService ) { super(editorService); diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index 9b817365a28..7921f37fff7 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -15,7 +15,7 @@ import { Registry } from 'vs/platform/registry/common/platform'; import { Action } from 'vs/base/common/actions'; import { KeyMod } from 'vs/base/common/keyCodes'; import { Mode, IEntryRunContext, IAutoFocus, IModel, IQuickNavigateConfiguration } from 'vs/base/parts/quickopen/common/quickOpen'; -import { QuickOpenEntry, IHighlight, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; +import { QuickOpenEntry, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { EditorOptions, EditorInput } from 'vs/workbench/common/editor'; import { IResourceInput, IEditorInput, IEditorOptions } from 'vs/platform/editor/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -323,36 +323,6 @@ export interface ICommand { icon?: string; } -// @ts-ignore unused type -class CommandEntry extends QuickOpenEntry { - - constructor(private quickOpenService: IQuickOpenService, private prefix: string, private command: ICommand, highlights: IHighlight[]) { - super(highlights); - this.command = command; - } - - public getIcon(): string { - return this.command.icon || null; - } - - public getLabel(): string { - return this.command.aliases[0]; - } - - public getAriaLabel(): string { - return nls.localize('entryAriaLabel', "{0}, command", this.getLabel()); - } - - public run(mode: Mode, context: IEntryRunContext): boolean { - if (mode === Mode.PREVIEW) { - return false; - } - - this.quickOpenService.show(`${this.prefix} ${this.command.aliases[0]} `); - return false; - } -} - export interface ICommandQuickOpenHandlerOptions { prefix: string; commands: ICommand[]; diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 09829d7922c..1cca1e27f11 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -156,8 +156,6 @@ export class ToggleMenuBarAction extends Action { constructor( id: string, label: string, - // @ts-ignore unused injected service - @IMessageService private messageService: IMessageService, @IConfigurationService private configurationService: IConfigurationService ) { super(id, label); @@ -342,12 +340,9 @@ export class ShowStartupPerformance extends Action { console.log(`Empty Workspace: ${metrics.emptyWorkbench}`); let nodeModuleLoadTime: number; - // @ts-ignore unused local - let nodeModuleLoadDetails: any[]; if (this.environmentService.performance) { const nodeModuleTimes = this.analyzeNodeModulesLoadTimes(); nodeModuleLoadTime = nodeModuleTimes.duration; - nodeModuleLoadDetails = nodeModuleTimes.table; } (console).table(this.getStartupMetricsTable(nodeModuleLoadTime)); diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index a978e2e1651..6e7206117f5 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -27,7 +27,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { IWindowsService, IWindowService, IWindowSettings, IPath, IOpenFileRequest, IWindowsConfiguration, IAddFoldersRequest, IRunActionInWindowRequest } from 'vs/platform/windows/common/windows'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ITitleService } from 'vs/workbench/services/title/common/titleService'; import { IWorkbenchThemeService, VS_HC_THEME, VS_DARK_THEME } from 'vs/workbench/services/themes/common/workbenchThemeService'; @@ -39,7 +38,6 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { KeyboardMapperFactory } from 'vs/workbench/services/keybinding/electron-browser/keybindingService'; import { Themable } from 'vs/workbench/common/theme'; import { ipcRenderer as ipc, webFrame } from 'electron'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing'; import { IMenuService, MenuId, IMenu, MenuItemAction, ICommandAction } from 'vs/platform/actions/common/actions'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; @@ -86,16 +84,10 @@ export class ElectronWindow extends Themable { @IViewletService private viewletService: IViewletService, @IContextMenuService private contextMenuService: IContextMenuService, @IKeybindingService private keybindingService: IKeybindingService, - // @ts-ignore unused injected service - @IEnvironmentService private environmentService: IEnvironmentService, @ITelemetryService private telemetryService: ITelemetryService, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService, @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, @IFileService private fileService: IFileService, - @IMenuService private menuService: IMenuService, - // @ts-ignore unused injected service - @IContextKeyService private contextKeyService: IContextKeyService + @IMenuService private menuService: IMenuService ) { super(themeService); diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 0ac0123c767..3216812ad1e 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -87,7 +87,6 @@ import { IMenuService, SyncActionDescriptor } from 'vs/platform/actions/common/a import { MenuService } from 'vs/platform/actions/common/menuService'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actions'; import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction, ShowPreviousWindowTab, MoveWindowTabToNewWindow, MergeAllWindowTabs, ShowNextWindowTab, ToggleWindowTabsBar } from 'vs/workbench/electron-browser/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; @@ -223,8 +222,6 @@ export class Workbench implements IPartService { @IStorageService private storageService: IStorageService, @IMessageService private messageService: IMessageService, @IConfigurationService private configurationService: WorkspaceService, - // @ts-ignore unused injected service - @ITelemetryService private telemetryService: ITelemetryService, @IEnvironmentService private environmentService: IEnvironmentService, @IWindowService private windowService: IWindowService ) { diff --git a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts index b60b3bce030..b607ba93761 100644 --- a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts +++ b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts @@ -29,7 +29,6 @@ import { CancelAction } from 'vs/platform/message/common/message'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { IModeService } from 'vs/editor/common/services/modeService'; import { ScrollType } from 'vs/editor/common/editorCommon'; /** @@ -50,10 +49,9 @@ export class TextFileEditor extends BaseTextEditor { @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IThemeService themeService: IThemeService, @IEditorGroupService editorGroupService: IEditorGroupService, - @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService, ) { - super(TextFileEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, modeService, textFileService, editorGroupService); + super(TextFileEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorGroupService); // Clear view state for deleted files this.toUnbind.push(this.fileService.onFileChanges(e => this.onFilesChanged(e))); diff --git a/src/vs/workbench/parts/files/browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/browser/fileActions.contribution.ts index a87932a839f..2dddb2c5105 100644 --- a/src/vs/workbench/parts/files/browser/fileActions.contribution.ts +++ b/src/vs/workbench/parts/files/browser/fileActions.contribution.ts @@ -14,7 +14,6 @@ import { revertLocalChangesCommand, acceptLocalChangesCommand, CONFLICT_RESOLUTI import { SyncActionDescriptor, MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { FileStat, Model } from 'vs/workbench/parts/files/common/explorerModel'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; @@ -23,18 +22,13 @@ import { copyFocusedFilesExplorerViewItem, revealInOSFocusedFilesExplorerItem, o import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/commands'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { explorerItemToFileResource, ExplorerFocusCondition, FilesExplorerFocusCondition } from 'vs/workbench/parts/files/common/files'; class FilesViewerActionContributor extends ActionBarContributor { constructor( @IInstantiationService private instantiationService: IInstantiationService, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IKeybindingService private keybindingService: IKeybindingService, - // @ts-ignore unused injected service - @IEnvironmentService private environmentService: IEnvironmentService + @IKeybindingService private keybindingService: IKeybindingService ) { super(); } diff --git a/src/vs/workbench/parts/files/browser/fileActions.ts b/src/vs/workbench/parts/files/browser/fileActions.ts index 4e9c5a2a19d..ccc0d2ba899 100644 --- a/src/vs/workbench/parts/files/browser/fileActions.ts +++ b/src/vs/workbench/parts/files/browser/fileActions.ts @@ -1878,11 +1878,7 @@ export class GlobalRevealInOSAction extends Action { constructor( id: string, label: string, - // @ts-ignore unused injected service - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IInstantiationService private instantiationService: IInstantiationService, - // @ts-ignore unused injected service - @IMessageService private messageService: IMessageService + @IInstantiationService private instantiationService: IInstantiationService ) { super(id, label); } @@ -1922,12 +1918,6 @@ export class GlobalCopyPathAction extends Action { constructor( id: string, label: string, - // @ts-ignore unused injected service - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - // @ts-ignore unused injected service - @IEditorGroupService private editorGroupService: IEditorGroupService, - // @ts-ignore unused injected service - @IMessageService private messageService: IMessageService, @IInstantiationService private instantiationService: IInstantiationService ) { super(id, label); diff --git a/src/vs/workbench/parts/files/browser/fileResultsNavigation.ts b/src/vs/workbench/parts/files/browser/fileResultsNavigation.ts index c88a5742191..9174477d966 100644 --- a/src/vs/workbench/parts/files/browser/fileResultsNavigation.ts +++ b/src/vs/workbench/parts/files/browser/fileResultsNavigation.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ import { Disposable } from 'vs/base/common/lifecycle'; -import { Throttler } from 'vs/base/common/async'; import Event, { Emitter } from 'vs/base/common/event'; import { IEditorOptions } from 'vs/platform/editor/common/editor'; import { ITree } from 'vs/base/parts/tree/browser/tree'; @@ -21,12 +20,8 @@ export default class FileResultsNavigation extends Disposable { private _openFile: Emitter = new Emitter(); public readonly openFile: Event = this._openFile.event; - // @ts-ignore unused property - private throttler: Throttler; - constructor(private tree: ITree) { super(); - this.throttler = new Throttler(); this._register(this.tree.addListener('focus', e => this.onFocus(e))); this._register(this.tree.addListener('selection', e => this.onSelection(e))); } diff --git a/src/vs/workbench/parts/files/browser/files.contribution.ts b/src/vs/workbench/parts/files/browser/files.contribution.ts index 38eac0fa753..15b4a09a9fa 100644 --- a/src/vs/workbench/parts/files/browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/browser/files.contribution.ts @@ -29,7 +29,6 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import * as platform from 'vs/base/common/platform'; import { DirtyFilesTracker } from 'vs/workbench/parts/files/common/dirtyFilesTracker'; -import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { ExplorerViewlet } from 'vs/workbench/parts/files/browser/explorerViewlet'; import { IEditorRegistry, EditorDescriptor, Extensions as EditorExtensions } from 'vs/workbench/browser/editor'; @@ -110,11 +109,7 @@ interface ISerializedFileInput { // Register Editor Input Factory class FileEditorInputFactory implements IEditorInputFactory { - constructor( - // @ts-ignore unused injected service - @ITextResourceConfigurationService private configurationService: ITextResourceConfigurationService - ) { - } + constructor() { } public serialize(editorInput: EditorInput): string { const fileEditorInput = editorInput; diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index c756a441c10..0969df39c49 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -44,7 +44,6 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c import { ResourceContextKey, ResourceGlobMatcher } from 'vs/workbench/common/resources'; import { IWorkbenchThemeService, IFileIconTheme } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { isLinux } from 'vs/base/common/platform'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IDecorationsService } from 'vs/workbench/services/decorations/browser/decorations'; @@ -57,7 +56,6 @@ export class ExplorerView extends ViewsViewletPanel { public static ID: string = 'workbench.explorer.fileView'; private static EXPLORER_FILE_CHANGES_REACT_DELAY = 500; // delay in ms to react to file changes to give our internal events a chance to react first private static EXPLORER_FILE_CHANGES_REFRESH_DELAY = 100; // delay in ms to refresh the explorer from disk file changes - private static EXPLORER_IMPORT_REFRESH_DELAY = 300; // delay in ms to refresh the explorer from imports private static MEMENTO_LAST_ACTIVE_FILE_RESOURCE = 'explorer.memento.lastActiveFileResource'; private static MEMENTO_EXPANDED_FOLDER_RESOURCES = 'explorer.memento.expandedFolderResources'; @@ -69,8 +67,6 @@ export class ExplorerView extends ViewsViewletPanel { private viewletState: FileViewletState; private explorerRefreshDelayer: ThrottledDelayer; - // @ts-ignore unused property - private explorerImportDelayer: ThrottledDelayer; private resourceContext: ResourceContextKey; private folderContext: IContextKey; @@ -101,8 +97,6 @@ export class ExplorerView extends ViewsViewletPanel { @IContextKeyService contextKeyService: IContextKeyService, @IConfigurationService private configurationService: IConfigurationService, @IWorkbenchThemeService private themeService: IWorkbenchThemeService, - // @ts-ignore unused injected service - @IEnvironmentService private environmentService: IEnvironmentService, @IDecorationsService decorationService: IDecorationsService ) { super({ ...(options as IViewOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService); @@ -112,7 +106,6 @@ export class ExplorerView extends ViewsViewletPanel { this.autoReveal = true; this.explorerRefreshDelayer = new ThrottledDelayer(ExplorerView.EXPLORER_FILE_CHANGES_REFRESH_DELAY); - this.explorerImportDelayer = new ThrottledDelayer(ExplorerView.EXPLORER_IMPORT_REFRESH_DELAY); this.resourceContext = instantiationService.createInstance(ResourceContextKey); this.folderContext = ExplorerFolderContext.bindTo(contextKeyService); diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 3c37d29c972..6b80e582f28 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -53,7 +53,6 @@ import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IWindowService } from 'vs/platform/windows/common/windows'; import { IWorkspaceEditingService } from 'vs/workbench/services/workspace/common/workspaceEditing'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { getPathLabel } from 'vs/base/common/labels'; import { extractResources } from 'vs/workbench/browser/editor'; @@ -62,9 +61,7 @@ export class FileDataSource implements IDataSource { @IProgressService private progressService: IProgressService, @IMessageService private messageService: IMessageService, @IFileService private fileService: IFileService, - @IPartService private partService: IPartService, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IPartService private partService: IPartService ) { } public getId(tree: ITree, stat: FileStat | Model): string { @@ -353,8 +350,7 @@ export class FileRenderer implements IRenderer { // Input field for name const inputBox = new InputBox(label.element, this.contextViewService, { validationOptions: { - validation: editableData.validator, - showMessage: true + validation: editableData.validator }, ariaLabel: nls.localize('fileInputAriaLabel', "Type file name. Press Enter to confirm or Escape to cancel.") }); @@ -426,11 +422,7 @@ export class FileController extends DefaultController { constructor(state: FileViewletState, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IContextMenuService private contextMenuService: IContextMenuService, - // @ts-ignore unused injected service - @IInstantiationService private instantiationService: IInstantiationService, @ITelemetryService private telemetryService: ITelemetryService, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService, @IMenuService menuService: IMenuService, @IContextKeyService contextKeyService: IContextKeyService ) { @@ -754,9 +746,7 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { @ITextFileService private textFileService: ITextFileService, @IBackupFileService private backupFileService: IBackupFileService, @IWindowService private windowService: IWindowService, - @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, - // @ts-ignore unused injected service - @IEnvironmentService private environmentService: IEnvironmentService + @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService ) { super(stat => this.statToResource(stat)); @@ -1035,15 +1025,11 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { // 3.) run the move operation .then(() => { const targetResource = target.resource.with({ path: paths.join(target.resource.path, source.name) }); - // @ts-ignore unused local - let didHandleConflict = false; return this.fileService.moveFile(source.resource, targetResource).then(null, error => { // Conflict if ((error).fileOperationResult === FileOperationResult.FILE_MOVE_CONFLICT) { - didHandleConflict = true; - const confirm: IConfirmation = { message: nls.localize('confirmOverwriteMessage', "'{0}' already exists in the destination folder. Do you want to replace it?", source.name), detail: nls.localize('irreversible', "This action is irreversible!"), diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts b/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts index dd6ff6045af..771cde62269 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts @@ -10,8 +10,7 @@ import errors = require('vs/base/common/errors'); import URI from 'vs/base/common/uri'; import paths = require('vs/base/common/paths'); import { IEditorViewState, isCommonCodeEditor } from 'vs/editor/common/editorCommon'; -// @ts-ignore unused import -import { toResource, IEditorStacksModel, SideBySideEditorInput, IEditorGroup, IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; +import { toResource, SideBySideEditorInput, IEditorGroup, IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; import { BINARY_FILE_EDITOR_ID } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, ITextFileEditorModel } from 'vs/workbench/services/textfile/common/textfiles'; import { FileOperationEvent, FileOperation, IFileService, FileChangeType, FileChangesEvent, indexOf } from 'vs/platform/files/common/files'; @@ -32,9 +31,8 @@ export class FileEditorTracker implements IWorkbenchContribution { protected closeOnFileDelete: boolean; - // @ts-ignore unused propertyprivate stacks: IEditorStacksModel; private toUnbind: IDisposable[]; - private modelLoadQueue: ResourceQueue; + private modelLoadQueue: ResourceQueue; private activeOutOfWorkspaceWatchers: ResourceMap; constructor( @@ -48,9 +46,7 @@ export class FileEditorTracker implements IWorkbenchContribution { @IWorkspaceContextService private contextService: IWorkspaceContextService, ) { this.toUnbind = []; - // @ts-ignore unused property - this.stacks = editorGroupService.getStacksModel(); - this.modelLoadQueue = new ResourceQueue(); + this.modelLoadQueue = new ResourceQueue(); this.activeOutOfWorkspaceWatchers = new ResourceMap(); this.onConfigurationUpdated(configurationService.getConfiguration()); diff --git a/src/vs/workbench/parts/output/browser/outputPanel.ts b/src/vs/workbench/parts/output/browser/outputPanel.ts index 811e8d69a05..73c2d9a89be 100644 --- a/src/vs/workbench/parts/output/browser/outputPanel.ts +++ b/src/vs/workbench/parts/output/browser/outputPanel.ts @@ -22,7 +22,6 @@ import { OutputEditors, OUTPUT_PANEL_ID, IOutputService, CONTEXT_IN_OUTPUT } fro import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction } from 'vs/workbench/parts/output/browser/outputActions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; export class OutputPanel extends TextResourceEditor { @@ -38,10 +37,9 @@ export class OutputPanel extends TextResourceEditor { @IOutputService private outputService: IOutputService, @IContextKeyService private contextKeyService: IContextKeyService, @IEditorGroupService editorGroupService: IEditorGroupService, - @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService ) { - super(telemetryService, instantiationService, storageService, configurationService, themeService, editorGroupService, modeService, textFileService); + super(telemetryService, instantiationService, storageService, configurationService, themeService, editorGroupService, textFileService); this.scopedInstantiationService = instantiationService; } diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index 04c8ec3ff4a..37aa71b666d 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -91,8 +91,6 @@ export class OutputService implements IOutputService { private _onOutputChannel: Emitter; private _onActiveOutputChannel: Emitter; - // @ts-ignore unused property - private _outputLinkDetector: OutputLinkProvider; private _outputContentProvider: OutputContentProvider; private _outputPanel: OutputPanel; @@ -111,7 +109,7 @@ export class OutputService implements IOutputService { const channels = this.getChannels(); this.activeChannelId = this.storageService.get(OUTPUT_ACTIVE_CHANNEL_KEY, StorageScope.WORKSPACE, channels && channels.length > 0 ? channels[0].id : null); - this._outputLinkDetector = instantiationService.createInstance(OutputLinkProvider); + instantiationService.createInstance(OutputLinkProvider); this._outputContentProvider = instantiationService.createInstance(OutputContentProvider, this); diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index 2171e3dfc72..1acd6036909 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -36,7 +36,6 @@ import { Command } from 'vs/editor/common/editorCommonExtensions'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IModelService } from 'vs/editor/common/services/modelService'; -import { IModeService } from 'vs/editor/common/services/modeService'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -708,11 +707,10 @@ export class EditableSettingsEditor extends BaseTextEditor { @IPreferencesService private preferencesService: IPreferencesService, // @ts-ignore unused injected service @IModelService private modelService: IModelService, - @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService, @IEditorGroupService editorGroupService: IEditorGroupService ) { - super(EditableSettingsEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, modeService, textFileService, editorGroupService); + super(EditableSettingsEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorGroupService); this._register({ dispose: () => dispose(this.modelDisposables) }); this.saveDelayer = new Delayer(1000); } @@ -782,11 +780,10 @@ export class DefaultPreferencesEditor extends BaseTextEditor { @IPreferencesService private preferencesService: IPreferencesService, // @ts-ignore unused injected service @IModelService private modelService: IModelService, - @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService, @IEditorGroupService editorGroupService: IEditorGroupService ) { - super(DefaultPreferencesEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, modeService, textFileService, editorGroupService); + super(DefaultPreferencesEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorGroupService); } public createEditorControl(parent: Builder, configuration: IEditorOptions): editorCommon.IEditor { diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index 41fcdfc26d3..2148ec88e17 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -14,7 +14,7 @@ import { Action } from 'vs/base/common/actions'; import { toErrorMessage } from 'vs/base/common/errorMessage'; import { Mode, IEntryRunContext, IAutoFocus, IModel, IQuickNavigateConfiguration } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenEntryGroup, IHighlight, QuickOpenModel, QuickOpenEntry } from 'vs/base/parts/quickopen/browser/quickOpenModel'; -import { SyncActionDescriptor, IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; +import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { QuickOpenHandler, IWorkbenchQuickOpenConfiguration } from 'vs/workbench/browser/quickopen'; import { IEditorAction, IEditor, ICommonCodeEditor } from 'vs/editor/common/editorCommon'; @@ -157,8 +157,6 @@ export class ClearCommandHistoryAction extends Action { constructor( id: string, label: string, - // @ts-ignore unused injected service - @IStorageService private storageService: IStorageService, @IConfigurationService private configurationService: IConfigurationService ) { super(id, label); @@ -324,29 +322,6 @@ abstract class BaseCommandEntry extends QuickOpenEntryGroup { } } -// @ts-ignore unused type -class CommandEntry extends BaseCommandEntry { - - constructor( - commandId: string, - keybinding: ResolvedKeybinding, - label: string, - meta: string, - highlights: { label: IHighlight[], alias: IHighlight[] }, - private actionDescriptor: SyncActionDescriptor, - onBeforeRun: (commandId: string) => void, - @IInstantiationService private instantiationService: IInstantiationService, - @IMessageService messageService: IMessageService, - @ITelemetryService telemetryService: ITelemetryService - ) { - super(commandId, keybinding, label, meta, highlights, onBeforeRun, messageService, telemetryService); - } - - protected getAction(): Action | IEditorAction { - return this.instantiationService.createInstance(this.actionDescriptor.syncDescriptor); - } -} - class EditorActionCommandEntry extends BaseCommandEntry { constructor( @@ -405,8 +380,6 @@ export class CommandsHandler extends QuickOpenHandler { @IInstantiationService private instantiationService: IInstantiationService, @IKeybindingService private keybindingService: IKeybindingService, @IMenuService private menuService: IMenuService, - // @ts-ignore unused injected service - @IContextKeyService private contextKeyService: IContextKeyService, @IConfigurationService private configurationService: IConfigurationService ) { super(); diff --git a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts index 81a4923534a..9f0570fbc06 100644 --- a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts +++ b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts @@ -9,7 +9,6 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { Registry } from 'vs/platform/registry/common/platform'; import { IMessageService } from 'vs/platform/message/common/message'; -import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences'; import { IWindowsService, IWindowService, IWindowsConfiguration } from 'vs/platform/windows/common/windows'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { localize } from 'vs/nls'; @@ -44,8 +43,6 @@ export class SettingsChangeRelauncher implements IWorkbenchContribution { @IWindowsService private windowsService: IWindowsService, @IWindowService private windowService: IWindowService, @IConfigurationService private configurationService: IConfigurationService, - // @ts-ignore unused injected service - @IPreferencesService private preferencesService: IPreferencesService, @IEnvironmentService private envService: IEnvironmentService, @IMessageService private messageService: IMessageService, @IWorkspaceContextService private contextService: IWorkspaceContextService, diff --git a/src/vs/workbench/parts/search/browser/openFileHandler.ts b/src/vs/workbench/parts/search/browser/openFileHandler.ts index 9f6881f0c8a..0c72fa5787d 100644 --- a/src/vs/workbench/parts/search/browser/openFileHandler.ts +++ b/src/vs/workbench/parts/search/browser/openFileHandler.ts @@ -123,8 +123,6 @@ export class OpenFileHandler extends QuickOpenHandler { @IWorkbenchThemeService private themeService: IWorkbenchThemeService, @IWorkspaceContextService private contextService: IWorkspaceContextService, @ISearchService private searchService: ISearchService, - // @ts-ignore unused injected service - @IConfigurationService private configurationService: IConfigurationService, @IEnvironmentService private environmentService: IEnvironmentService ) { super(); diff --git a/src/vs/workbench/parts/search/browser/patternInputWidget.ts b/src/vs/workbench/parts/search/browser/patternInputWidget.ts index 06020f4ef5e..d3101e9b681 100644 --- a/src/vs/workbench/parts/search/browser/patternInputWidget.ts +++ b/src/vs/workbench/parts/search/browser/patternInputWidget.ts @@ -168,8 +168,7 @@ export class PatternInputWidget extends Widget { placeholder: this.placeholder || '', ariaLabel: this.ariaLabel || '', validationOptions: { - validation: null, - showMessage: true + validation: null } }); this._register(attachInputBoxStyler(this.inputBox, this.themeService)); diff --git a/src/vs/workbench/services/backup/node/backupFileService.ts b/src/vs/workbench/services/backup/node/backupFileService.ts index d03f40a59dc..af5ca6bda2b 100644 --- a/src/vs/workbench/services/backup/node/backupFileService.ts +++ b/src/vs/workbench/services/backup/node/backupFileService.ts @@ -95,14 +95,14 @@ export class BackupFileService implements IBackupFileService { private isShuttingDown: boolean; private ready: TPromise; - private ioOperationQueues: ResourceQueue; // queue IO operations to ensure write order + private ioOperationQueues: ResourceQueue; // queue IO operations to ensure write order constructor( backupWorkspacePath: string, @IFileService private fileService: IFileService ) { this.isShuttingDown = false; - this.ioOperationQueues = new ResourceQueue(); + this.ioOperationQueues = new ResourceQueue(); this.initialize(backupWorkspacePath); } diff --git a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts index f7c21bdf2cd..28db9272fcf 100644 --- a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts +++ b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts @@ -16,25 +16,11 @@ import pfs = require('vs/base/node/pfs'); import Uri from 'vs/base/common/uri'; import { BackupFileService, BackupFilesModel } from 'vs/workbench/services/backup/node/backupFileService'; import { FileService } from 'vs/workbench/services/files/node/fileService'; -import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; -import { parseArgs } from 'vs/platform/environment/node/argv'; import { RawTextSource } from 'vs/editor/common/model/textSource'; import { TestContextService, TestTextResourceConfigurationService, getRandomTestPath } from 'vs/workbench/test/workbenchTestServices'; import { Workspace, toWorkspaceFolders } from 'vs/platform/workspace/common/workspace'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; -// @ts-ignore unused type -class TestEnvironmentService extends EnvironmentService { - - constructor(private _backupHome: string, private _backupWorkspacesPath: string) { - super(parseArgs(process.argv), process.execPath); - } - - get backupHome(): string { return this._backupHome; } - - get backupWorkspacesPath(): string { return this._backupWorkspacesPath; } -} - const parentDir = getRandomTestPath(os.tmpdir(), 'vsctests', 'backupfileservice'); const backupHome = path.join(parentDir, 'Backups'); const workspacesJsonPath = path.join(backupHome, 'workspaces.json'); diff --git a/src/vs/workbench/services/editor/test/browser/editorService.test.ts b/src/vs/workbench/services/editor/test/browser/editorService.test.ts index 767722336fe..8e1e78ff144 100644 --- a/src/vs/workbench/services/editor/test/browser/editorService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorService.test.ts @@ -27,8 +27,6 @@ let activeEditor: BaseEditor = { let openedEditorInput; let openedEditorOptions; -// @ts-ignore unused local -let openedEditorPosition; function toResource(path) { return URI.from({ scheme: 'custom', path }); @@ -70,7 +68,6 @@ class TestEditorPart implements IEditorPart { public openEditor(input?: EditorInput, options?: EditorOptions, arg?: any): TPromise { openedEditorInput = input; openedEditorOptions = options; - openedEditorPosition = arg; return TPromise.as(activeEditor); } diff --git a/src/vs/workbench/services/history/browser/history.ts b/src/vs/workbench/services/history/browser/history.ts index 2db30d6e03e..04c8610f378 100644 --- a/src/vs/workbench/services/history/browser/history.ts +++ b/src/vs/workbench/services/history/browser/history.ts @@ -30,7 +30,6 @@ import { IExpression } from 'vs/base/common/glob'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ResourceGlobMatcher } from 'vs/workbench/common/resources'; -import { IEditorRegistry, Extensions } from 'vs/workbench/browser/editor'; /** * Stores the selection & view state of an editor and allows to compare it to other selection states. @@ -189,8 +188,6 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic private history: (IEditorInput | IResourceInput)[]; private recentlyClosedFiles: IRecentlyClosedFile[]; private loaded: boolean; - // @ts-ignore unused property - private registry: IEditorRegistry; private resourceFilter: ResourceGlobMatcher; constructor( @@ -211,7 +208,6 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic this.stack = []; this.recentlyClosedFiles = []; this.loaded = false; - this.registry = Registry.as(Extensions.Editors); this.resourceFilter = instantiationService.createInstance( ResourceGlobMatcher, (root: URI) => this.getExcludes(root), diff --git a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts index 2e1640fbd73..e81451b195a 100644 --- a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts +++ b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts @@ -102,8 +102,6 @@ export class TextModelResolverService implements ITextModelService { private resourceModelCollection: ResourceModelCollection; constructor( - // @ts-ignore unused injected service - @ITextFileService private textFileService: ITextFileService, @IUntitledEditorService private untitledEditorService: IUntitledEditorService, @IInstantiationService private instantiationService: IInstantiationService, @IModelService private modelService: IModelService diff --git a/src/vs/workbench/test/browser/actionRegistry.test.ts b/src/vs/workbench/test/browser/actionRegistry.test.ts index f0955049db3..2e9e472df7f 100644 --- a/src/vs/workbench/test/browser/actionRegistry.test.ts +++ b/src/vs/workbench/test/browser/actionRegistry.test.ts @@ -10,14 +10,6 @@ import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { prepareActions } from 'vs/workbench/browser/actions'; import { Action } from 'vs/base/common/actions'; - -// @ts-ignore unused type -class MyClass extends Action { - constructor(id: string, label: string) { - super(id, label); - } -} - suite('Workbench Action Registry', () => { test('Workbench Action Bar prepareActions()', function () { diff --git a/src/vs/workbench/test/browser/parts/editor/editorStacksModel.test.ts b/src/vs/workbench/test/browser/parts/editor/editorStacksModel.test.ts index 9caa11a7e98..fafbd9d733d 100644 --- a/src/vs/workbench/test/browser/parts/editor/editorStacksModel.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/editorStacksModel.test.ts @@ -339,7 +339,6 @@ suite('Editor Stacks Model', () => { let events = modelListener(model); let group1 = model.openGroup('first'); - // @ts-ignore unused property let group2 = model.openGroup('second'); let group3 = model.openGroup('third'); @@ -365,6 +364,7 @@ suite('Editor Stacks Model', () => { model.moveGroup(group3, 1); assert.equal(events.moved.length, 2); + assert.ok(group2); }); test('Groups - Event Aggregation', function () { diff --git a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts index 41e7bdb6667..505e26e4b22 100644 --- a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts +++ b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts @@ -6,8 +6,6 @@ 'use strict'; import * as assert from 'assert'; -import { EditorModel } from 'vs/workbench/common/editor'; -import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; import { TextDiffEditorModel } from 'vs/workbench/common/editor/textDiffEditorModel'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { IModelService } from 'vs/editor/common/services/modelService'; @@ -21,11 +19,6 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IModel } from 'vs/editor/common/editorCommon'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -// @ts-ignore unused type -class MyEditorModel extends EditorModel { } -// @ts-ignore unused type -class MyTextEditorModel extends BaseTextEditorModel { } - class ServiceAccessor { constructor( @ITextModelService public textModelResolverService: ITextModelService, diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index b007781516c..9b42bc2bd74 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -72,8 +72,6 @@ export class TestContextService implements IWorkspaceContextService { public _serviceBrand: any; private workspace: IWorkbenchWorkspace; - // @ts-ignore unused property - private id: string; private options: any; private _onDidChangeWorkspaceName: Emitter; @@ -82,7 +80,6 @@ export class TestContextService implements IWorkspaceContextService { constructor(workspace: any = TestWorkspace, options: any = null) { this.workspace = workspace; - this.id = generateUuid(); this.options = options || Object.create(null); this._onDidChangeWorkspaceFolders = new Emitter(); this._onDidChangeWorkbenchState = new Emitter(); @@ -1015,7 +1012,7 @@ export class TestLifecycleService implements ILifecycleService { when(): Thenable { throw notImplemented(); - }; + } public fireShutdown(reason = ShutdownReason.QUIT): void { this._onShutdown.fire(reason);