Skip to content

Commit f740abf

Browse files
committed
#37212 Remove unused locals
1 parent 14ab6b2 commit f740abf

23 files changed

+26
-147
lines changed

src/vs/platform/extensionManagement/common/extensionEnablementService.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ export class ExtensionEnablementService implements IExtensionEnablementService {
2929
@IStorageService private storageService: IStorageService,
3030
@IWorkspaceContextService private contextService: IWorkspaceContextService,
3131
@IEnvironmentService private environmentService: IEnvironmentService,
32-
// @ts-ignore unused injected service
33-
@IExtensionManagementService private extensionManagementService: IExtensionManagementService
32+
@IExtensionManagementService extensionManagementService: IExtensionManagementService
3433
) {
3534
extensionManagementService.onDidUninstallExtension(this.onDidUninstallExtension, this, this.disposables);
3635
}

src/vs/platform/extensionManagement/node/extensionGalleryService.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { IRequestService } from 'vs/platform/request/node/request';
1717
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
1818
import { IPager } from 'vs/base/common/paging';
1919
import { IRequestOptions, IRequestContext, download, asJson, asText } from 'vs/base/node/request';
20-
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
2120
import pkg from 'vs/platform/node/package';
2221
import product from 'vs/platform/node/product';
2322
import { isVersionValid } from 'vs/platform/extensions/node/extensionValidator';
@@ -291,9 +290,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
291290
constructor(
292291
@IRequestService private requestService: IRequestService,
293292
@IEnvironmentService private environmentService: IEnvironmentService,
294-
@ITelemetryService private telemetryService: ITelemetryService,
295-
// @ts-ignore unused injected service
296-
@IConfigurationService private configurationService: IConfigurationService
293+
@ITelemetryService private telemetryService: ITelemetryService
297294
) {
298295
const config = product.extensionsGallery;
299296
this.extensionsGalleryUrl = config && config.serviceUrl;

src/vs/platform/extensionManagement/node/extensionManagementService.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ export class ExtensionManagementService implements IExtensionManagementService {
101101
onDidUninstallExtension: Event<DidUninstallExtensionEvent> = this._onDidUninstallExtension.event;
102102

103103
constructor(
104-
// @ts-ignore unused injected service
105-
@IEnvironmentService private environmentService: IEnvironmentService,
104+
@IEnvironmentService environmentService: IEnvironmentService,
106105
@IChoiceService private choiceService: IChoiceService,
107106
@IExtensionGalleryService private galleryService: IExtensionGalleryService
108107
) {

src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts

+1-25
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Disposable } from 'vs/base/common/lifecycle';
1010
import { ExtHostContext, MainThreadTreeViewsShape, ExtHostTreeViewsShape, MainContext, IExtHostContext } from '../node/extHost.protocol';
1111
import { IMessageService, Severity } from 'vs/platform/message/common/message';
1212
import { ViewsRegistry } from 'vs/workbench/browser/parts/views/viewsRegistry';
13-
import { ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/common/views';
13+
import { ITreeViewDataProvider, ITreeItem } from 'vs/workbench/common/views';
1414
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
1515

1616
@extHostNamedCustomer(MainContext.MainThreadTreeViews)
@@ -103,18 +103,6 @@ class TreeViewDataProvider implements ITreeViewDataProvider {
103103
this._onDispose.fire();
104104
}
105105

106-
// @ts-ignore unused property
107-
private clearChildren(treeItemHandle: TreeItemHandle): void {
108-
const children = this.childrenMap.get(treeItemHandle);
109-
if (children) {
110-
for (const child of children) {
111-
this.clearChildren(child);
112-
this.itemsMap.delete(child);
113-
}
114-
this.childrenMap.delete(treeItemHandle);
115-
}
116-
}
117-
118106
private postGetElements(parent: TreeItemHandle, children: ITreeItem[]) {
119107
this.setElements(parent, children);
120108
}
@@ -132,16 +120,4 @@ class TreeViewDataProvider implements ITreeViewDataProvider {
132120
}
133121
}
134122
}
135-
136-
// @ts-ignore unused property
137-
private populateElementsToExpand(elements: ITreeItem[], toExpand: ITreeItem[]) {
138-
for (const element of elements) {
139-
if (element.collapsibleState === TreeItemCollapsibleState.Expanded) {
140-
toExpand.push(element);
141-
if (element.children && element.children.length) {
142-
this.populateElementsToExpand(element.children, toExpand);
143-
}
144-
}
145-
}
146-
}
147123
}

