提交 f740abf9 编写于 作者: S Sandeep Somavarapu

#37212 Remove unused locals

上级 14ab6b26
......@@ -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);
}
......
......@@ -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;
......
......@@ -101,8 +101,7 @@ export class ExtensionManagementService implements IExtensionManagementService {
onDidUninstallExtension: Event<DidUninstallExtensionEvent> = this._onDidUninstallExtension.event;
constructor(
// @ts-ignore unused injected service
@IEnvironmentService private environmentService: IEnvironmentService,
@IEnvironmentService environmentService: IEnvironmentService,
@IChoiceService private choiceService: IChoiceService,
@IExtensionGalleryService private galleryService: IExtensionGalleryService
) {
......
......@@ -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
......@@ -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
......
......@@ -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);
}
......
......@@ -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
) {
......
......@@ -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
) {
......
......@@ -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,
......
......@@ -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
) {
......
......@@ -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
) {
......
......@@ -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<void>;
// @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
) {
......
......@@ -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,
......
......@@ -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
) {
......
......@@ -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;
......
......@@ -372,8 +372,7 @@ export class WorkspaceConfigModel extends SettingsEditorModel implements ISettin
_configurationTarget: ConfigurationTarget,
onDispose: Event<void>,
@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 = [];
}
......
......@@ -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<string>;
......@@ -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();
......
......@@ -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
) {
}
......
......@@ -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 {
......
......@@ -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');
......
......@@ -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
) {
......
......@@ -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<boolean>;
private inputBoxFocused: IContextKey<boolean>;
......@@ -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 });
......
......@@ -348,8 +348,7 @@ export class FolderMatch extends Disposable {
private _unDisposedFileMatches: ResourceMap<FileMatch>;
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<FileMatch>();
......@@ -498,8 +497,6 @@ export class SearchResult extends Disposable {
private _folderMatches: FolderMatch[] = [];
private _folderMatchesMap: TernarySearchTree<FolderMatch> = TernarySearchTree.forPaths<FolderMatch>();
// @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';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册