diff --git a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts index 4db312fd0a14e1e53ea0916941c690578d898720..15c20b84ce5dd7dbeef413f33d8651da0377cda6 100644 --- a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts +++ b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts @@ -29,8 +29,7 @@ export class ExtensionEnablementService implements IExtensionEnablementService { @IStorageService private storageService: IStorageService, @IWorkspaceContextService private contextService: IWorkspaceContextService, @IEnvironmentService private environmentService: IEnvironmentService, - // @ts-ignore unused injected service - @IExtensionManagementService private extensionManagementService: IExtensionManagementService + @IExtensionManagementService extensionManagementService: IExtensionManagementService ) { extensionManagementService.onDidUninstallExtension(this.onDidUninstallExtension, this, this.disposables); } diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index d219de90a5115cf692f0b981288a6237932881d0..57602ab87697a1b4bf918b11480876f384b281e2 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -17,7 +17,6 @@ import { IRequestService } from 'vs/platform/request/node/request'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IPager } from 'vs/base/common/paging'; import { IRequestOptions, IRequestContext, download, asJson, asText } from 'vs/base/node/request'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import pkg from 'vs/platform/node/package'; import product from 'vs/platform/node/product'; import { isVersionValid } from 'vs/platform/extensions/node/extensionValidator'; @@ -291,9 +290,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { constructor( @IRequestService private requestService: IRequestService, @IEnvironmentService private environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService, - // @ts-ignore unused injected service - @IConfigurationService private configurationService: IConfigurationService + @ITelemetryService private telemetryService: ITelemetryService ) { const config = product.extensionsGallery; this.extensionsGalleryUrl = config && config.serviceUrl; diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 837dd1497b77feefccb34409a52d8a09fc6755e7..8d8d9215728205e98d5955f7cfa63f0c072b1c96 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -101,8 +101,7 @@ export class ExtensionManagementService implements IExtensionManagementService { onDidUninstallExtension: Event = this._onDidUninstallExtension.event; constructor( - // @ts-ignore unused injected service - @IEnvironmentService private environmentService: IEnvironmentService, + @IEnvironmentService environmentService: IEnvironmentService, @IChoiceService private choiceService: IChoiceService, @IExtensionGalleryService private galleryService: IExtensionGalleryService ) { diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts index 553016983c3de4fedf3a6a3dd63e2f78393e5d41..aa70391c53872c16a16cd88f4a7da7a3e8c11ab9 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -10,7 +10,7 @@ import { Disposable } from 'vs/base/common/lifecycle'; import { ExtHostContext, MainThreadTreeViewsShape, ExtHostTreeViewsShape, MainContext, IExtHostContext } from '../node/extHost.protocol'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ViewsRegistry } from 'vs/workbench/browser/parts/views/viewsRegistry'; -import { ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/common/views'; +import { ITreeViewDataProvider, ITreeItem } from 'vs/workbench/common/views'; import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers'; @extHostNamedCustomer(MainContext.MainThreadTreeViews) @@ -103,18 +103,6 @@ class TreeViewDataProvider implements ITreeViewDataProvider { this._onDispose.fire(); } - // @ts-ignore unused property - private clearChildren(treeItemHandle: TreeItemHandle): void { - const children = this.childrenMap.get(treeItemHandle); - if (children) { - for (const child of children) { - this.clearChildren(child); - this.itemsMap.delete(child); - } - this.childrenMap.delete(treeItemHandle); - } - } - private postGetElements(parent: TreeItemHandle, children: ITreeItem[]) { this.setElements(parent, children); } @@ -132,16 +120,4 @@ class TreeViewDataProvider implements ITreeViewDataProvider { } } } - - // @ts-ignore unused property - private populateElementsToExpand(elements: ITreeItem[], toExpand: ITreeItem[]) { - for (const element of elements) { - if (element.collapsibleState === TreeItemCollapsibleState.Expanded) { - toExpand.push(element); - if (element.children && element.children.length) { - this.populateElementsToExpand(element.children, toExpand); - } - } - } - } } \ No newline at end of file diff --git a/src/vs/workbench/parts/markers/browser/markersPanel.ts b/src/vs/workbench/parts/markers/browser/markersPanel.ts index 02968cd53615bb15e648b0c46186493bc45cfa01..3b2ca5e69c480ff324f906491dc70fc0cb0f6035 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanel.ts @@ -29,7 +29,6 @@ import { CollapseAllAction, FilterAction, FilterInputBoxActionItem } from 'vs/wo import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import Messages from 'vs/workbench/parts/markers/common/messages'; import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations'; -import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; @@ -69,8 +68,7 @@ export class MarkersPanel extends Panel { @IEditorGroupService private editorGroupService: IEditorGroupService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IConfigurationService private configurationService: IConfigurationService, - // @ts-ignore unused injected service - @IContextKeyService private contextKeyService: IContextKeyService, + @IContextKeyService contextKeyService: IContextKeyService, @ITelemetryService telemetryService: ITelemetryService, @IListService private listService: IListService, @IThemeService themeService: IThemeService @@ -200,8 +198,7 @@ export class MarkersPanel extends Panel { private createTree(parent: HTMLElement): void { this.treeContainer = dom.append(parent, dom.$('.tree-container')); dom.addClass(this.treeContainer, 'show-file-icons'); - const actionProvider = this.instantiationService.createInstance(ContributableActionProvider); - const renderer = this.instantiationService.createInstance(Viewer.Renderer, this.getActionRunner(), actionProvider); + const renderer = this.instantiationService.createInstance(Viewer.Renderer); const dnd = new SimpleFileResourceDragAndDrop(obj => obj instanceof Resource ? obj.uri : void 0); let controller = this.instantiationService.createInstance(Controller); this.tree = new TreeImpl.Tree(this.treeContainer, { @@ -239,7 +236,7 @@ export class MarkersPanel extends Panel { private createActions(): void { this.collapseAllAction = this.instantiationService.createInstance(CollapseAllAction, this.tree, true); - this.filterAction = new FilterAction(this); + this.filterAction = new FilterAction(); this.actions = [ this.filterAction, this.collapseAllAction diff --git a/src/vs/workbench/parts/markers/browser/markersPanelActions.ts b/src/vs/workbench/parts/markers/browser/markersPanelActions.ts index a2c0a03bfff0587aad55832675677f1d5c9e660b..60960529c701d4f9a8a6bd3da505da6d4f7bbb94 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanelActions.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanelActions.ts @@ -117,8 +117,7 @@ export class FilterAction extends Action { public static ID: string = 'workbench.actions.problems.filter'; - // @ts-ignore unused property - constructor(private markersPanel: MarkersPanel) { + constructor() { super(FilterAction.ID, Messages.MARKERS_PANEL_ACTION_TOOLTIP_FILTER, 'markers-panel-action-filter', true); } diff --git a/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts b/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts index 9e9e050f737d895b5c8c82edebe7195a294b1816..25a1ac2c337b650d1dae363016b2669e49d428ec 100644 --- a/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts +++ b/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts @@ -7,10 +7,8 @@ import { TPromise, Promise } from 'vs/base/common/winjs.base'; import * as dom from 'vs/base/browser/dom'; import * as network from 'vs/base/common/network'; -import { IDataSource, ITree, IRenderer, IAccessibilityProvider, ISorter, IActionProvider } from 'vs/base/parts/tree/browser/tree'; -import { IActionRunner } from 'vs/base/common/actions'; +import { IDataSource, ITree, IRenderer, IAccessibilityProvider, ISorter } from 'vs/base/parts/tree/browser/tree'; import Severity from 'vs/base/common/severity'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge'; import { FileLabel, ResourceLabel } from 'vs/workbench/browser/labels'; import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel'; @@ -81,12 +79,7 @@ export class Renderer implements IRenderer { private static FILE_RESOURCE_TEMPLATE_ID = 'file-resource-template'; private static MARKER_TEMPLATE_ID = 'marker-template'; - // @ts-ignore unused property - constructor(private actionRunner: IActionRunner, - // @ts-ignore unused property - private actionProvider: IActionProvider, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService, + constructor( @IInstantiationService private instantiationService: IInstantiationService, @IThemeService private themeService: IThemeService ) { diff --git a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts index e8afc26ae6b564dca429baef7cfed058a126bf38..2c18337009dddd9298a0260043052e713a5bda7c 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts @@ -152,8 +152,6 @@ export class DefineKeybindingWidget extends Widget { constructor( parent: HTMLElement, - // @ts-ignore unused injected service - @IKeybindingService private keybindingService: IKeybindingService, @IInstantiationService private instantiationService: IInstantiationService, @IThemeService private themeService: IThemeService ) { diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index 9db35637ebe742f11b2ab048d58511b54c7dacd0..18e5249494bab5a8747733169d415a4c05d766f3 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -35,7 +35,7 @@ import { List } from 'vs/base/browser/ui/list/listWidget'; import { IDelegate, IRenderer, IListContextMenuEvent, IListEvent } from 'vs/base/browser/ui/list/list'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/common/message'; +import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { attachListStyler } from 'vs/platform/theme/common/styler'; @@ -50,8 +50,7 @@ export class KeybindingsEditorInput extends EditorInput { public static ID: string = 'workbench.input.keybindings'; public readonly keybindingsModel: KeybindingsEditorModel; - // @ts-ignore unused injected service - constructor( @IInstantiationService private instantiationService: IInstantiationService) { + constructor( @IInstantiationService instantiationService: IInstantiationService) { super(); this.keybindingsModel = instantiationService.createInstance(KeybindingsEditorModel, OS); } @@ -108,8 +107,6 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor @IKeybindingEditingService private keybindingEditingService: IKeybindingEditingService, @IListService private listService: IListService, @IContextKeyService private contextKeyService: IContextKeyService, - // @ts-ignore unused injected service - @IChoiceService private choiceService: IChoiceService, @IMessageService private messageService: IMessageService, @IClipboardService private clipboardService: IClipboardService, @IInstantiationService private instantiationService: IInstantiationService, diff --git a/src/vs/workbench/parts/preferences/browser/preferencesActions.ts b/src/vs/workbench/parts/preferences/browser/preferencesActions.ts index 8a31da0bdfcb65051171bb75d197757d86d6a1f7..789bace140e9d018aa038245bdf8d41648384d55 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesActions.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesActions.ts @@ -114,8 +114,6 @@ export class OpenFolderSettingsAction extends Action { constructor( id: string, label: string, - // @ts-ignore unused injected service - @IPreferencesService private preferencesService: IPreferencesService, @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, @ICommandService private commandService: ICommandService ) { diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index 1bf934be49a70ed457cc0b10ba9ff71811359084..bbdc28998d9d23e1510002fc7f84b1478be292d0 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -34,12 +34,10 @@ import { ContextKeyExpr, IContextKeyService, IContextKey } from 'vs/platform/con import { registerEditorContribution, Command, IEditorContributionCtor } from 'vs/editor/browser/editorExtensions'; 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 { IStorageService } from 'vs/platform/storage/common/storage'; import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { VSash } from 'vs/base/browser/ui/sash/sash'; import { Widget } from 'vs/base/browser/ui/widget'; import { IPreferencesRenderer, DefaultSettingsRenderer, UserSettingsRenderer, WorkspaceSettingsRenderer, FolderSettingsRenderer } from 'vs/workbench/parts/preferences/browser/preferencesRenderers'; @@ -118,8 +116,6 @@ export class PreferencesEditor extends BaseEditor { constructor( @IPreferencesService private preferencesService: IPreferencesService, - // @ts-ignore unused injected service - @IEnvironmentService private environmentService: IEnvironmentService, @ITelemetryService telemetryService: ITelemetryService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IContextKeyService private contextKeyService: IContextKeyService, @@ -697,15 +693,11 @@ export class EditableSettingsEditor extends BaseTextEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, - // @ts-ignore unused injected service - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IInstantiationService instantiationService: IInstantiationService, @IStorageService storageService: IStorageService, @ITextResourceConfigurationService configurationService: ITextResourceConfigurationService, @IThemeService themeService: IThemeService, @IPreferencesService private preferencesService: IPreferencesService, - // @ts-ignore unused injected service - @IModelService private modelService: IModelService, @ITextFileService textFileService: ITextFileService, @IEditorGroupService editorGroupService: IEditorGroupService ) { @@ -769,16 +761,10 @@ export class DefaultPreferencesEditor extends BaseTextEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, - // @ts-ignore unused injected service - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IInstantiationService instantiationService: IInstantiationService, @IStorageService storageService: IStorageService, @ITextResourceConfigurationService configurationService: ITextResourceConfigurationService, @IThemeService themeService: IThemeService, - // @ts-ignore unused injected service - @IPreferencesService private preferencesService: IPreferencesService, - // @ts-ignore unused injected service - @IModelService private modelService: IModelService, @ITextFileService textFileService: ITextFileService, @IEditorGroupService editorGroupService: IEditorGroupService ) { diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index 000e814f19c2a3549a3c3aef012141d1980d16a8..fb5eecd26a31877d32c14fecc1379bf9c140713b 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -24,9 +24,7 @@ import { IContextMenuService, ContextSubMenu } from 'vs/platform/contextview/bro import { SettingsGroupTitleWidget, EditPreferenceWidget, SettingsHeaderWidget, DefaultSettingsHeaderWidget, FloatingClickWidget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations'; -import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IMarkerService, IMarkerData } from 'vs/platform/markers/common/markers'; -import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; @@ -74,8 +72,6 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend constructor(protected editor: ICodeEditor, public readonly preferencesModel: SettingsEditorModel, @IPreferencesService protected preferencesService: IPreferencesService, @ITelemetryService private telemetryService: ITelemetryService, - // @ts-ignore unused injected service - @ITextFileService private textFileService: ITextFileService, @IConfigurationService private configurationService: IConfigurationService, @IInstantiationService protected instantiationService: IInstantiationService ) { @@ -182,11 +178,10 @@ export class WorkspaceSettingsRenderer extends UserSettingsRenderer implements I constructor(editor: ICodeEditor, preferencesModel: SettingsEditorModel, @IPreferencesService preferencesService: IPreferencesService, @ITelemetryService telemetryService: ITelemetryService, - @ITextFileService textFileService: ITextFileService, @IConfigurationService configurationService: IConfigurationService, @IInstantiationService instantiationService: IInstantiationService ) { - super(editor, preferencesModel, preferencesService, telemetryService, textFileService, configurationService, instantiationService); + super(editor, preferencesModel, preferencesService, telemetryService, configurationService, instantiationService); this.unsupportedSettingsRenderer = this._register(instantiationService.createInstance(UnsupportedSettingsRenderer, editor, preferencesModel)); this.workspaceConfigurationRenderer = this._register(instantiationService.createInstance(WorkspaceConfigurationRenderer, editor, preferencesModel)); } @@ -209,11 +204,10 @@ export class FolderSettingsRenderer extends UserSettingsRenderer implements IPre constructor(editor: ICodeEditor, preferencesModel: SettingsEditorModel, @IPreferencesService preferencesService: IPreferencesService, @ITelemetryService telemetryService: ITelemetryService, - @ITextFileService textFileService: ITextFileService, @IConfigurationService configurationService: IConfigurationService, @IInstantiationService instantiationService: IInstantiationService ) { - super(editor, preferencesModel, preferencesService, telemetryService, textFileService, configurationService, instantiationService); + super(editor, preferencesModel, preferencesService, telemetryService, configurationService, instantiationService); this.unsupportedSettingsRenderer = this._register(instantiationService.createInstance(UnsupportedSettingsRenderer, editor, preferencesModel)); } @@ -253,8 +247,6 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR constructor(protected editor: ICodeEditor, public readonly preferencesModel: DefaultSettingsEditorModel, @IPreferencesService protected preferencesService: IPreferencesService, - // @ts-ignore unused injected service - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IInstantiationService protected instantiationService: IInstantiationService ) { super(); @@ -418,8 +410,7 @@ class DefaultSettingsHeaderRenderer extends Disposable { private settingsHeaderWidget: DefaultSettingsHeaderWidget; public onClick: Event; - // @ts-ignore unused property - constructor(private editor: ICodeEditor, scope: ConfigurationScope) { + constructor(editor: ICodeEditor, scope: ConfigurationScope) { super(); const title = scope === ConfigurationScope.RESOURCE ? nls.localize('defaultFolderSettingsTitle', "Default Folder Settings") : nls.localize('defaultSettingsTitle', "Default Settings"); this.settingsHeaderWidget = this._register(new DefaultSettingsHeaderWidget(editor, title)); @@ -534,9 +525,7 @@ export class SettingsGroupTitleRenderer extends Disposable implements HiddenArea export class HiddenAreasRenderer extends Disposable { - constructor(private editor: ICodeEditor, private hiddenAreasProviders: HiddenAreasProvider[], - // @ts-ignore unused injected service - @IInstantiationService private instantiationService: IInstantiationService + constructor(private editor: ICodeEditor, private hiddenAreasProviders: HiddenAreasProvider[] ) { super(); } @@ -718,9 +707,7 @@ export class FilteredMatchesRenderer extends Disposable implements HiddenAreasPr private decorationIds: string[] = []; public hiddenAreas: IRange[] = []; - constructor(private editor: ICodeEditor, - // @ts-ignore unused injected service - @IInstantiationService private instantiationService: IInstantiationService + constructor(private editor: ICodeEditor ) { super(); } @@ -823,9 +810,7 @@ export class HighlightMatchesRenderer extends Disposable { private decorationIds: string[] = []; - constructor(private editor: ICodeEditor, - // @ts-ignore unused injected service - @IInstantiationService private instantiationService: IInstantiationService + constructor(private editor: ICodeEditor ) { super(); } @@ -878,8 +863,6 @@ class EditSettingRenderer extends Disposable { constructor(private editor: ICodeEditor, private masterSettingsModel: ISettingsEditorModel, private settingHighlighter: SettingHighlighter, - // @ts-ignore unused injected service - @IPreferencesService private preferencesService: IPreferencesService, @IInstantiationService private instantiationService: IInstantiationService, @IContextMenuService private contextMenuService: IContextMenuService ) { @@ -1150,8 +1133,6 @@ class UnsupportedSettingsRenderer extends Disposable { constructor( private editor: ICodeEditor, private settingsEditorModel: SettingsEditorModel, - // @ts-ignore unused injected service - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, @IMarkerService private markerService: IMarkerService, @IEnvironmentService private environmentService: IEnvironmentService ) { diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index 3114a2f5ab6b2b4afc7ae9cc443901c86b2facf7..65da66956c4ec3d1308f80af2ac0dbeb60bf1be7 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -19,9 +19,8 @@ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configurat import { Position as EditorPosition, IEditor, IEditorOptions } from 'vs/platform/editor/common/editor'; import { IModel } from 'vs/editor/common/editorCommon'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { IStorageService } from 'vs/platform/storage/common/storage'; import { IFileService, FileOperationError, FileOperationResult } from 'vs/platform/files/common/files'; -import { IMessageService, Severity, IChoiceService } from 'vs/platform/message/common/message'; +import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -64,12 +63,8 @@ export class PreferencesService extends Disposable implements IPreferencesServic @IFileService private fileService: IFileService, @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, @IMessageService private messageService: IMessageService, - // @ts-ignore unused injected service - @IChoiceService private choiceService: IChoiceService, @IWorkspaceContextService private contextService: IWorkspaceContextService, @IInstantiationService private instantiationService: IInstantiationService, - // @ts-ignore unused injected service - @IStorageService private storageService: IStorageService, @IEnvironmentService private environmentService: IEnvironmentService, @ITelemetryService private telemetryService: ITelemetryService, @ITextModelService private textModelResolverService: ITextModelService, diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index 0057f2d43d2eb98ac344a29668128b492b63529b..1dc121e8af3f92a142ca988817ac2660fd6bb090 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -444,8 +444,6 @@ export class SearchWidget extends Widget { constructor(parent: HTMLElement, protected options: SearchOptions, @IContextViewService private contextViewService: IContextViewService, - // @ts-ignore unused injected service - @IContextMenuService private contextMenuService: IContextMenuService, @IInstantiationService protected instantiationService: IInstantiationService, @IThemeService private themeService: IThemeService ) { @@ -594,8 +592,7 @@ export class FloatingClickWidget extends Widget implements IOverlayWidget { constructor( private editor: ICodeEditor, private label: string, - // @ts-ignore unused property - private keyBindingAction: string, + keyBindingAction: string, @IKeybindingService keybindingService: IKeybindingService, @IThemeService private themeService: IThemeService ) { diff --git a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts index 02ef801dbdf1ec3dec530cd10cc281eb79979c86..5588530e4651183b97fd7b15c30dd890c5269199 100644 --- a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts +++ b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts @@ -76,8 +76,7 @@ export class KeybindingsEditorModel extends EditorModel { private modifierLabels: ModifierLabels; constructor( - // @ts-ignore unused property - private os: OperatingSystem, + os: OperatingSystem, @IKeybindingService private keybindingsService: IKeybindingService, @IExtensionService private extensionService: IExtensionService ) { @@ -240,8 +239,7 @@ class KeybindingItemMatches { public readonly whenMatches: IMatch[] = null; public readonly keybindingMatches: KeybindingMatches = null; - // @ts-ignore unused property - constructor(private modifierLabels: ModifierLabels, keybindingItem: IKeybindingItem, private searchValue: string, private words: string[], private keybindingWords: string[], private completeMatch: boolean) { + constructor(private modifierLabels: ModifierLabels, keybindingItem: IKeybindingItem, searchValue: string, words: string[], keybindingWords: string[], private completeMatch: boolean) { this.commandIdMatches = this.matches(searchValue, keybindingItem.command, or(matchesWords, matchesCamelCase), words); this.commandLabelMatches = keybindingItem.commandLabel ? this.matches(searchValue, keybindingItem.commandLabel, (word, wordToMatchAgainst) => matchesWords(word, keybindingItem.commandLabel, true), words) : null; this.commandDefaultLabelMatches = keybindingItem.commandDefaultLabel ? this.matches(searchValue, keybindingItem.commandDefaultLabel, (word, wordToMatchAgainst) => matchesWords(word, keybindingItem.commandDefaultLabel, true), words) : null; diff --git a/src/vs/workbench/parts/preferences/common/preferencesModels.ts b/src/vs/workbench/parts/preferences/common/preferencesModels.ts index f68e560cf0f90ec11db28b83f6fa2842f8fe705e..203dbf98d393b5c40cc31cf0e703fc9e3373e24b 100644 --- a/src/vs/workbench/parts/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/parts/preferences/common/preferencesModels.ts @@ -372,8 +372,7 @@ export class WorkspaceConfigModel extends SettingsEditorModel implements ISettin _configurationTarget: ConfigurationTarget, onDispose: Event, @IFileService private fileService: IFileService, - // @ts-ignore unused injected service - @ITextModelService private textModelResolverService: ITextModelService, + @ITextModelService textModelResolverService: ITextModelService, @ITextFileService textFileService: ITextFileService ) { super(reference, _configurationTarget, textFileService); @@ -811,8 +810,7 @@ class SettingsContentBuilder { return this._contentByLines[this._contentByLines.length - 1] || ''; } - // @ts-ignore unused property - constructor(private _rangeOffset = 0, private _maxLines = Infinity) { + constructor(private _rangeOffset = 0) { this._contentByLines = []; } diff --git a/src/vs/workbench/parts/search/browser/patternInputWidget.ts b/src/vs/workbench/parts/search/browser/patternInputWidget.ts index 5b4826193583322b730432763fc784fd305a9c67..82d85f89eeaa6b819208bdd37c65811d27dafa6b 100644 --- a/src/vs/workbench/parts/search/browser/patternInputWidget.ts +++ b/src/vs/workbench/parts/search/browser/patternInputWidget.ts @@ -37,8 +37,6 @@ export class PatternInputWidget extends Widget { private ariaLabel: string; private domNode: HTMLElement; - // @ts-ignore unused property - private inputNode: HTMLInputElement; protected inputBox: InputBox; private history: HistoryNavigator; @@ -58,7 +56,6 @@ export class PatternInputWidget extends Widget { this.ariaLabel = options.ariaLabel || nls.localize('defaultLabel', "input"); this.domNode = null; - this.inputNode = null; this.inputBox = null; this.render(); diff --git a/src/vs/workbench/parts/search/browser/replaceService.ts b/src/vs/workbench/parts/search/browser/replaceService.ts index 90c0895a44d7e6bcd75a2c95d70dab3911441c1a..2730b42e4ea4a6d030eafe892b4ea080583dff26 100644 --- a/src/vs/workbench/parts/search/browser/replaceService.ts +++ b/src/vs/workbench/parts/search/browser/replaceService.ts @@ -99,11 +99,7 @@ export class ReplaceService implements IReplaceService { @ITelemetryService private telemetryService: ITelemetryService, @IFileService private fileService: IFileService, @IEditorService private editorService: IWorkbenchEditorService, - // @ts-ignore unused injected service - @IInstantiationService private instantiationService: IInstantiationService, @ITextModelService private textModelResolverService: ITextModelService, - // @ts-ignore unused injected service - @ISearchWorkbenchService private searchWorkbenchService: ISearchWorkbenchService ) { } diff --git a/src/vs/workbench/parts/search/browser/search.contribution.ts b/src/vs/workbench/parts/search/browser/search.contribution.ts index 372f7fd2b99f67ebd0de86eec45d3b102cd5ef1d..b077e8628e8bfd1518f92c3872795cfd2f283c97 100644 --- a/src/vs/workbench/parts/search/browser/search.contribution.ts +++ b/src/vs/workbench/parts/search/browser/search.contribution.ts @@ -175,14 +175,11 @@ CommandsRegistry.registerCommand(searchActions.FindInFolderAction.ID, searchActi class ExplorerViewerActionContributor extends ActionBarContributor { private _instantiationService: IInstantiationService; - // @ts-ignore unused injected service - private _contextService: IWorkspaceContextService; constructor( @IInstantiationService instantiationService: IInstantiationService, @IWorkspaceContextService contextService: IWorkspaceContextService) { super(); this._instantiationService = instantiationService; - this._contextService = contextService; } public hasSecondaryActions(context: any): boolean { diff --git a/src/vs/workbench/parts/search/browser/searchActions.ts b/src/vs/workbench/parts/search/browser/searchActions.ts index b9939f0339f506d2d8a99556d1b09bd4fa3a67c2..fc811e488ab7302091b41e3344a132795cd599bd 100644 --- a/src/vs/workbench/parts/search/browser/searchActions.ts +++ b/src/vs/workbench/parts/search/browser/searchActions.ts @@ -583,8 +583,6 @@ export class RemoveAction extends AbstractSearchAndReplaceAction { export class ReplaceAllAction extends AbstractSearchAndReplaceAction { constructor(private viewer: ITree, private fileMatch: FileMatch, private viewlet: SearchViewlet, - // @ts-ignore unused injected service - @IReplaceService private replaceService: IReplaceService, @IKeybindingService keyBindingService: IKeybindingService, @ITelemetryService private telemetryService: ITelemetryService) { super(Constants.ReplaceAllInFileActionId, appendKeyBindingLabel(nls.localize('file.replaceAll.label', "Replace All"), keyBindingService.lookupKeybinding(Constants.ReplaceAllInFileActionId), keyBindingService), 'action-replace-all'); diff --git a/src/vs/workbench/parts/search/browser/searchResultsView.ts b/src/vs/workbench/parts/search/browser/searchResultsView.ts index d9eebd8932cac6bd5bc73722517524d8400a18b6..183c34f1c0ed2aa88a5b28d1b4f65dd5b5160786 100644 --- a/src/vs/workbench/parts/search/browser/searchResultsView.ts +++ b/src/vs/workbench/parts/search/browser/searchResultsView.ts @@ -155,8 +155,6 @@ export class SearchRenderer extends Disposable implements IRenderer { constructor( actionRunner: IActionRunner, private viewlet: SearchViewlet, - // @ts-ignore unused injected service - @IWorkspaceContextService private contextService: IWorkspaceContextService, @IInstantiationService private instantiationService: IInstantiationService, @IThemeService private themeService: IThemeService ) { diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index ab20d68c6c58dc3f8510a8342bef47efd46ba845..35bae8e9201b8a5ffb7ca00d2b4517c63e8c965c 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -9,7 +9,6 @@ import 'vs/css!./media/searchviewlet'; import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; import { Emitter, debounceEvent } from 'vs/base/common/event'; -import lifecycle = require('vs/base/common/lifecycle'); import errors = require('vs/base/common/errors'); import aria = require('vs/base/browser/ui/aria/aria'); import env = require('vs/base/common/platform'); @@ -71,12 +70,8 @@ export class SearchViewlet extends Viewlet { private isDisposed: boolean; - // @ts-ignore unused property - private loading: boolean; private queryBuilder: QueryBuilder; private viewModel: SearchModel; - // @ts-ignore unused property - private callOnModelChange: lifecycle.IDisposable[]; private viewletVisible: IContextKey; private inputBoxFocused: IContextKey; @@ -90,8 +85,6 @@ export class SearchViewlet extends Viewlet { private actionRegistry: { [key: string]: Action; }; private tree: ITree; private viewletSettings: any; - // @ts-ignore unused property - private domNode: Builder; private messages: Builder; private searchWidgetsContainer: Builder; private searchWidget: SearchWidget; @@ -140,7 +133,6 @@ export class SearchViewlet extends Viewlet { this.fileMatchOrMatchFocused = Constants.FileMatchOrMatchFocusKey.bindTo(contextKeyService); this.fileMatchFocused = Constants.FileFocusKey.bindTo(contextKeyService); this.matchFocused = Constants.MatchFocusKey.bindTo(this.contextKeyService); - this.callOnModelChange = []; this.queryBuilder = this.instantiationService.createInstance(QueryBuilder); this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); @@ -167,7 +159,7 @@ export class SearchViewlet extends Viewlet { this.viewModel = this.searchWorkbenchService.searchModel; let builder: Builder; - this.domNode = parent.div({ + parent.div({ 'class': 'search-viewlet' }, (div) => { builder = div; @@ -1053,7 +1045,6 @@ export class SearchViewlet extends Viewlet { this.progressService.show(/*infinite=*/true) : this.progressService.show(progressTotal); - this.loading = true; this.searchWidget.searchInput.clearMessage(); this.showEmptyStage(); @@ -1089,7 +1080,6 @@ export class SearchViewlet extends Viewlet { this.viewModel.replaceString = this.searchWidget.getReplaceValue(); let hasResults = !this.viewModel.searchResult.isEmpty(); - this.loading = false; this.actionRegistry['refresh'].enabled = true; this.actionRegistry['vs.tree.collapse'].enabled = hasResults; @@ -1201,7 +1191,6 @@ export class SearchViewlet extends Viewlet { if (errors.isPromiseCanceledError(e)) { onComplete(null); } else { - this.loading = false; isDone = true; progressRunner.done(); this.searchWidget.searchInput.showMessage({ content: e.message, type: MessageType.ERROR }); diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index a3ada6ff3250cc332abd78b44420f1b69c098976..d8ba6d823d33801644b0294a9d955da93d716587 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -348,8 +348,7 @@ export class FolderMatch extends Disposable { private _unDisposedFileMatches: ResourceMap; private _replacingAll: boolean = false; - // @ts-ignore unused injected service - constructor(private _resource: URI, private _id: string, private _index: number, private _query: ISearchQuery, private _parent: SearchResult, private _searchModel: SearchModel, @IReplaceService private replaceService: IReplaceService, @ITelemetryService private telemetryService: ITelemetryService, + constructor(private _resource: URI, private _id: string, private _index: number, private _query: ISearchQuery, private _parent: SearchResult, private _searchModel: SearchModel, @IReplaceService private replaceService: IReplaceService, @IInstantiationService private instantiationService: IInstantiationService) { super(); this._fileMatches = new ResourceMap(); @@ -498,8 +497,6 @@ export class SearchResult extends Disposable { private _folderMatches: FolderMatch[] = []; private _folderMatchesMap: TernarySearchTree = TernarySearchTree.forPaths(); - // @ts-ignore unused property - private _query: ISearchQuery = null; private _showHighlights: boolean; private _rangeHighlightDecorations: RangeHighlightDecorations; @@ -513,7 +510,6 @@ export class SearchResult extends Disposable { public set query(query: ISearchQuery) { // When updating the query we could change the roots, so ensure we clean up the old roots first. this.clear(); - this._query = query; const otherFiles = URI.parse(''); this._folderMatches = (query.folderQueries || []).map((fq) => fq.folder).concat([otherFiles]).map((resource, index) => { const id = resource.toString() || 'otherFiles';