src/vs/workbench/parts/markers/browser/markersPanel.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import { CollapseAllAction, FilterAction, FilterInputBoxActionItem } from 'vs/wo
2929
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
3030
import Messages from 'vs/workbench/parts/markers/common/messages';
3131
import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations';
32-
import { ContributableActionProvider } from 'vs/workbench/browser/actions';
3332
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
3433
import { IListService } from 'vs/platform/list/browser/listService';
3534
import { IThemeService } from 'vs/platform/theme/common/themeService';
@@ -69,8 +68,7 @@ export class MarkersPanel extends Panel {
6968
@IEditorGroupService private editorGroupService: IEditorGroupService,
7069
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
7170
@IConfigurationService private configurationService: IConfigurationService,
72-
// @ts-ignore unused injected service
73-
@IContextKeyService private contextKeyService: IContextKeyService,
71+
@IContextKeyService contextKeyService: IContextKeyService,
7472
@ITelemetryService telemetryService: ITelemetryService,
7573
@IListService private listService: IListService,
7674
@IThemeService themeService: IThemeService
@@ -200,8 +198,7 @@ export class MarkersPanel extends Panel {
200198
private createTree(parent: HTMLElement): void {
201199
this.treeContainer = dom.append(parent, dom.$('.tree-container'));
202200
dom.addClass(this.treeContainer, 'show-file-icons');
203-
const actionProvider = this.instantiationService.createInstance(ContributableActionProvider);
204-
const renderer = this.instantiationService.createInstance(Viewer.Renderer, this.getActionRunner(), actionProvider);
201+
const renderer = this.instantiationService.createInstance(Viewer.Renderer);
205202
const dnd = new SimpleFileResourceDragAndDrop(obj => obj instanceof Resource ? obj.uri : void 0);
206203
let controller = this.instantiationService.createInstance(Controller);
207204
this.tree = new TreeImpl.Tree(this.treeContainer, {
@@ -239,7 +236,7 @@ export class MarkersPanel extends Panel {
239236

240237
private createActions(): void {
241238
this.collapseAllAction = this.instantiationService.createInstance(CollapseAllAction, this.tree, true);
242-
this.filterAction = new FilterAction(this);
239+
this.filterAction = new FilterAction();
243240
this.actions = [
244241
this.filterAction,
245242
this.collapseAllAction

src/vs/workbench/parts/markers/browser/markersPanelActions.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ export class FilterAction extends Action {
117117

118118
public static ID: string = 'workbench.actions.problems.filter';
119119

120-
// @ts-ignore unused property
121-
constructor(private markersPanel: MarkersPanel) {
120+
constructor() {
122121
super(FilterAction.ID, Messages.MARKERS_PANEL_ACTION_TOOLTIP_FILTER, 'markers-panel-action-filter', true);
123122
}
124123

src/vs/workbench/parts/markers/browser/markersTreeViewer.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
import { TPromise, Promise } from 'vs/base/common/winjs.base';
88
import * as dom from 'vs/base/browser/dom';
99
import * as network from 'vs/base/common/network';
10-
import { IDataSource, ITree, IRenderer, IAccessibilityProvider, ISorter, IActionProvider } from 'vs/base/parts/tree/browser/tree';
11-
import { IActionRunner } from 'vs/base/common/actions';
10+
import { IDataSource, ITree, IRenderer, IAccessibilityProvider, ISorter } from 'vs/base/parts/tree/browser/tree';
1211
import Severity from 'vs/base/common/severity';
13-
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
1412
import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge';
1513
import { FileLabel, ResourceLabel } from 'vs/workbench/browser/labels';
1614
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
@@ -81,12 +79,7 @@ export class Renderer implements IRenderer {
8179
private static FILE_RESOURCE_TEMPLATE_ID = 'file-resource-template';
8280
private static MARKER_TEMPLATE_ID = 'marker-template';
8381

84-
// @ts-ignore unused property
85-
constructor(private actionRunner: IActionRunner,
86-
// @ts-ignore unused property
87-
private actionProvider: IActionProvider,
88-
// @ts-ignore unused injected service
89-
@IWorkspaceContextService private contextService: IWorkspaceContextService,
82+
constructor(
9083
@IInstantiationService private instantiationService: IInstantiationService,
9184
@IThemeService private themeService: IThemeService
9285
) {

src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts

-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ export class DefineKeybindingWidget extends Widget {
152152

153153
constructor(
154154
parent: HTMLElement,
155-
// @ts-ignore unused injected service
156-
@IKeybindingService private keybindingService: IKeybindingService,
157155
@IInstantiationService private instantiationService: IInstantiationService,
158156
@IThemeService private themeService: IThemeService
159157
) {

src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { List } from 'vs/base/browser/ui/list/listWidget';
3535
import { IDelegate, IRenderer, IListContextMenuEvent, IListEvent } from 'vs/base/browser/ui/list/list';
3636
import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
3737
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
38-
import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/common/message';
38+
import { IMessageService, Severity } from 'vs/platform/message/common/message';
3939
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
4040
import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes';
4141
import { attachListStyler } from 'vs/platform/theme/common/styler';
@@ -50,8 +50,7 @@ export class KeybindingsEditorInput extends EditorInput {
5050
public static ID: string = 'workbench.input.keybindings';
5151
public readonly keybindingsModel: KeybindingsEditorModel;
5252

53-
// @ts-ignore unused injected service
54-
constructor( @IInstantiationService private instantiationService: IInstantiationService) {
53+
constructor( @IInstantiationService instantiationService: IInstantiationService) {
5554
super();
5655
this.keybindingsModel = instantiationService.createInstance(KeybindingsEditorModel, OS);
5756
}
@@ -108,8 +107,6 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
108107
@IKeybindingEditingService private keybindingEditingService: IKeybindingEditingService,
109108
@IListService private listService: IListService,
110109
@IContextKeyService private contextKeyService: IContextKeyService,
111-
// @ts-ignore unused injected service
112-
@IChoiceService private choiceService: IChoiceService,
113110
@IMessageService private messageService: IMessageService,
114111
@IClipboardService private clipboardService: IClipboardService,
115112
@IInstantiationService private instantiationService: IInstantiationService,

src/vs/workbench/parts/preferences/browser/preferencesActions.ts

-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ export class OpenFolderSettingsAction extends Action {
114114
constructor(
115115
id: string,
116116
label: string,
117-
// @ts-ignore unused injected service
118-
@IPreferencesService private preferencesService: IPreferencesService,
119117
@IWorkspaceContextService private workspaceContextService: IWorkspaceContextService,
120118
@ICommandService private commandService: ICommandService
121119
) {

src/vs/workbench/parts/preferences/browser/preferencesEditor.ts

-14
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ import { ContextKeyExpr, IContextKeyService, IContextKey } from 'vs/platform/con
3434
import { registerEditorContribution, Command, IEditorContributionCtor } from 'vs/editor/browser/editorExtensions';
3535
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
3636
import { IThemeService } from 'vs/platform/theme/common/themeService';
37-
import { IModelService } from 'vs/editor/common/services/modelService';
3837
import { IStorageService } from 'vs/platform/storage/common/storage';
3938
import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
4039
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
4140
import { ITextModelService } from 'vs/editor/common/services/resolverService';
42-
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
4341
import { VSash } from 'vs/base/browser/ui/sash/sash';
4442
import { Widget } from 'vs/base/browser/ui/widget';
4543
import { IPreferencesRenderer, DefaultSettingsRenderer, UserSettingsRenderer, WorkspaceSettingsRenderer, FolderSettingsRenderer } from 'vs/workbench/parts/preferences/browser/preferencesRenderers';
@@ -118,8 +116,6 @@ export class PreferencesEditor extends BaseEditor {
118116

119117
constructor(
120118
@IPreferencesService private preferencesService: IPreferencesService,
121-
// @ts-ignore unused injected service
122-
@IEnvironmentService private environmentService: IEnvironmentService,
123119
@ITelemetryService telemetryService: ITelemetryService,
124120
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
125121
@IContextKeyService private contextKeyService: IContextKeyService,
@@ -697,15 +693,11 @@ export class EditableSettingsEditor extends BaseTextEditor {
697693

698694
constructor(
699695
@ITelemetryService telemetryService: ITelemetryService,
700-
// @ts-ignore unused injected service
701-
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
702696
@IInstantiationService instantiationService: IInstantiationService,
703697
@IStorageService storageService: IStorageService,
704698
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
705699
@IThemeService themeService: IThemeService,
706700
@IPreferencesService private preferencesService: IPreferencesService,
707-
// @ts-ignore unused injected service
708-
@IModelService private modelService: IModelService,
709701
@ITextFileService textFileService: ITextFileService,
710702
@IEditorGroupService editorGroupService: IEditorGroupService
711703
) {
@@ -769,16 +761,10 @@ export class DefaultPreferencesEditor extends BaseTextEditor {
769761

770762
constructor(
771763
@ITelemetryService telemetryService: ITelemetryService,
772-
// @ts-ignore unused injected service
773-
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
774764
@IInstantiationService instantiationService: IInstantiationService,
775765
@IStorageService storageService: IStorageService,
776766
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
777767
@IThemeService themeService: IThemeService,
778-
// @ts-ignore unused injected service
779-
@IPreferencesService private preferencesService: IPreferencesService,
780-
// @ts-ignore unused injected service
781-
@IModelService private modelService: IModelService,
782768
@ITextFileService textFileService: ITextFileService,
783769
@IEditorGroupService editorGroupService: IEditorGroupService
784770
) {

0 commit comments

Comments
 (0)