From 087629786a9780c2ea8b4379aa8c4e09079c7db3 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 4 Jan 2019 10:57:55 -0800 Subject: [PATCH] Mark private service properties declarated in ctors as readonly --- .../sharedProcess/contrib/logsDataCleaner.ts | 2 +- .../contrib/storageDataCleaner.ts | 2 +- src/vs/code/electron-main/app.ts | 12 +- src/vs/code/electron-main/auth.ts | 2 +- src/vs/code/electron-main/window.ts | 14 +- src/vs/code/electron-main/windows.ts | 20 +- src/vs/code/node/cliProcessMain.ts | 6 +- .../services/resourceConfigurationImpl.ts | 6 +- .../goToDefinition/goToDefinitionMouse.ts | 4 +- .../editor/contrib/rename/renameInputField.ts | 2 +- .../smartSelect/test/smartSelect.test.ts | 2 +- .../editor/contrib/suggest/suggestWidget.ts | 2 +- .../browser/quickOpen/editorQuickOpen.ts | 2 +- .../standalone/browser/simpleServices.ts | 2 +- .../test/common/services/modelService.test.ts | 2 +- .../backup/electron-main/backupMainService.ts | 4 +- .../electron-browser/broadcastService.ts | 2 +- .../contextview/browser/contextViewService.ts | 2 +- src/vs/platform/dialogs/node/dialogIpc.ts | 2 +- .../platform/download/node/downloadService.ts | 2 +- .../driver/electron-browser/driver.ts | 2 +- .../platform/driver/electron-main/driver.ts | 2 +- .../common/extensionEnablementService.ts | 6 +- .../node/extensionGalleryService.ts | 8 +- .../node/extensionManagementService.ts | 8 +- .../node/multiExtensionManagement.ts | 10 +- .../electron-main/historyMainService.ts | 8 +- .../integrity/node/integrityServiceImpl.ts | 4 +- .../issue/electron-main/issueService.ts | 10 +- src/vs/platform/label/common/label.ts | 6 +- .../launch/electron-main/launchService.ts | 8 +- .../electron-browser/lifecycleService.ts | 8 +- .../lifecycle/electron-main/lifecycleMain.ts | 4 +- src/vs/platform/list/browser/listService.ts | 6 +- .../localizations/node/localizations.ts | 6 +- .../platform/menubar/electron-main/menubar.ts | 16 +- .../menubar/electron-main/menubarService.ts | 4 +- .../platform/request/node/requestService.ts | 2 +- .../storage/node/storageMainService.ts | 6 +- .../platform/storage/node/storageService.ts | 8 +- .../electron-main/abstractUpdateService.ts | 4 +- .../electron-main/updateService.darwin.ts | 2 +- .../electron-main/updateService.linux.ts | 2 +- .../electron-main/updateService.snap.ts | 4 +- .../electron-main/updateService.win32.ts | 2 +- .../url/electron-main/electronUrlListener.ts | 2 +- .../windows/electron-browser/windowService.ts | 2 +- .../windows/electron-main/windowsService.ts | 10 +- .../electron-main/workspacesMainService.ts | 4 +- .../api/browser/viewsExtensionPoint.ts | 2 +- .../extensionHost.contribution.ts | 2 +- .../electron-browser/mainThreadComments.ts | 10 +- .../mainThreadConfiguration.ts | 2 +- .../mainThreadDebugService.ts | 2 +- .../api/electron-browser/mainThreadSCM.ts | 2 +- .../mainThreadSaveParticipant.ts | 12 +- .../mainThreadTerminalService.ts | 2 +- .../electron-browser/mainThreadTreeViews.ts | 4 +- .../api/electron-browser/mainThreadUrls.ts | 4 +- .../api/electron-browser/mainThreadWindow.ts | 2 +- src/vs/workbench/api/node/extHostSCM.ts | 2 +- .../actions/toggleActivityBarVisibility.ts | 4 +- .../browser/actions/toggleCenteredLayout.ts | 2 +- .../browser/actions/toggleEditorLayout.ts | 2 +- .../browser/actions/toggleSidebarPosition.ts | 4 +- .../actions/toggleSidebarVisibility.ts | 2 +- .../actions/toggleStatusbarVisibility.ts | 4 +- .../browser/actions/toggleTabsVisibility.ts | 2 +- .../browser/actions/toggleZenMode.ts | 2 +- .../browser/actions/workspaceActions.ts | 34 +-- src/vs/workbench/browser/dnd.ts | 18 +- src/vs/workbench/browser/labels.ts | 24 +- src/vs/workbench/browser/layout.ts | 12 +- .../parts/activitybar/activitybarActions.ts | 14 +- .../parts/activitybar/activitybarPart.ts | 14 +- .../workbench/browser/parts/compositeBar.ts | 4 +- .../browser/parts/compositeBarActions.ts | 8 +- .../parts/editor/editor.contribution.ts | 4 +- .../browser/parts/editor/editorActions.ts | 68 +++--- .../browser/parts/editor/editorControl.ts | 4 +- .../browser/parts/editor/editorDropTarget.ts | 2 +- .../browser/parts/editor/editorGroupView.ts | 16 +- .../browser/parts/editor/editorPart.ts | 4 +- .../browser/parts/editor/editorPicker.ts | 4 +- .../browser/parts/editor/editorStatus.ts | 46 ++-- .../browser/parts/editor/editorWidgets.ts | 8 +- .../browser/parts/editor/rangeDecorations.ts | 2 +- .../browser/parts/editor/resourceViewer.ts | 2 +- .../browser/parts/editor/sideBySideEditor.ts | 2 +- .../browser/parts/editor/tabsTitleControl.ts | 2 +- .../browser/parts/editor/textEditor.ts | 2 +- .../browser/parts/editor/titleControl.ts | 14 +- .../notifications/notificationsActions.ts | 16 +- .../notifications/notificationsCenter.ts | 8 +- .../parts/notifications/notificationsList.ts | 4 +- .../notifications/notificationsStatus.ts | 2 +- .../notifications/notificationsToasts.ts | 10 +- .../notifications/notificationsViewer.ts | 14 +- .../browser/parts/panel/panelActions.ts | 16 +- .../browser/parts/panel/panelPart.ts | 2 +- .../browser/parts/quickinput/quickInput.ts | 18 +- .../parts/quickinput/quickInputList.ts | 2 +- .../parts/quickopen/quickOpenController.ts | 38 +-- .../browser/parts/quickopen/quickopen.ts | 6 +- .../browser/parts/sidebar/sidebarPart.ts | 6 +- .../browser/parts/statusbar/statusbarPart.ts | 20 +- .../browser/parts/titlebar/menubarControl.ts | 28 +-- .../browser/parts/titlebar/titlebarPart.ts | 18 +- .../browser/parts/views/customView.ts | 34 +-- src/vs/workbench/browser/parts/views/views.ts | 6 +- src/vs/workbench/browser/quickopen.ts | 2 +- src/vs/workbench/browser/viewlet.ts | 4 +- .../common/editor/binaryEditorModel.ts | 2 +- .../common/editor/dataUriEditorInput.ts | 2 +- src/vs/workbench/common/editor/editorGroup.ts | 4 +- .../common/editor/resourceEditorInput.ts | 4 +- .../common/editor/untitledEditorInput.ts | 8 +- .../common/editor/untitledEditorModel.ts | 4 +- src/vs/workbench/electron-browser/actions.ts | 50 ++-- .../workbench/electron-browser/resources.ts | 4 +- src/vs/workbench/electron-browser/window.ts | 30 +-- .../workbench/electron-browser/workbench.ts | 16 +- .../parts/backup/common/backupModelTracker.ts | 8 +- .../parts/backup/common/backupRestorer.ts | 6 +- .../cli/electron-browser/cli.contribution.ts | 12 +- .../toggleMultiCursorModifier.ts | 2 +- .../commentsEditorContribution.ts | 18 +- .../electron-browser/commentsPanel.ts | 10 +- .../electron-browser/commentsTreeViewer.ts | 2 +- .../parts/debug/browser/baseDebugView.ts | 4 +- .../parts/debug/browser/breakpointsView.ts | 16 +- .../parts/debug/browser/debugActionItems.ts | 10 +- .../parts/debug/browser/debugActions.ts | 18 +- .../debug/browser/debugContentProvider.ts | 8 +- .../debug/browser/debugEditorModelManager.ts | 4 +- .../parts/debug/browser/debugQuickOpen.ts | 8 +- .../parts/debug/browser/debugStatus.ts | 4 +- .../parts/debug/browser/debugToolbar.ts | 16 +- .../parts/debug/browser/debugViewlet.ts | 8 +- .../parts/debug/browser/exceptionWidget.ts | 2 +- .../parts/debug/browser/linkDetector.ts | 2 +- .../parts/debug/browser/loadedScriptsView.ts | 16 +- .../debug/browser/statusbarColorProvider.ts | 6 +- .../electron-browser/breakpointWidget.ts | 14 +- .../debug/electron-browser/callStackView.ts | 14 +- .../debugConfigurationManager.ts | 20 +- .../debugEditorContribution.ts | 18 +- .../debug/electron-browser/debugHover.ts | 14 +- .../debug/electron-browser/debugService.ts | 36 +-- .../debug/electron-browser/debugSession.ts | 14 +- .../electron-browser/electronDebugActions.ts | 2 +- .../parts/debug/electron-browser/repl.ts | 32 +-- .../debug/electron-browser/terminalSupport.ts | 4 +- .../debug/electron-browser/variablesView.ts | 10 +- .../electron-browser/watchExpressionsView.ts | 10 +- src/vs/workbench/parts/debug/node/debugger.ts | 10 +- .../electron-browser/experimentalPrompt.ts | 8 +- .../experiments/node/experimentService.ts | 16 +- .../extensions/browser/extensionsQuickOpen.ts | 10 +- .../extensions/browser/extensionsViewer.ts | 6 +- .../electron-browser/extensionEditor.ts | 2 +- .../electron-browser/extensionTipsService.ts | 30 +-- .../electron-browser/extensionsActions.ts | 220 +++++++++--------- .../extensionsAutoProfiler.ts | 2 +- .../electron-browser/extensionsList.ts | 14 +- .../electron-browser/extensionsUtils.ts | 10 +- .../electron-browser/extensionsViewlet.ts | 28 +-- .../electron-browser/extensionsViews.ts | 12 +- .../node/extensionsWorkbenchService.ts | 28 +-- .../feedback/electron-browser/feedback.ts | 10 +- .../electron-browser/feedbackStatusbarItem.ts | 12 +- .../files/browser/editors/binaryFileEditor.ts | 4 +- .../browser/editors/fileEditorTracker.ts | 18 +- .../files/browser/editors/textFileEditor.ts | 10 +- .../parts/files/common/dirtyFilesTracker.ts | 12 +- .../files/common/editors/fileEditorInput.ts | 10 +- .../parts/files/common/explorerModel.ts | 2 +- src/vs/workbench/parts/files/common/files.ts | 8 +- .../files/electron-browser/explorerViewlet.ts | 8 +- .../files/electron-browser/fileActions.ts | 64 ++--- .../electron-browser/saveErrorHandler.ts | 24 +- .../files/electron-browser/views/emptyView.ts | 6 +- .../electron-browser/views/explorerView.ts | 16 +- .../electron-browser/views/explorerViewer.ts | 50 ++-- .../electron-browser/views/openEditorsView.ts | 18 +- .../localizations.contribution.ts | 20 +- .../electron-browser/localizationsActions.ts | 8 +- .../logs/electron-browser/logsActions.ts | 8 +- .../parts/markers/electron-browser/markers.ts | 14 +- .../markers/electron-browser/markersPanel.ts | 16 +- .../electron-browser/markersPanelActions.ts | 16 +- .../electron-browser/markersTreeViewer.ts | 8 +- .../parts/output/browser/outputActions.ts | 26 +-- .../parts/output/browser/outputPanel.ts | 6 +- .../parts/output/common/outputLinkProvider.ts | 4 +- .../output/electron-browser/outputServices.ts | 22 +- .../preferences/browser/keybindingWidgets.ts | 6 +- .../preferences/browser/keybindingsEditor.ts | 18 +- .../preferences/browser/preferencesActions.ts | 32 +-- .../preferences/browser/preferencesEditor.ts | 28 +-- .../browser/preferencesRenderers.ts | 10 +- .../preferences/browser/preferencesWidgets.ts | 12 +- .../parts/preferences/browser/settingsTree.ts | 8 +- .../preferences/browser/settingsTreeModels.ts | 2 +- .../preferences/browser/settingsWidgets.ts | 4 +- .../common/preferencesContribution.ts | 16 +- .../preferences.contribution.ts | 4 +- .../electron-browser/preferencesSearch.ts | 16 +- .../electron-browser/settingsEditor2.ts | 16 +- .../quickopen/browser/commandsHandler.ts | 24 +- .../quickopen/browser/gotoLineHandler.ts | 2 +- .../quickopen/browser/gotoSymbolHandler.ts | 2 +- .../parts/quickopen/browser/helpHandler.ts | 2 +- .../quickopen/browser/viewPickerHandler.ts | 16 +- .../relauncher.contribution.ts | 14 +- .../electron-browser/dirtydiffDecorator.ts | 24 +- .../parts/scm/electron-browser/scmActivity.ts | 12 +- .../parts/scm/electron-browser/scmMenus.ts | 4 +- .../parts/scm/electron-browser/scmViewlet.ts | 8 +- .../search/browser/openAnythingHandler.ts | 4 +- .../parts/search/browser/openFileHandler.ts | 22 +- .../parts/search/browser/openSymbolHandler.ts | 6 +- .../search/browser/patternInputWidget.ts | 2 +- .../parts/search/browser/replaceService.ts | 22 +- .../parts/search/browser/searchActions.ts | 44 ++-- .../parts/search/browser/searchResultsView.ts | 14 +- .../parts/search/browser/searchView.ts | 34 +-- .../parts/search/browser/searchWidget.ts | 12 +- .../parts/search/common/queryBuilder.ts | 6 +- .../parts/search/common/searchModel.ts | 20 +- .../electron-browser/search.contribution.ts | 4 +- .../partsSplash.contribution.ts | 2 +- .../parts/stats/node/workspaceStats.ts | 16 +- .../electron-browser/runAutomaticTasks.ts | 4 +- .../electron-browser/task.contribution.ts | 48 ++-- .../terminal/browser/terminalQuickOpen.ts | 4 +- .../electron-browser/terminalActions.ts | 94 ++++---- .../electron-browser/terminalInstance.ts | 2 +- .../node/terminalProcessExtHostProxy.ts | 2 +- .../electron-browser/themes.contribution.ts | 24 +- .../themes.test.contribution.ts | 6 +- .../parts/update/electron-browser/update.ts | 22 +- .../url/electron-browser/url.contribution.ts | 4 +- .../watermark/electron-browser/watermark.ts | 8 +- .../webview/electron-browser/webviewEditor.ts | 2 +- .../electron-browser/gettingStarted.ts | 4 +- .../electron-browser/telemetryOptOut.ts | 10 +- .../welcome/overlay/browser/welcomeOverlay.ts | 10 +- .../page/electron-browser/welcomePage.ts | 32 +-- .../editor/editorWalkThrough.ts | 4 +- .../electron-browser/walkThroughPart.ts | 12 +- .../node/walkThroughContentProvider.ts | 16 +- .../walkThrough/node/walkThroughInput.ts | 4 +- .../activity/browser/activityService.ts | 2 +- .../services/backup/node/backupFileService.ts | 2 +- .../codeEditor/browser/codeEditorService.ts | 2 +- .../node/configurationEditingService.ts | 18 +- .../node/configurationService.ts | 4 +- .../configuration/node/jsonEditingService.ts | 6 +- .../configurationResolverService.ts | 8 +- .../electron-browser/contextmenuService.ts | 6 +- .../electron-browser/crashReporterService.ts | 4 +- .../dialogs/electron-browser/dialogService.ts | 12 +- .../services/editor/browser/editorService.ts | 12 +- .../inactiveExtensionUrlHandler.ts | 16 +- .../electron-browser/remoteFileService.ts | 4 +- .../history/electron-browser/history.ts | 20 +- .../electron-browser/workbenchIssueService.ts | 10 +- .../keybinding/common/keybindingEditing.ts | 10 +- .../electron-browser/keybindingService.ts | 2 +- .../preferences/browser/preferencesService.ts | 28 +-- .../common/keybindingsEditorModel.ts | 2 +- .../preferences/common/preferencesModels.ts | 2 +- .../services/scm/common/scmService.ts | 2 +- .../search/node/ripgrepSearchUtils.ts | 2 +- .../search/node/searchHistoryService.ts | 2 +- .../services/search/node/searchService.ts | 16 +- .../textMate/electron-browser/TMSyntax.ts | 2 +- .../textfile/common/textFileEditorModel.ts | 22 +- .../common/textFileEditorModelManager.ts | 4 +- .../electron-browser/textFileService.ts | 8 +- .../textResourcePropertiesService.ts | 6 +- .../common/textModelResolverService.ts | 12 +- .../electron-browser/colorThemeStore.ts | 2 +- .../electron-browser/fileIconThemeStore.ts | 2 +- .../electron-browser/workbenchThemeService.ts | 14 +- .../untitled/common/untitledEditorService.ts | 4 +- .../workspace/node/workspaceEditingService.ts | 18 +- .../workbench/test/workbenchTestServices.ts | 2 +- 289 files changed, 1641 insertions(+), 1641 deletions(-) diff --git a/src/vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner.ts b/src/vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner.ts index 7b88cb167e6..c4fb1355b61 100644 --- a/src/vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner.ts +++ b/src/vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner.ts @@ -12,7 +12,7 @@ import { Disposable, toDisposable } from 'vs/base/common/lifecycle'; export class LogsDataCleaner extends Disposable { constructor( - @IEnvironmentService private environmentService: IEnvironmentService + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { super(); diff --git a/src/vs/code/electron-browser/sharedProcess/contrib/storageDataCleaner.ts b/src/vs/code/electron-browser/sharedProcess/contrib/storageDataCleaner.ts index bc6396b9db5..ff502e8d463 100644 --- a/src/vs/code/electron-browser/sharedProcess/contrib/storageDataCleaner.ts +++ b/src/vs/code/electron-browser/sharedProcess/contrib/storageDataCleaner.ts @@ -16,7 +16,7 @@ export class StorageDataCleaner extends Disposable { private static NON_EMPTY_WORKSPACE_ID_LENGTH = 128 / 4; constructor( - @IEnvironmentService private environmentService: IEnvironmentService + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { super(); diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index bdcb1ff26c7..ce0240ad7d2 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -95,12 +95,12 @@ export class CodeApplication extends Disposable { constructor( private mainIpcServer: Server, private userEnv: IProcessEnvironment, - @IInstantiationService private instantiationService: IInstantiationService, - @ILogService private logService: ILogService, - @IEnvironmentService private environmentService: IEnvironmentService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IConfigurationService private configurationService: ConfigurationService, - @IStateService private stateService: IStateService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ILogService private readonly logService: ILogService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IConfigurationService private readonly configurationService: ConfigurationService, + @IStateService private readonly stateService: IStateService ) { super(); diff --git a/src/vs/code/electron-main/auth.ts b/src/vs/code/electron-main/auth.ts index 81c1b4ba8f6..ed92533c32f 100644 --- a/src/vs/code/electron-main/auth.ts +++ b/src/vs/code/electron-main/auth.ts @@ -30,7 +30,7 @@ export class ProxyAuthHandler { private disposables: IDisposable[] = []; constructor( - @IWindowsMainService private windowsMainService: IWindowsMainService + @IWindowsMainService private readonly windowsMainService: IWindowsMainService ) { const onLogin = Event.fromNodeEventEmitter(app, 'login', (event, webContents, req, authInfo, cb) => ({ event, webContents, req, authInfo, cb })); onLogin(this.onLogin, this, this.disposables); diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index b6ca73f6b9c..ff56a680870 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -80,13 +80,13 @@ export class CodeWindow extends Disposable implements ICodeWindow { constructor( config: IWindowCreationOptions, - @ILogService private logService: ILogService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IConfigurationService private configurationService: IConfigurationService, - @IStateService private stateService: IStateService, - @IWorkspacesMainService private workspacesMainService: IWorkspacesMainService, - @IBackupMainService private backupMainService: IBackupMainService, - @IStorageMainService private storageMainService: IStorageMainService + @ILogService private readonly logService: ILogService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IStateService private readonly stateService: IStateService, + @IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService, + @IBackupMainService private readonly backupMainService: IBackupMainService, + @IStorageMainService private readonly storageMainService: IStorageMainService ) { super(); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 0a6142a3435..fa3bb312156 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -156,16 +156,16 @@ export class WindowsManager implements IWindowsMainService { constructor( private readonly machineId: string, - @ILogService private logService: ILogService, - @IStateService private stateService: IStateService, - @IEnvironmentService private environmentService: IEnvironmentService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IBackupMainService private backupMainService: IBackupMainService, - @ITelemetryService private telemetryService: ITelemetryService, - @IConfigurationService private configurationService: IConfigurationService, - @IHistoryMainService private historyMainService: IHistoryMainService, - @IWorkspacesMainService private workspacesMainService: IWorkspacesMainService, - @IInstantiationService private instantiationService: IInstantiationService + @ILogService private readonly logService: ILogService, + @IStateService private readonly stateService: IStateService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IBackupMainService private readonly backupMainService: IBackupMainService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IHistoryMainService private readonly historyMainService: IHistoryMainService, + @IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService, + @IInstantiationService private readonly instantiationService: IInstantiationService ) { this.windowsState = this.getWindowsState(); if (!Array.isArray(this.windowsState.openedWindows)) { diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index 2d4860f656e..1ec34c0c009 100644 --- a/src/vs/code/node/cliProcessMain.ts +++ b/src/vs/code/node/cliProcessMain.ts @@ -67,9 +67,9 @@ type Task = { (): Promise }; class Main { constructor( - @IEnvironmentService private environmentService: IEnvironmentService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService ) { } async run(argv: ParsedArgs): Promise { diff --git a/src/vs/editor/common/services/resourceConfigurationImpl.ts b/src/vs/editor/common/services/resourceConfigurationImpl.ts index e5ef124aa43..b9353553d30 100644 --- a/src/vs/editor/common/services/resourceConfigurationImpl.ts +++ b/src/vs/editor/common/services/resourceConfigurationImpl.ts @@ -20,9 +20,9 @@ export class TextResourceConfigurationService extends Disposable implements ITex public readonly onDidChangeConfiguration: Event = this._onDidChangeConfiguration.event; constructor( - @IConfigurationService private configurationService: IConfigurationService, - @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IModelService private readonly modelService: IModelService, + @IModeService private readonly modeService: IModeService, ) { super(); this._register(this.configurationService.onDidChangeConfiguration(e => this._onDidChangeConfiguration.fire(e))); diff --git a/src/vs/editor/contrib/goToDefinition/goToDefinitionMouse.ts b/src/vs/editor/contrib/goToDefinition/goToDefinitionMouse.ts index 52046064199..d33f2b9ac68 100644 --- a/src/vs/editor/contrib/goToDefinition/goToDefinitionMouse.ts +++ b/src/vs/editor/contrib/goToDefinition/goToDefinitionMouse.ts @@ -39,8 +39,8 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC constructor( editor: ICodeEditor, - @ITextModelService private textModelResolverService: ITextModelService, - @IModeService private modeService: IModeService + @ITextModelService private readonly textModelResolverService: ITextModelService, + @IModeService private readonly modeService: IModeService ) { this.toUnhook = []; this.decorations = []; diff --git a/src/vs/editor/contrib/rename/renameInputField.ts b/src/vs/editor/contrib/rename/renameInputField.ts index 881417ed27f..27031b06b00 100644 --- a/src/vs/editor/contrib/rename/renameInputField.ts +++ b/src/vs/editor/contrib/rename/renameInputField.ts @@ -25,7 +25,7 @@ export default class RenameInputField implements IContentWidget, IDisposable { // Editor.IContentWidget.allowEditorOverflow public allowEditorOverflow: boolean = true; - constructor(editor: ICodeEditor, @IThemeService private themeService: IThemeService) { + constructor(editor: ICodeEditor, @IThemeService private readonly themeService: IThemeService) { this._editor = editor; this._editor.addContentWidget(this); diff --git a/src/vs/editor/contrib/smartSelect/test/smartSelect.test.ts b/src/vs/editor/contrib/smartSelect/test/smartSelect.test.ts index b03e7759c86..024eff33391 100644 --- a/src/vs/editor/contrib/smartSelect/test/smartSelect.test.ts +++ b/src/vs/editor/contrib/smartSelect/test/smartSelect.test.ts @@ -25,7 +25,7 @@ class TestTextResourcePropertiesService implements ITextResourcePropertiesServic _serviceBrand: any; constructor( - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService private readonly configurationService: IConfigurationService, ) { } diff --git a/src/vs/editor/contrib/suggest/suggestWidget.ts b/src/vs/editor/contrib/suggest/suggestWidget.ts index 3d91e567fcb..da8d189bc5b 100644 --- a/src/vs/editor/contrib/suggest/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/suggestWidget.ts @@ -440,7 +440,7 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate(); diff --git a/src/vs/platform/contextview/browser/contextViewService.ts b/src/vs/platform/contextview/browser/contextViewService.ts index f8175810c94..48b0f51eb86 100644 --- a/src/vs/platform/contextview/browser/contextViewService.ts +++ b/src/vs/platform/contextview/browser/contextViewService.ts @@ -17,7 +17,7 @@ export class ContextViewService extends Disposable implements IContextViewServic constructor( container: HTMLElement, @ITelemetryService telemetryService: ITelemetryService, - @ILogService private logService: ILogService + @ILogService private readonly logService: ILogService ) { super(); diff --git a/src/vs/platform/dialogs/node/dialogIpc.ts b/src/vs/platform/dialogs/node/dialogIpc.ts index db4c1cd607e..43d06766023 100644 --- a/src/vs/platform/dialogs/node/dialogIpc.ts +++ b/src/vs/platform/dialogs/node/dialogIpc.ts @@ -10,7 +10,7 @@ import { Event } from 'vs/base/common/event'; export class DialogChannel implements IServerChannel { - constructor(@IDialogService private dialogService: IDialogService) { } + constructor(@IDialogService private readonly dialogService: IDialogService) { } listen(_, event: string): Event { throw new Error(`Event not found: ${event}`); diff --git a/src/vs/platform/download/node/downloadService.ts b/src/vs/platform/download/node/downloadService.ts index e4747fbb168..c20cbd1a8d5 100644 --- a/src/vs/platform/download/node/downloadService.ts +++ b/src/vs/platform/download/node/downloadService.ts @@ -16,7 +16,7 @@ export class DownloadService implements IDownloadService { _serviceBrand: any; constructor( - @IRequestService private requestService: IRequestService + @IRequestService private readonly requestService: IRequestService ) { } download(uri: URI, target: string, cancellationToken: CancellationToken = CancellationToken.None): Promise { diff --git a/src/vs/platform/driver/electron-browser/driver.ts b/src/vs/platform/driver/electron-browser/driver.ts index 5f3436c0d07..3232b5ce1c8 100644 --- a/src/vs/platform/driver/electron-browser/driver.ts +++ b/src/vs/platform/driver/electron-browser/driver.ts @@ -51,7 +51,7 @@ function serializeElement(element: Element, recursive: boolean): IElement { class WindowDriver implements IWindowDriver { constructor( - @IWindowService private windowService: IWindowService + @IWindowService private readonly windowService: IWindowService ) { } click(selector: string, xoffset?: number, yoffset?: number): Promise { diff --git a/src/vs/platform/driver/electron-main/driver.ts b/src/vs/platform/driver/electron-main/driver.ts index e51d82d1ab4..cef10959c38 100644 --- a/src/vs/platform/driver/electron-main/driver.ts +++ b/src/vs/platform/driver/electron-main/driver.ts @@ -33,7 +33,7 @@ export class Driver implements IDriver, IWindowDriverRegistry { constructor( private windowServer: IPCServer, private options: IDriverOptions, - @IWindowsMainService private windowsService: IWindowsMainService + @IWindowsMainService private readonly windowsService: IWindowsMainService ) { } async registerWindowDriver(windowId: number): Promise { diff --git a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts index bd03abcd01b..2a43a37696b 100644 --- a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts +++ b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts @@ -27,9 +27,9 @@ export class ExtensionEnablementService extends Disposable implements IExtension constructor( @IStorageService storageService: IStorageService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService ) { super(); this.storageManger = this._register(new StorageManager(storageService)); diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index 7e4b52ba1f5..f00b365e842 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -331,10 +331,10 @@ export class ExtensionGalleryService implements IExtensionGalleryService { private readonly commonHeadersPromise: Promise<{ [key: string]: string; }>; constructor( - @IRequestService private requestService: IRequestService, - @ILogService private logService: ILogService, - @IEnvironmentService private environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService + @IRequestService private readonly requestService: IRequestService, + @ILogService private readonly logService: ILogService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ITelemetryService private readonly 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 041b9f8f705..b2b55c6f524 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -126,11 +126,11 @@ export class ExtensionManagementService extends Disposable implements IExtension onDidUninstallExtension: Event = this._onDidUninstallExtension.event; constructor( - @IEnvironmentService private environmentService: IEnvironmentService, - @IExtensionGalleryService private galleryService: IExtensionGalleryService, - @ILogService private logService: ILogService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IExtensionGalleryService private readonly galleryService: IExtensionGalleryService, + @ILogService private readonly logService: ILogService, @optional(IDownloadService) private downloadService: IDownloadService, - @ITelemetryService private telemetryService: ITelemetryService, + @ITelemetryService private readonly telemetryService: ITelemetryService, ) { super(); this.systemExtensionsPath = environmentService.builtinExtensionsPath; diff --git a/src/vs/platform/extensionManagement/node/multiExtensionManagement.ts b/src/vs/platform/extensionManagement/node/multiExtensionManagement.ts index 4a9fae47f40..bfa6f5624a8 100644 --- a/src/vs/platform/extensionManagement/node/multiExtensionManagement.ts +++ b/src/vs/platform/extensionManagement/node/multiExtensionManagement.ts @@ -30,11 +30,11 @@ export class MultiExtensionManagementService extends Disposable implements IExte private readonly servers: IExtensionManagementServer[]; constructor( - @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService, - @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService, - @IConfigurationService private configurationService: IConfigurationService, - @IRemoteAuthorityResolverService private remoteAuthorityResolverService: IRemoteAuthorityResolverService, - @ILogService private logService: ILogService + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, + @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IRemoteAuthorityResolverService private readonly remoteAuthorityResolverService: IRemoteAuthorityResolverService, + @ILogService private readonly logService: ILogService ) { super(); this.servers = this.extensionManagementServerService.remoteExtensionManagementServer ? [this.extensionManagementServerService.localExtensionManagementServer, this.extensionManagementServerService.remoteExtensionManagementServer] : [this.extensionManagementServerService.localExtensionManagementServer]; diff --git a/src/vs/platform/history/electron-main/historyMainService.ts b/src/vs/platform/history/electron-main/historyMainService.ts index ac90272ec41..85ecbea3aed 100644 --- a/src/vs/platform/history/electron-main/historyMainService.ts +++ b/src/vs/platform/history/electron-main/historyMainService.ts @@ -48,10 +48,10 @@ export class HistoryMainService implements IHistoryMainService { private macOSRecentDocumentsUpdater: RunOnceScheduler; constructor( - @IStateService private stateService: IStateService, - @ILogService private logService: ILogService, - @IWorkspacesMainService private workspacesMainService: IWorkspacesMainService, - @IEnvironmentService private environmentService: IEnvironmentService + @IStateService private readonly stateService: IStateService, + @ILogService private readonly logService: ILogService, + @IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService, + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { this.macOSRecentDocumentsUpdater = new RunOnceScheduler(() => this.updateMacOSRecentDocuments(), 800); diff --git a/src/vs/platform/integrity/node/integrityServiceImpl.ts b/src/vs/platform/integrity/node/integrityServiceImpl.ts index ca2e3ac9cce..64ee7abfc42 100644 --- a/src/vs/platform/integrity/node/integrityServiceImpl.ts +++ b/src/vs/platform/integrity/node/integrityServiceImpl.ts @@ -60,9 +60,9 @@ export class IntegrityServiceImpl implements IIntegrityService { private _isPurePromise: Promise; constructor( - @INotificationService private notificationService: INotificationService, + @INotificationService private readonly notificationService: INotificationService, @IStorageService storageService: IStorageService, - @ILifecycleService private lifecycleService: ILifecycleService + @ILifecycleService private readonly lifecycleService: ILifecycleService ) { this._storage = new IntegrityStorage(storageService); diff --git a/src/vs/platform/issue/electron-main/issueService.ts b/src/vs/platform/issue/electron-main/issueService.ts index e9170826f87..c3dcdfb3a89 100644 --- a/src/vs/platform/issue/electron-main/issueService.ts +++ b/src/vs/platform/issue/electron-main/issueService.ts @@ -28,11 +28,11 @@ export class IssueService implements IIssueService { constructor( private machineId: string, private userEnv: IProcessEnvironment, - @IEnvironmentService private environmentService: IEnvironmentService, - @ILaunchService private launchService: ILaunchService, - @ILogService private logService: ILogService, - @IDiagnosticsService private diagnosticsService: IDiagnosticsService, - @IWindowsService private windowsService: IWindowsService + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ILaunchService private readonly launchService: ILaunchService, + @ILogService private readonly logService: ILogService, + @IDiagnosticsService private readonly diagnosticsService: IDiagnosticsService, + @IWindowsService private readonly windowsService: IWindowsService ) { this.registerListeners(); } diff --git a/src/vs/platform/label/common/label.ts b/src/vs/platform/label/common/label.ts index 2471a2a8b4c..7532fc55e9c 100644 --- a/src/vs/platform/label/common/label.ts +++ b/src/vs/platform/label/common/label.ts @@ -82,9 +82,9 @@ export class LabelService implements ILabelService { private readonly _onDidRegisterFormatter = new Emitter(); constructor( - @IEnvironmentService private environmentService: IEnvironmentService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IWindowService private windowService: IWindowService + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IWindowService private readonly windowService: IWindowService ) { } get onDidRegisterFormatter(): Event { diff --git a/src/vs/platform/launch/electron-main/launchService.ts b/src/vs/platform/launch/electron-main/launchService.ts index 70e12944bff..ba14b195335 100644 --- a/src/vs/platform/launch/electron-main/launchService.ts +++ b/src/vs/platform/launch/electron-main/launchService.ts @@ -122,10 +122,10 @@ export class LaunchService implements ILaunchService { _serviceBrand: any; constructor( - @ILogService private logService: ILogService, - @IWindowsMainService private windowsMainService: IWindowsMainService, - @IURLService private urlService: IURLService, - @IWorkspacesMainService private workspacesMainService: IWorkspacesMainService, + @ILogService private readonly logService: ILogService, + @IWindowsMainService private readonly windowsMainService: IWindowsMainService, + @IURLService private readonly urlService: IURLService, + @IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService, @IEnvironmentService private readonly environmentService: IEnvironmentService, @IConfigurationService private readonly configurationService: IConfigurationService ) { } diff --git a/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts b/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts index a23ee9f891f..ad8f31d24cf 100644 --- a/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts +++ b/src/vs/platform/lifecycle/electron-browser/lifecycleService.ts @@ -42,10 +42,10 @@ export class LifecycleService extends Disposable implements ILifecycleService { private shutdownReason: ShutdownReason; constructor( - @INotificationService private notificationService: INotificationService, - @IWindowService private windowService: IWindowService, - @IStorageService private storageService: IStorageService, - @ILogService private logService: ILogService + @INotificationService private readonly notificationService: INotificationService, + @IWindowService private readonly windowService: IWindowService, + @IStorageService private readonly storageService: IStorageService, + @ILogService private readonly logService: ILogService ) { super(); diff --git a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts index ff53fa0cf54..a396d295560 100644 --- a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts @@ -131,8 +131,8 @@ export class LifecycleService extends Disposable implements ILifecycleService { readonly onBeforeWindowUnload: Event = this._onBeforeWindowUnload.event; constructor( - @ILogService private logService: ILogService, - @IStateService private stateService: IStateService + @ILogService private readonly logService: ILogService, + @IStateService private readonly stateService: IStateService ) { super(); diff --git a/src/vs/platform/list/browser/listService.ts b/src/vs/platform/list/browser/listService.ts index b9d7146387e..c9a1bc3985c 100644 --- a/src/vs/platform/list/browser/listService.ts +++ b/src/vs/platform/list/browser/listService.ts @@ -228,7 +228,7 @@ export class WorkbenchList extends List { @IContextKeyService contextKeyService: IContextKeyService, @IListService listService: IListService, @IThemeService themeService: IThemeService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IKeybindingService keybindingService: IKeybindingService ) { super(container, delegate, renderers, @@ -304,7 +304,7 @@ export class WorkbenchPagedList extends PagedList { @IContextKeyService contextKeyService: IContextKeyService, @IListService listService: IListService, @IThemeService themeService: IThemeService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IKeybindingService keybindingService: IKeybindingService ) { super(container, delegate, renderers, @@ -464,7 +464,7 @@ export class WorkbenchTreeController extends DefaultController { constructor( options: IControllerOptions, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(massageControllerOptions(options)); diff --git a/src/vs/platform/localizations/node/localizations.ts b/src/vs/platform/localizations/node/localizations.ts index 4f37910cbd8..a74772a0216 100644 --- a/src/vs/platform/localizations/node/localizations.ts +++ b/src/vs/platform/localizations/node/localizations.ts @@ -42,9 +42,9 @@ export class LocalizationsService extends Disposable implements ILocalizationsSe readonly onDidLanguagesChange: Event = this._onDidLanguagesChange.event; constructor( - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, @IEnvironmentService environmentService: IEnvironmentService, - @ILogService private logService: ILogService + @ILogService private readonly logService: ILogService ) { super(); this.cache = this._register(new LanguagePacksCache(environmentService, logService)); @@ -103,7 +103,7 @@ class LanguagePacksCache extends Disposable { constructor( @IEnvironmentService environmentService: IEnvironmentService, - @ILogService private logService: ILogService + @ILogService private readonly logService: ILogService ) { super(); this.languagePacksFilePath = posix.join(environmentService.userDataPath, 'languagepacks.json'); diff --git a/src/vs/platform/menubar/electron-main/menubar.ts b/src/vs/platform/menubar/electron-main/menubar.ts index b511821c0a4..9c35150abba 100644 --- a/src/vs/platform/menubar/electron-main/menubar.ts +++ b/src/vs/platform/menubar/electron-main/menubar.ts @@ -60,15 +60,15 @@ export class Menubar { private fallbackMenuHandlers: { [id: string]: (menuItem: MenuItem, browserWindow: BrowserWindow, event: Electron.Event) => void } = {}; constructor( - @IUpdateService private updateService: IUpdateService, + @IUpdateService private readonly updateService: IUpdateService, @IInstantiationService instantiationService: IInstantiationService, - @IConfigurationService private configurationService: IConfigurationService, - @IWindowsMainService private windowsMainService: IWindowsMainService, - @IEnvironmentService private environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService, - @IHistoryMainService private historyMainService: IHistoryMainService, - @IStateService private stateService: IStateService, - @ILifecycleService private lifecycleService: ILifecycleService + @IConfigurationService private readonly configurationService: IConfigurationService, + @IWindowsMainService private readonly windowsMainService: IWindowsMainService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IHistoryMainService private readonly historyMainService: IHistoryMainService, + @IStateService private readonly stateService: IStateService, + @ILifecycleService private readonly lifecycleService: ILifecycleService ) { this.menuUpdater = new RunOnceScheduler(() => this.doUpdateMenu(), 0); diff --git a/src/vs/platform/menubar/electron-main/menubarService.ts b/src/vs/platform/menubar/electron-main/menubarService.ts index c0ab08d56e3..b4a8ed44ef4 100644 --- a/src/vs/platform/menubar/electron-main/menubarService.ts +++ b/src/vs/platform/menubar/electron-main/menubarService.ts @@ -14,8 +14,8 @@ export class MenubarService implements IMenubarService { private _menubar: Menubar; constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @ILogService private logService: ILogService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ILogService private readonly logService: ILogService ) { // Install Menu this._menubar = this.instantiationService.createInstance(Menubar); diff --git a/src/vs/platform/request/node/requestService.ts b/src/vs/platform/request/node/requestService.ts index d8e9bfdde46..20963f6a2f7 100644 --- a/src/vs/platform/request/node/requestService.ts +++ b/src/vs/platform/request/node/requestService.ts @@ -27,7 +27,7 @@ export class RequestService implements IRequestService { constructor( @IConfigurationService configurationService: IConfigurationService, - @ILogService private logService: ILogService + @ILogService private readonly logService: ILogService ) { this.configure(configurationService.getValue()); configurationService.onDidChangeConfiguration(() => this.configure(configurationService.getValue()), this, this.disposables); diff --git a/src/vs/platform/storage/node/storageMainService.ts b/src/vs/platform/storage/node/storageMainService.ts index 3d8c285332c..f8f5d6be928 100644 --- a/src/vs/platform/storage/node/storageMainService.ts +++ b/src/vs/platform/storage/node/storageMainService.ts @@ -87,9 +87,9 @@ export class StorageMainService extends Disposable implements IStorageMainServic private storage: IStorage; constructor( - @ILogService private logService: ILogService, - @IEnvironmentService private environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService + @ILogService private readonly logService: ILogService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ITelemetryService private readonly telemetryService: ITelemetryService ) { super(); diff --git a/src/vs/platform/storage/node/storageService.ts b/src/vs/platform/storage/node/storageService.ts index c3cccc7ee8e..b9af98020d2 100644 --- a/src/vs/platform/storage/node/storageService.ts +++ b/src/vs/platform/storage/node/storageService.ts @@ -59,8 +59,8 @@ export class StorageService extends Disposable implements IStorageService { constructor( globalStorageDatabase: IStorageDatabase, - @ILogService private logService: ILogService, - @IEnvironmentService private environmentService: IEnvironmentService + @ILogService private readonly logService: ILogService, + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { super(); @@ -323,8 +323,8 @@ export class LogStorageAction extends Action { constructor( id: string, label: string, - @IStorageService private storageService: StorageService, - @IWindowService private windowService: IWindowService + @IStorageService private readonly storageService: StorageService, + @IWindowService private readonly windowService: IWindowService ) { super(id, label); } diff --git a/src/vs/platform/update/electron-main/abstractUpdateService.ts b/src/vs/platform/update/electron-main/abstractUpdateService.ts index 481fa7cac4a..a5f6f1cfa97 100644 --- a/src/vs/platform/update/electron-main/abstractUpdateService.ts +++ b/src/vs/platform/update/electron-main/abstractUpdateService.ts @@ -40,9 +40,9 @@ export abstract class AbstractUpdateService implements IUpdateService { } constructor( - @ILifecycleService private lifecycleService: ILifecycleService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, @IConfigurationService protected configurationService: IConfigurationService, - @IEnvironmentService private environmentService: IEnvironmentService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, @IRequestService protected requestService: IRequestService, @ILogService protected logService: ILogService, ) { diff --git a/src/vs/platform/update/electron-main/updateService.darwin.ts b/src/vs/platform/update/electron-main/updateService.darwin.ts index ae1dad8a215..4427e2a75eb 100644 --- a/src/vs/platform/update/electron-main/updateService.darwin.ts +++ b/src/vs/platform/update/electron-main/updateService.darwin.ts @@ -30,7 +30,7 @@ export class DarwinUpdateService extends AbstractUpdateService { constructor( @ILifecycleService lifecycleService: ILifecycleService, @IConfigurationService configurationService: IConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService, + @ITelemetryService private readonly telemetryService: ITelemetryService, @IEnvironmentService environmentService: IEnvironmentService, @IRequestService requestService: IRequestService, @ILogService logService: ILogService diff --git a/src/vs/platform/update/electron-main/updateService.linux.ts b/src/vs/platform/update/electron-main/updateService.linux.ts index e26266d0a2c..a93657345c6 100644 --- a/src/vs/platform/update/electron-main/updateService.linux.ts +++ b/src/vs/platform/update/electron-main/updateService.linux.ts @@ -26,7 +26,7 @@ export class LinuxUpdateService extends AbstractUpdateService { constructor( @ILifecycleService lifecycleService: ILifecycleService, @IConfigurationService configurationService: IConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService, + @ITelemetryService private readonly telemetryService: ITelemetryService, @IEnvironmentService environmentService: IEnvironmentService, @IRequestService requestService: IRequestService, @ILogService logService: ILogService diff --git a/src/vs/platform/update/electron-main/updateService.snap.ts b/src/vs/platform/update/electron-main/updateService.snap.ts index 9640989e337..74e5d430a43 100644 --- a/src/vs/platform/update/electron-main/updateService.snap.ts +++ b/src/vs/platform/update/electron-main/updateService.snap.ts @@ -36,7 +36,7 @@ abstract class AbstractUpdateService2 implements IUpdateService { } constructor( - @ILifecycleService private lifecycleService: ILifecycleService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, @IEnvironmentService environmentService: IEnvironmentService, @ILogService protected logService: ILogService, ) { @@ -145,7 +145,7 @@ export class SnapUpdateService extends AbstractUpdateService2 { @ILifecycleService lifecycleService: ILifecycleService, @IEnvironmentService environmentService: IEnvironmentService, @ILogService logService: ILogService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private readonly telemetryService: ITelemetryService ) { super(lifecycleService, environmentService, logService); diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts index 4144cc09c9c..e94091c31e7 100644 --- a/src/vs/platform/update/electron-main/updateService.win32.ts +++ b/src/vs/platform/update/electron-main/updateService.win32.ts @@ -61,7 +61,7 @@ export class Win32UpdateService extends AbstractUpdateService { constructor( @ILifecycleService lifecycleService: ILifecycleService, @IConfigurationService configurationService: IConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService, + @ITelemetryService private readonly telemetryService: ITelemetryService, @IEnvironmentService environmentService: IEnvironmentService, @IRequestService requestService: IRequestService, @ILogService logService: ILogService diff --git a/src/vs/platform/url/electron-main/electronUrlListener.ts b/src/vs/platform/url/electron-main/electronUrlListener.ts index 4f43f22ea3e..af8fd4b00fb 100644 --- a/src/vs/platform/url/electron-main/electronUrlListener.ts +++ b/src/vs/platform/url/electron-main/electronUrlListener.ts @@ -27,7 +27,7 @@ export class ElectronURLListener { constructor( initial: string | string[], - @IURLService private urlService: IURLService, + @IURLService private readonly urlService: IURLService, @IWindowsMainService windowsService: IWindowsMainService ) { const globalBuffer = ((global).getOpenUrls() || []) as string[]; diff --git a/src/vs/platform/windows/electron-browser/windowService.ts b/src/vs/platform/windows/electron-browser/windowService.ts index a6a0ce76ca6..224facad2fc 100644 --- a/src/vs/platform/windows/electron-browser/windowService.ts +++ b/src/vs/platform/windows/electron-browser/windowService.ts @@ -25,7 +25,7 @@ export class WindowService extends Disposable implements IWindowService { constructor( private windowId: number, private configuration: IWindowConfiguration, - @IWindowsService private windowsService: IWindowsService + @IWindowsService private readonly windowsService: IWindowsService ) { super(); diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 6cbf2e989a6..1f5557062d1 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -45,12 +45,12 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable constructor( private sharedProcess: ISharedProcess, - @IWindowsMainService private windowsMainService: IWindowsMainService, - @IEnvironmentService private environmentService: IEnvironmentService, + @IWindowsMainService private readonly windowsMainService: IWindowsMainService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, @IURLService urlService: IURLService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IHistoryMainService private historyService: IHistoryMainService, - @ILogService private logService: ILogService + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IHistoryMainService private readonly historyService: IHistoryMainService, + @ILogService private readonly logService: ILogService ) { urlService.registerHandler(this); diff --git a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts index c91d7504af4..2828f1268ae 100644 --- a/src/vs/platform/workspaces/electron-main/workspacesMainService.ts +++ b/src/vs/platform/workspaces/electron-main/workspacesMainService.ts @@ -41,8 +41,8 @@ export class WorkspacesMainService extends Disposable implements IWorkspacesMain get onUntitledWorkspaceDeleted(): Event { return this._onUntitledWorkspaceDeleted.event; } constructor( - @IEnvironmentService private environmentService: IEnvironmentService, - @ILogService private logService: ILogService + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ILogService private readonly logService: ILogService ) { super(); diff --git a/src/vs/workbench/api/browser/viewsExtensionPoint.ts b/src/vs/workbench/api/browser/viewsExtensionPoint.ts index f85e56dc421..44a1111db69 100644 --- a/src/vs/workbench/api/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/api/browser/viewsExtensionPoint.ts @@ -94,7 +94,7 @@ class ViewsContainersExtensionHandler implements IWorkbenchContribution { private viewContainersRegistry: IViewContainersRegistry; constructor( - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { this.viewContainersRegistry = Registry.as(ViewContainerExtensions.ViewContainersRegistry); this.handleAndRegisterCustomViews(); diff --git a/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts index 1b16047d2a9..82a517e288c 100644 --- a/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts +++ b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts @@ -57,7 +57,7 @@ import './mainThreadWorkspace'; export class ExtensionPoints implements IWorkbenchContribution { constructor( - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { // Classes that handle extension points... this.instantiationService.createInstance(JSONValidationExtensionPoint); diff --git a/src/vs/workbench/api/electron-browser/mainThreadComments.ts b/src/vs/workbench/api/electron-browser/mainThreadComments.ts index c0c0d3d4ee8..d57bb3db5d5 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadComments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadComments.ts @@ -79,11 +79,11 @@ export class MainThreadComments extends Disposable implements MainThreadComments constructor( extHostContext: IExtHostContext, - @IEditorService private _editorService: IEditorService, - @ICommentService private _commentService: ICommentService, - @IPanelService private _panelService: IPanelService, - @ITelemetryService private _telemetryService: ITelemetryService, - @IConfigurationService private _configurationService: IConfigurationService + @IEditorService private readonly _editorService: IEditorService, + @ICommentService private readonly _commentService: ICommentService, + @IPanelService private readonly _panelService: IPanelService, + @ITelemetryService private readonly _telemetryService: ITelemetryService, + @IConfigurationService private readonly _configurationService: IConfigurationService ) { super(); this._disposables = []; diff --git a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts index 171b7217a89..6c37740e3d4 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts @@ -21,7 +21,7 @@ export class MainThreadConfiguration implements MainThreadConfigurationShape { constructor( extHostContext: IExtHostContext, @IWorkspaceContextService private readonly _workspaceContextService: IWorkspaceContextService, - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService ) { const proxy = extHostContext.getProxy(ExtHostContext.ExtHostConfiguration); diff --git a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts index 539e9b071e9..21b515f08ca 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDebugService.ts @@ -31,7 +31,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb constructor( extHostContext: IExtHostContext, - @IDebugService private debugService: IDebugService + @IDebugService private readonly debugService: IDebugService ) { this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDebugService); this._toDispose = []; diff --git a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts index 5d0e8f9cbd3..18790abe8c9 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts @@ -272,7 +272,7 @@ export class MainThreadSCM implements MainThreadSCMShape { constructor( extHostContext: IExtHostContext, - @ISCMService private scmService: ISCMService + @ISCMService private readonly scmService: ISCMService ) { this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostSCM); diff --git a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index f6cdef996e1..15ee58b4855 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -44,8 +44,8 @@ export interface ISaveParticipantParticipant extends ISaveParticipant { class TrimWhitespaceParticipant implements ISaveParticipantParticipant { constructor( - @IConfigurationService private configurationService: IConfigurationService, - @ICodeEditorService private codeEditorService: ICodeEditorService + @IConfigurationService private readonly configurationService: IConfigurationService, + @ICodeEditorService private readonly codeEditorService: ICodeEditorService ) { // Nothing } @@ -106,8 +106,8 @@ function findEditor(model: ITextModel, codeEditorService: ICodeEditorService): I export class FinalNewLineParticipant implements ISaveParticipantParticipant { constructor( - @IConfigurationService private configurationService: IConfigurationService, - @ICodeEditorService private codeEditorService: ICodeEditorService + @IConfigurationService private readonly configurationService: IConfigurationService, + @ICodeEditorService private readonly codeEditorService: ICodeEditorService ) { // Nothing } @@ -144,8 +144,8 @@ export class FinalNewLineParticipant implements ISaveParticipantParticipant { export class TrimFinalNewLinesParticipant implements ISaveParticipantParticipant { constructor( - @IConfigurationService private configurationService: IConfigurationService, - @ICodeEditorService private codeEditorService: ICodeEditorService + @IConfigurationService private readonly configurationService: IConfigurationService, + @ICodeEditorService private readonly codeEditorService: ICodeEditorService ) { // Nothing } diff --git a/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts index 09490c49394..5a3efa811e7 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts @@ -20,7 +20,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape constructor( extHostContext: IExtHostContext, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostTerminalService); this._remoteAuthority = extHostContext.remoteAuthority; diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts index 3cd0866137a..a2237755d84 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -20,8 +20,8 @@ export class MainThreadTreeViews extends Disposable implements MainThreadTreeVie constructor( extHostContext: IExtHostContext, - @IViewsService private viewsService: IViewsService, - @INotificationService private notificationService: INotificationService + @IViewsService private readonly viewsService: IViewsService, + @INotificationService private readonly notificationService: INotificationService ) { super(); this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostTreeViews); diff --git a/src/vs/workbench/api/electron-browser/mainThreadUrls.ts b/src/vs/workbench/api/electron-browser/mainThreadUrls.ts index 728a64f88b7..33e2119cda6 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadUrls.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadUrls.ts @@ -36,8 +36,8 @@ export class MainThreadUrls implements MainThreadUrlsShape { constructor( context: IExtHostContext, - @IURLService private urlService: IURLService, - @IExtensionUrlHandler private inactiveExtensionUrlHandler: IExtensionUrlHandler + @IURLService private readonly urlService: IURLService, + @IExtensionUrlHandler private readonly inactiveExtensionUrlHandler: IExtensionUrlHandler ) { this.proxy = context.getProxy(ExtHostContext.ExtHostUrls); } diff --git a/src/vs/workbench/api/electron-browser/mainThreadWindow.ts b/src/vs/workbench/api/electron-browser/mainThreadWindow.ts index 5620a886f69..4c20602bd21 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWindow.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWindow.ts @@ -17,7 +17,7 @@ export class MainThreadWindow implements MainThreadWindowShape { constructor( extHostContext: IExtHostContext, - @IWindowService private windowService: IWindowService + @IWindowService private readonly windowService: IWindowService ) { this.proxy = extHostContext.getProxy(ExtHostContext.ExtHostWindow); diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 2de04903b57..712007daf61 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -541,7 +541,7 @@ export class ExtHostSCM implements ExtHostSCMShape { constructor( mainContext: IMainContext, private _commands: ExtHostCommands, - @ILogService private logService: ILogService + @ILogService private readonly logService: ILogService ) { this._proxy = mainContext.getProxy(MainContext.MainThreadSCM); diff --git a/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts b/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts index c464b25d3da..f28a090fa36 100644 --- a/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts +++ b/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts @@ -21,8 +21,8 @@ export class ToggleActivityBarVisibilityAction extends Action { constructor( id: string, label: string, - @IPartService private partService: IPartService, - @IConfigurationService private configurationService: IConfigurationService + @IPartService private readonly partService: IPartService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label); diff --git a/src/vs/workbench/browser/actions/toggleCenteredLayout.ts b/src/vs/workbench/browser/actions/toggleCenteredLayout.ts index 4f2ac2e1b5a..9e664ceec23 100644 --- a/src/vs/workbench/browser/actions/toggleCenteredLayout.ts +++ b/src/vs/workbench/browser/actions/toggleCenteredLayout.ts @@ -18,7 +18,7 @@ class ToggleCenteredLayout extends Action { constructor( id: string, label: string, - @IPartService private partService: IPartService + @IPartService private readonly partService: IPartService ) { super(id, label); this.enabled = !!this.partService; diff --git a/src/vs/workbench/browser/actions/toggleEditorLayout.ts b/src/vs/workbench/browser/actions/toggleEditorLayout.ts index 6b44c2ded3c..3e31b9b481c 100644 --- a/src/vs/workbench/browser/actions/toggleEditorLayout.ts +++ b/src/vs/workbench/browser/actions/toggleEditorLayout.ts @@ -25,7 +25,7 @@ export class ToggleEditorLayoutAction extends Action { constructor( id: string, label: string, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(id, label); diff --git a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts index b77fd7af814..9eb8bd8ae8d 100644 --- a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts +++ b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts @@ -21,8 +21,8 @@ export class ToggleSidebarPositionAction extends Action { constructor( id: string, label: string, - @IPartService private partService: IPartService, - @IConfigurationService private configurationService: IConfigurationService + @IPartService private readonly partService: IPartService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label); diff --git a/src/vs/workbench/browser/actions/toggleSidebarVisibility.ts b/src/vs/workbench/browser/actions/toggleSidebarVisibility.ts index 51ef3f93c98..48a2d0a95b8 100644 --- a/src/vs/workbench/browser/actions/toggleSidebarVisibility.ts +++ b/src/vs/workbench/browser/actions/toggleSidebarVisibility.ts @@ -19,7 +19,7 @@ export class ToggleSidebarVisibilityAction extends Action { constructor( id: string, label: string, - @IPartService private partService: IPartService + @IPartService private readonly partService: IPartService ) { super(id, label); diff --git a/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts b/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts index a7bada0e912..277eff7fcf7 100644 --- a/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts +++ b/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts @@ -21,8 +21,8 @@ export class ToggleStatusbarVisibilityAction extends Action { constructor( id: string, label: string, - @IPartService private partService: IPartService, - @IConfigurationService private configurationService: IConfigurationService + @IPartService private readonly partService: IPartService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label); diff --git a/src/vs/workbench/browser/actions/toggleTabsVisibility.ts b/src/vs/workbench/browser/actions/toggleTabsVisibility.ts index 51b0a4548c2..bde2adca0a6 100644 --- a/src/vs/workbench/browser/actions/toggleTabsVisibility.ts +++ b/src/vs/workbench/browser/actions/toggleTabsVisibility.ts @@ -21,7 +21,7 @@ export class ToggleTabsVisibilityAction extends Action { constructor( id: string, label: string, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label); } diff --git a/src/vs/workbench/browser/actions/toggleZenMode.ts b/src/vs/workbench/browser/actions/toggleZenMode.ts index 362f999dfed..73ed632b037 100644 --- a/src/vs/workbench/browser/actions/toggleZenMode.ts +++ b/src/vs/workbench/browser/actions/toggleZenMode.ts @@ -19,7 +19,7 @@ class ToggleZenMode extends Action { constructor( id: string, label: string, - @IPartService private partService: IPartService + @IPartService private readonly partService: IPartService ) { super(id, label); this.enabled = !!this.partService; diff --git a/src/vs/workbench/browser/actions/workspaceActions.ts b/src/vs/workbench/browser/actions/workspaceActions.ts index 2ce97f9c32c..da1cc2e562c 100644 --- a/src/vs/workbench/browser/actions/workspaceActions.ts +++ b/src/vs/workbench/browser/actions/workspaceActions.ts @@ -26,7 +26,7 @@ export class OpenFileAction extends Action { constructor( id: string, label: string, - @IFileDialogService private dialogService: IFileDialogService + @IFileDialogService private readonly dialogService: IFileDialogService ) { super(id, label); } @@ -44,7 +44,7 @@ export class OpenFolderAction extends Action { constructor( id: string, label: string, - @IFileDialogService private dialogService: IFileDialogService + @IFileDialogService private readonly dialogService: IFileDialogService ) { super(id, label); } @@ -62,7 +62,7 @@ export class OpenFileFolderAction extends Action { constructor( id: string, label: string, - @IFileDialogService private dialogService: IFileDialogService + @IFileDialogService private readonly dialogService: IFileDialogService ) { super(id, label); } @@ -80,7 +80,7 @@ export class AddRootFolderAction extends Action { constructor( id: string, label: string, - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super(id, label); } @@ -98,9 +98,9 @@ export class GlobalRemoveRootFolderAction extends Action { constructor( id: string, label: string, - @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @ICommandService private commandService: ICommandService + @IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @ICommandService private readonly commandService: ICommandService ) { super(id, label); } @@ -131,9 +131,9 @@ export class SaveWorkspaceAsAction extends Action { constructor( id: string, label: string, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, - @IFileDialogService private dialogService: IFileDialogService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService, + @IFileDialogService private readonly dialogService: IFileDialogService ) { super(id, label); @@ -176,7 +176,7 @@ export class OpenWorkspaceAction extends Action { constructor( id: string, label: string, - @IFileDialogService private dialogService: IFileDialogService + @IFileDialogService private readonly dialogService: IFileDialogService ) { super(id, label); } @@ -194,8 +194,8 @@ export class OpenWorkspaceConfigFileAction extends Action { constructor( id: string, label: string, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IEditorService private editorService: IEditorService + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IEditorService private readonly editorService: IEditorService ) { super(id, label); @@ -215,10 +215,10 @@ export class DuplicateWorkspaceInNewWindowAction extends Action { constructor( id: string, label: string, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, - @IWindowService private windowService: IWindowService, - @IWorkspacesService private workspacesService: IWorkspacesService + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService, + @IWindowService private readonly windowService: IWindowService, + @IWorkspacesService private readonly workspacesService: IWorkspacesService ) { super(id, label); } diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts index dad82b234ea..be3ca78e745 100644 --- a/src/vs/workbench/browser/dnd.ts +++ b/src/vs/workbench/browser/dnd.ts @@ -153,15 +153,15 @@ export class ResourcesDropHandler { constructor( private options: IResourcesDropHandlerOptions, - @IFileService private fileService: IFileService, - @IWindowsService private windowsService: IWindowsService, - @IWindowService private windowService: IWindowService, - @IWorkspacesService private workspacesService: IWorkspacesService, - @ITextFileService private textFileService: ITextFileService, - @IBackupFileService private backupFileService: IBackupFileService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IEditorService private editorService: IEditorService, - @IConfigurationService private configurationService: IConfigurationService + @IFileService private readonly fileService: IFileService, + @IWindowsService private readonly windowsService: IWindowsService, + @IWindowService private readonly windowService: IWindowService, + @IWorkspacesService private readonly workspacesService: IWorkspacesService, + @ITextFileService private readonly textFileService: ITextFileService, + @IBackupFileService private readonly backupFileService: IBackupFileService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, + @IEditorService private readonly editorService: IEditorService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { } diff --git a/src/vs/workbench/browser/labels.ts b/src/vs/workbench/browser/labels.ts index bc3cbc2b0ee..7c0a15b86f0 100644 --- a/src/vs/workbench/browser/labels.ts +++ b/src/vs/workbench/browser/labels.ts @@ -87,12 +87,12 @@ export class ResourceLabels extends Disposable { constructor( container: IResourceLabelsContainer, - @IInstantiationService private instantiationService: IInstantiationService, - @IExtensionService private extensionService: IExtensionService, - @IConfigurationService private configurationService: IConfigurationService, - @IModelService private modelService: IModelService, - @IDecorationsService private decorationsService: IDecorationsService, - @IThemeService private themeService: IThemeService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IExtensionService private readonly extensionService: IExtensionService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IModelService private readonly modelService: IModelService, + @IDecorationsService private readonly decorationsService: IDecorationsService, + @IThemeService private readonly themeService: IThemeService ) { super(); @@ -235,12 +235,12 @@ class ResourceLabelWidget extends IconLabel { constructor( container: HTMLElement, options: IIconLabelCreationOptions, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService, - @IDecorationsService private decorationsService: IDecorationsService, - @ILabelService private labelService: ILabelService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService, + @IDecorationsService private readonly decorationsService: IDecorationsService, + @ILabelService private readonly labelService: ILabelService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService ) { super(container, options); } diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 737ddd849f9..7213400c86f 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -82,12 +82,12 @@ export class WorkbenchLayout extends Disposable implements IVerticalSashLayoutPr private quickInput: QuickInputService, private notificationsCenter: NotificationsCenter, private notificationsToasts: NotificationsToasts, - @IStorageService private storageService: IStorageService, - @IContextViewService private contextViewService: IContextViewService, - @IPartService private partService: IPartService, - @IViewletService private viewletService: IViewletService, - @IThemeService private themeService: IThemeService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IStorageService private readonly storageService: IStorageService, + @IContextViewService private readonly contextViewService: IContextViewService, + @IPartService private readonly partService: IPartService, + @IViewletService private readonly viewletService: IViewletService, + @IThemeService private readonly themeService: IThemeService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(); diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index 29276c3018a..2fe84cf2ba5 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -36,9 +36,9 @@ export class ViewletActivityAction extends ActivityAction { constructor( activity: IActivity, - @IViewletService private viewletService: IViewletService, - @IPartService private partService: IPartService, - @ITelemetryService private telemetryService: ITelemetryService + @IViewletService private readonly viewletService: IViewletService, + @IPartService private readonly partService: IPartService, + @ITelemetryService private readonly telemetryService: ITelemetryService ) { super(activity); } @@ -84,8 +84,8 @@ export class ToggleViewletAction extends Action { constructor( private _viewlet: ViewletDescriptor, - @IPartService private partService: IPartService, - @IViewletService private viewletService: IViewletService + @IPartService private readonly partService: IPartService, + @IViewletService private readonly viewletService: IViewletService ) { super(_viewlet.id, _viewlet.name); } @@ -200,8 +200,8 @@ class SwitchSideBarViewAction extends Action { constructor( id: string, name: string, - @IViewletService private viewletService: IViewletService, - @IActivityService private activityService: IActivityService + @IViewletService private readonly viewletService: IViewletService, + @IActivityService private readonly activityService: IActivityService ) { super(id, name); } diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 784f7eca309..35b44eccc6c 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -59,14 +59,14 @@ export class ActivitybarPart extends Part { constructor( id: string, - @IViewletService private viewletService: IViewletService, - @IInstantiationService private instantiationService: IInstantiationService, - @IPartService private partService: IPartService, + @IViewletService private readonly viewletService: IViewletService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IPartService private readonly partService: IPartService, @IThemeService themeService: IThemeService, - @IStorageService private storageService: IStorageService, - @IExtensionService private extensionService: IExtensionService, - @IViewsService private viewsService: IViewsService, - @IContextKeyService private contextKeyService: IContextKeyService + @IStorageService private readonly storageService: IStorageService, + @IExtensionService private readonly extensionService: IExtensionService, + @IViewsService private readonly viewsService: IViewsService, + @IContextKeyService private readonly contextKeyService: IContextKeyService ) { super(id, { hasTitle: false }, themeService, storageService); diff --git a/src/vs/workbench/browser/parts/compositeBar.ts b/src/vs/workbench/browser/parts/compositeBar.ts index 1ff9f349605..db313c4c8a9 100644 --- a/src/vs/workbench/browser/parts/compositeBar.ts +++ b/src/vs/workbench/browser/parts/compositeBar.ts @@ -64,8 +64,8 @@ export class CompositeBar extends Widget implements ICompositeBar { constructor( items: ICompositeBarItem[], private options: ICompositeBarOptions, - @IInstantiationService private instantiationService: IInstantiationService, - @IContextMenuService private contextMenuService: IContextMenuService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IContextMenuService private readonly contextMenuService: IContextMenuService ) { super(); diff --git a/src/vs/workbench/browser/parts/compositeBarActions.ts b/src/vs/workbench/browser/parts/compositeBarActions.ts index 0bdcc39996a..93a7671370b 100644 --- a/src/vs/workbench/browser/parts/compositeBarActions.ts +++ b/src/vs/workbench/browser/parts/compositeBarActions.ts @@ -359,7 +359,7 @@ export class CompositeOverflowActivityActionItem extends ActivityActionItem { private getBadge: (compositeId: string) => IBadge, private getCompositeOpenAction: (compositeId: string) => Action, colors: (theme: ITheme) => ICompositeBarColors, - @IContextMenuService private contextMenuService: IContextMenuService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, @IThemeService themeService: IThemeService ) { super(action, { icon: true, colors }, themeService); @@ -412,7 +412,7 @@ export class CompositeOverflowActivityActionItem extends ActivityActionItem { class ManageExtensionAction extends Action { constructor( - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super('activitybar.manage.extension', nls.localize('manageExtension', "Manage Extension")); } @@ -444,8 +444,8 @@ export class CompositeActionItem extends ActivityActionItem { colors: (theme: ITheme) => ICompositeBarColors, icon: boolean, private compositeBar: ICompositeBar, - @IContextMenuService private contextMenuService: IContextMenuService, - @IKeybindingService private keybindingService: IKeybindingService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @IKeybindingService private readonly keybindingService: IKeybindingService, @IInstantiationService instantiationService: IInstantiationService, @IThemeService themeService: IThemeService ) { diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index f54b198ae69..2b93fed352c 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -110,7 +110,7 @@ interface ISerializedUntitledEditorInput { class UntitledEditorInputFactory implements IEditorInputFactory { constructor( - @ITextFileService private textFileService: ITextFileService + @ITextFileService private readonly textFileService: ITextFileService ) { } serialize(editorInput: EditorInput): string { @@ -230,7 +230,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(ChangeEncodingAction, export class QuickOpenActionContributor extends ActionBarContributor { private openToSideActionInstance: OpenToSideFromQuickOpenAction; - constructor(@IInstantiationService private instantiationService: IInstantiationService) { + constructor(@IInstantiationService private readonly instantiationService: IInstantiationService) { super(); } diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index e89f138079c..cf8c79ab7fe 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -182,7 +182,7 @@ export class JoinTwoGroupsAction extends Action { constructor( id: string, label: string, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(id, label); } @@ -217,7 +217,7 @@ export class JoinAllGroupsAction extends Action { constructor( id: string, label: string, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(id, label); } @@ -237,7 +237,7 @@ export class NavigateBetweenGroupsAction extends Action { constructor( id: string, label: string, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(id, label); } @@ -258,7 +258,7 @@ export class FocusActiveGroupAction extends Action { constructor( id: string, label: string, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(id, label); } @@ -276,7 +276,7 @@ export abstract class BaseFocusGroupAction extends Action { id: string, label: string, private scope: IFindGroupScope, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(id, label); } @@ -409,8 +409,8 @@ export class OpenToSideFromQuickOpenAction extends Action { static readonly OPEN_TO_SIDE_LABEL = nls.localize('openToSide', "Open to the Side"); constructor( - @IEditorService private editorService: IEditorService, - @IConfigurationService private configurationService: IConfigurationService + @IEditorService private readonly editorService: IEditorService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(OpenToSideFromQuickOpenAction.OPEN_TO_SIDE_ID, OpenToSideFromQuickOpenAction.OPEN_TO_SIDE_LABEL); @@ -467,7 +467,7 @@ export class CloseEditorAction extends Action { constructor( id: string, label: string, - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super(id, label, 'close-editor-action'); } @@ -485,7 +485,7 @@ export class CloseOneEditorAction extends Action { constructor( id: string, label: string, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(id, label, 'close-editor-action'); } @@ -530,7 +530,7 @@ export class RevertAndCloseEditorAction extends Action { constructor( id: string, label: string, - @IEditorService private editorService: IEditorService + @IEditorService private readonly editorService: IEditorService ) { super(id, label); } @@ -563,8 +563,8 @@ export class CloseLeftEditorsInGroupAction extends Action { constructor( id: string, label: string, - @IEditorService private editorService: IEditorService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IEditorService private readonly editorService: IEditorService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(id, label); } @@ -695,7 +695,7 @@ export class CloseEditorsInOtherGroupsAction extends Action { constructor( id: string, label: string, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, ) { super(id, label); } @@ -720,8 +720,8 @@ export class CloseEditorInAllGroupsAction extends Action { constructor( id: string, label: string, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IEditorService private editorService: IEditorService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @IEditorService private readonly editorService: IEditorService ) { super(id, label); } @@ -852,7 +852,7 @@ export class MinimizeOtherGroupsAction extends Action { static readonly ID = 'workbench.action.minimizeOtherEditors'; static readonly LABEL = nls.localize('minimizeOtherEditorGroups', "Maximize Editor Group"); - constructor(id: string, label: string, @IEditorGroupsService private editorGroupService: IEditorGroupsService) { + constructor(id: string, label: string, @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService) { super(id, label); } @@ -868,7 +868,7 @@ export class ResetGroupSizesAction extends Action { static readonly ID = 'workbench.action.evenEditorWidths'; static readonly LABEL = nls.localize('evenEditorGroups', "Reset Editor Group Sizes"); - constructor(id: string, label: string, @IEditorGroupsService private editorGroupService: IEditorGroupsService) { + constructor(id: string, label: string, @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService) { super(id, label); } @@ -887,9 +887,9 @@ export class MaximizeGroupAction extends Action { constructor( id: string, label: string, - @IEditorService private editorService: IEditorService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IPartService private partService: IPartService + @IEditorService private readonly editorService: IEditorService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @IPartService private readonly partService: IPartService ) { super(id, label); } @@ -1098,7 +1098,7 @@ export class NavigateForwardAction extends Action { static readonly ID = 'workbench.action.navigateForward'; static readonly LABEL = nls.localize('navigateNext', "Go Forward"); - constructor(id: string, label: string, @IHistoryService private historyService: IHistoryService) { + constructor(id: string, label: string, @IHistoryService private readonly historyService: IHistoryService) { super(id, label); } @@ -1114,7 +1114,7 @@ export class NavigateBackwardsAction extends Action { static readonly ID = 'workbench.action.navigateBack'; static readonly LABEL = nls.localize('navigatePrevious', "Go Back"); - constructor(id: string, label: string, @IHistoryService private historyService: IHistoryService) { + constructor(id: string, label: string, @IHistoryService private readonly historyService: IHistoryService) { super(id, label); } @@ -1130,7 +1130,7 @@ export class NavigateToLastEditLocationAction extends Action { static readonly ID = 'workbench.action.navigateToLastEditLocation'; static readonly LABEL = nls.localize('navigateToLastEditLocation', "Go to Last Edit Location"); - constructor(id: string, label: string, @IHistoryService private historyService: IHistoryService) { + constructor(id: string, label: string, @IHistoryService private readonly historyService: IHistoryService) { super(id, label); } @@ -1146,7 +1146,7 @@ export class NavigateLastAction extends Action { static readonly ID = 'workbench.action.navigateLast'; static readonly LABEL = nls.localize('navigateLast', "Go Last"); - constructor(id: string, label: string, @IHistoryService private historyService: IHistoryService) { + constructor(id: string, label: string, @IHistoryService private readonly historyService: IHistoryService) { super(id, label); } @@ -1165,7 +1165,7 @@ export class ReopenClosedEditorAction extends Action { constructor( id: string, label: string, - @IHistoryService private historyService: IHistoryService + @IHistoryService private readonly historyService: IHistoryService ) { super(id, label); } @@ -1185,8 +1185,8 @@ export class ClearRecentFilesAction extends Action { constructor( id: string, label: string, - @IWindowsService private windowsService: IWindowsService, - @IHistoryService private historyService: IHistoryService + @IWindowsService private readonly windowsService: IWindowsService, + @IHistoryService private readonly historyService: IHistoryService ) { super(id, label); } @@ -1232,8 +1232,8 @@ export class BaseQuickOpenEditorInGroupAction extends Action { constructor( id: string, label: string, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IKeybindingService private keybindingService: IKeybindingService + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @IKeybindingService private readonly keybindingService: IKeybindingService ) { super(id, label); } @@ -1287,8 +1287,8 @@ export class OpenPreviousEditorFromHistoryAction extends Action { constructor( id: string, label: string, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IKeybindingService private keybindingService: IKeybindingService + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @IKeybindingService private readonly keybindingService: IKeybindingService ) { super(id, label); } @@ -1307,7 +1307,7 @@ export class OpenNextRecentlyUsedEditorAction extends Action { static readonly ID = 'workbench.action.openNextRecentlyUsedEditor'; static readonly LABEL = nls.localize('openNextRecentlyUsedEditor', "Open Next Recently Used Editor"); - constructor(id: string, label: string, @IHistoryService private historyService: IHistoryService) { + constructor(id: string, label: string, @IHistoryService private readonly historyService: IHistoryService) { super(id, label); } @@ -1323,7 +1323,7 @@ export class OpenPreviousRecentlyUsedEditorAction extends Action { static readonly ID = 'workbench.action.openPreviousRecentlyUsedEditor'; static readonly LABEL = nls.localize('openPreviousRecentlyUsedEditor', "Open Previous Recently Used Editor"); - constructor(id: string, label: string, @IHistoryService private historyService: IHistoryService) { + constructor(id: string, label: string, @IHistoryService private readonly historyService: IHistoryService) { super(id, label); } @@ -1342,7 +1342,7 @@ export class ClearEditorHistoryAction extends Action { constructor( id: string, label: string, - @IHistoryService private historyService: IHistoryService + @IHistoryService private readonly historyService: IHistoryService ) { super(id, label); } diff --git a/src/vs/workbench/browser/parts/editor/editorControl.ts b/src/vs/workbench/browser/parts/editor/editorControl.ts index 304b65c42d3..a557a7d82c4 100644 --- a/src/vs/workbench/browser/parts/editor/editorControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorControl.ts @@ -43,8 +43,8 @@ export class EditorControl extends Disposable { constructor( private parent: HTMLElement, private groupView: IEditorGroupView, - @IPartService private partService: IPartService, - @IInstantiationService private instantiationService: IInstantiationService, + @IPartService private readonly partService: IPartService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IProgressService progressService: IProgressService ) { super(); diff --git a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts index 0a2740fd6d3..9eca3482658 100644 --- a/src/vs/workbench/browser/parts/editor/editorDropTarget.ts +++ b/src/vs/workbench/browser/parts/editor/editorDropTarget.ts @@ -440,7 +440,7 @@ export class EditorDropTarget extends Themable { private accessor: IEditorGroupsAccessor, private container: HTMLElement, @IThemeService themeService: IThemeService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(themeService); diff --git a/src/vs/workbench/browser/parts/editor/editorGroupView.ts b/src/vs/workbench/browser/parts/editor/editorGroupView.ts index d5dcfb4a0a4..9bb84cf7d49 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupView.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupView.ts @@ -117,15 +117,15 @@ export class EditorGroupView extends Themable implements IEditorGroupView { private accessor: IEditorGroupsAccessor, from: IEditorGroupView | ISerializedEditorGroup, private _label: string, - @IInstantiationService private instantiationService: IInstantiationService, - @IContextKeyService private contextKeyService: IContextKeyService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, @IThemeService themeService: IThemeService, - @INotificationService private notificationService: INotificationService, - @ITelemetryService private telemetryService: ITelemetryService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IKeybindingService private keybindingService: IKeybindingService, - @IMenuService private menuService: IMenuService, - @IContextMenuService private contextMenuService: IContextMenuService + @INotificationService private readonly notificationService: INotificationService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @IMenuService private readonly menuService: IMenuService, + @IContextMenuService private readonly contextMenuService: IContextMenuService ) { super(themeService); diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index ef170a13346..adfe1690863 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -135,9 +135,9 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor constructor( id: string, private restorePreviousState: boolean, - @IInstantiationService private instantiationService: IInstantiationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IStorageService storageService: IStorageService ) { super(id, { hasTitle: false }, themeService, storageService); diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index fa42c37bd47..fbbf6c9ef05 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -25,8 +25,8 @@ export class EditorPickerEntry extends QuickOpenEntryGroup { constructor( private editor: EditorInput, private _group: IEditorGroup, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService ) { super(); } diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 1f459bc679d..d0e97f06e7e 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -287,12 +287,12 @@ export class EditorStatus implements IStatusbarItem { private screenReaderNotification: INotificationHandle; constructor( - @IEditorService private editorService: IEditorService, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IInstantiationService private instantiationService: IInstantiationService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IModeService private modeService: IModeService, - @ITextFileService private textFileService: ITextFileService, + @IEditorService private readonly editorService: IEditorService, + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, + @IModeService private readonly modeService: IModeService, + @ITextFileService private readonly textFileService: ITextFileService, @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService, @INotificationService private readonly notificationService: INotificationService ) { @@ -816,7 +816,7 @@ export class ShowLanguageExtensionsAction extends Action { constructor( private fileExtension: string, - @ICommandService private commandService: ICommandService, + @ICommandService private readonly commandService: ICommandService, @IExtensionGalleryService galleryService: IExtensionGalleryService ) { super(ShowLanguageExtensionsAction.ID, nls.localize('showLanguageExtensions', "Search Marketplace Extensions for '{0}'...", fileExtension)); @@ -837,14 +837,14 @@ export class ChangeModeAction extends Action { constructor( actionId: string, actionLabel: string, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService, - @IEditorService private editorService: IEditorService, - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, - @IQuickInputService private quickInputService: IQuickInputService, - @IPreferencesService private preferencesService: IPreferencesService, - @IInstantiationService private instantiationService: IInstantiationService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService, + @IEditorService private readonly editorService: IEditorService, + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IPreferencesService private readonly preferencesService: IPreferencesService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService ) { super(actionId, actionLabel); } @@ -1050,8 +1050,8 @@ class ChangeIndentationAction extends Action { constructor( actionId: string, actionLabel: string, - @IEditorService private editorService: IEditorService, - @IQuickInputService private quickInputService: IQuickInputService + @IEditorService private readonly editorService: IEditorService, + @IQuickInputService private readonly quickInputService: IQuickInputService ) { super(actionId, actionLabel); } @@ -1100,8 +1100,8 @@ export class ChangeEOLAction extends Action { constructor( actionId: string, actionLabel: string, - @IEditorService private editorService: IEditorService, - @IQuickInputService private quickInputService: IQuickInputService + @IEditorService private readonly editorService: IEditorService, + @IQuickInputService private readonly quickInputService: IQuickInputService ) { super(actionId, actionLabel); } @@ -1145,10 +1145,10 @@ export class ChangeEncodingAction extends Action { constructor( actionId: string, actionLabel: string, - @IEditorService private editorService: IEditorService, - @IQuickInputService private quickInputService: IQuickInputService, - @ITextResourceConfigurationService private textResourceConfigurationService: ITextResourceConfigurationService, - @IFileService private fileService: IFileService + @IEditorService private readonly editorService: IEditorService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @ITextResourceConfigurationService private readonly textResourceConfigurationService: ITextResourceConfigurationService, + @IFileService private readonly fileService: IFileService ) { super(actionId, actionLabel); } diff --git a/src/vs/workbench/browser/parts/editor/editorWidgets.ts b/src/vs/workbench/browser/parts/editor/editorWidgets.ts index adf02391dfb..9b384758177 100644 --- a/src/vs/workbench/browser/parts/editor/editorWidgets.ts +++ b/src/vs/workbench/browser/parts/editor/editorWidgets.ts @@ -34,7 +34,7 @@ export class FloatingClickWidget extends Widget implements IOverlayWidget { private label: string, keyBindingAction: string, @IKeybindingService keybindingService: IKeybindingService, - @IThemeService private themeService: IThemeService + @IThemeService private readonly themeService: IThemeService ) { super(); @@ -106,9 +106,9 @@ export class OpenWorkspaceButtonContribution extends Disposable implements IEdit constructor( private editor: ICodeEditor, - @IInstantiationService private instantiationService: IInstantiationService, - @IWindowService private windowService: IWindowService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IWindowService private readonly windowService: IWindowService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService ) { super(); diff --git a/src/vs/workbench/browser/parts/editor/rangeDecorations.ts b/src/vs/workbench/browser/parts/editor/rangeDecorations.ts index 0efe0a1292a..037adb131e0 100644 --- a/src/vs/workbench/browser/parts/editor/rangeDecorations.ts +++ b/src/vs/workbench/browser/parts/editor/rangeDecorations.ts @@ -28,7 +28,7 @@ export class RangeHighlightDecorations extends Disposable { private readonly _onHighlightRemoved: Emitter = this._register(new Emitter()); get onHighlghtRemoved(): Event { return this._onHighlightRemoved.event; } - constructor(@IEditorService private editorService: IEditorService) { + constructor(@IEditorService private readonly editorService: IEditorService) { super(); } diff --git a/src/vs/workbench/browser/parts/editor/resourceViewer.ts b/src/vs/workbench/browser/parts/editor/resourceViewer.ts index a0d0e554c8b..d819d0f555c 100644 --- a/src/vs/workbench/browser/parts/editor/resourceViewer.ts +++ b/src/vs/workbench/browser/parts/editor/resourceViewer.ts @@ -244,7 +244,7 @@ class ZoomStatusbarItem extends Themable implements IStatusbarItem { private onSelectScale?: (scale: Scale) => void; constructor( - @IContextMenuService private contextMenuService: IContextMenuService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, @IEditorService editorService: IEditorService, @IThemeService themeService: IThemeService ) { diff --git a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts index 896c0d66c44..59f222311bb 100644 --- a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts +++ b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts @@ -58,7 +58,7 @@ export class SideBySideEditor extends BaseEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, - @IInstantiationService private instantiationService: IInstantiationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, @IStorageService storageService: IStorageService ) { diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 02470efd4dd..3f531ff7b4d 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -71,7 +71,7 @@ export class TabsTitleControl extends TitleControl { group: IEditorGroupView, @IContextMenuService contextMenuService: IContextMenuService, @IInstantiationService instantiationService: IInstantiationService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, @IContextKeyService contextKeyService: IContextKeyService, @IKeybindingService keybindingService: IKeybindingService, @ITelemetryService telemetryService: ITelemetryService, diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index 4c39077cefb..c43dc2f7545 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -53,7 +53,7 @@ export abstract class BaseTextEditor extends BaseEditor implements ITextEditor { @ITextFileService private readonly _textFileService: ITextFileService, @IEditorService protected editorService: IEditorService, @IEditorGroupsService protected editorGroupService: IEditorGroupsService, - @IWindowService private windowService: IWindowService + @IWindowService private readonly windowService: IWindowService ) { super(id, telemetryService, themeService, storageService); diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 7033afe42b5..a4d541d0101 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -65,16 +65,16 @@ export abstract class TitleControl extends Themable { parent: HTMLElement, protected accessor: IEditorGroupsAccessor, protected group: IEditorGroupView, - @IContextMenuService private contextMenuService: IContextMenuService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, @IInstantiationService protected instantiationService: IInstantiationService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IKeybindingService private keybindingService: IKeybindingService, - @ITelemetryService private telemetryService: ITelemetryService, - @INotificationService private notificationService: INotificationService, - @IMenuService private menuService: IMenuService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @INotificationService private readonly notificationService: INotificationService, + @IMenuService private readonly menuService: IMenuService, @IQuickOpenService protected quickOpenService: IQuickOpenService, @IThemeService themeService: IThemeService, - @IExtensionService private extensionService: IExtensionService, + @IExtensionService private readonly extensionService: IExtensionService, @IConfigurationService protected configurationService: IConfigurationService, @IFileService private readonly fileService: IFileService, ) { diff --git a/src/vs/workbench/browser/parts/notifications/notificationsActions.ts b/src/vs/workbench/browser/parts/notifications/notificationsActions.ts index 60fa354d73b..f2136d88031 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsActions.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsActions.ts @@ -21,7 +21,7 @@ export class ClearNotificationAction extends Action { constructor( id: string, label: string, - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super(id, label, 'clear-notification-action'); } @@ -41,7 +41,7 @@ export class ClearAllNotificationsAction extends Action { constructor( id: string, label: string, - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super(id, label, 'clear-all-notifications-action'); } @@ -61,7 +61,7 @@ export class HideNotificationsCenterAction extends Action { constructor( id: string, label: string, - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super(id, label, 'hide-all-notifications-action'); } @@ -81,7 +81,7 @@ export class ExpandNotificationAction extends Action { constructor( id: string, label: string, - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super(id, label, 'expand-notification-action'); } @@ -101,7 +101,7 @@ export class CollapseNotificationAction extends Action { constructor( id: string, label: string, - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super(id, label, 'collapse-notification-action'); } @@ -139,7 +139,7 @@ export class CopyNotificationMessageAction extends Action { constructor( id: string, label: string, - @IClipboardService private clipboardService: IClipboardService + @IClipboardService private readonly clipboardService: IClipboardService ) { super(id, label); } @@ -154,8 +154,8 @@ export class CopyNotificationMessageAction extends Action { export class NotificationActionRunner extends ActionRunner { constructor( - @ITelemetryService private telemetryService: ITelemetryService, - @INotificationService private notificationService: INotificationService + @ITelemetryService private readonly telemetryService: ITelemetryService, + @INotificationService private readonly notificationService: INotificationService ) { super(); } diff --git a/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts b/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts index ffd4d74dfee..856e21566cc 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsCenter.ts @@ -42,11 +42,11 @@ export class NotificationsCenter extends Themable { private container: HTMLElement, private model: INotificationsModel, @IThemeService themeService: IThemeService, - @IInstantiationService private instantiationService: IInstantiationService, - @IPartService private partService: IPartService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IPartService private readonly partService: IPartService, @IContextKeyService contextKeyService: IContextKeyService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IKeybindingService private keybindingService: IKeybindingService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @IKeybindingService private readonly keybindingService: IKeybindingService ) { super(themeService); diff --git a/src/vs/workbench/browser/parts/notifications/notificationsList.ts b/src/vs/workbench/browser/parts/notifications/notificationsList.ts index 93829a6230e..c2970931501 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsList.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsList.ts @@ -26,9 +26,9 @@ export class NotificationsList extends Themable { constructor( private container: HTMLElement, private options: IListOptions, - @IInstantiationService private instantiationService: IInstantiationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, - @IContextMenuService private contextMenuService: IContextMenuService + @IContextMenuService private readonly contextMenuService: IContextMenuService ) { super(themeService); diff --git a/src/vs/workbench/browser/parts/notifications/notificationsStatus.ts b/src/vs/workbench/browser/parts/notifications/notificationsStatus.ts index efee1e196f4..c3abfe4b909 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsStatus.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsStatus.ts @@ -16,7 +16,7 @@ export class NotificationsStatus extends Disposable { constructor( private model: INotificationsModel, - @IStatusbarService private statusbarService: IStatusbarService + @IStatusbarService private readonly statusbarService: IStatusbarService ) { super(); diff --git a/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts b/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts index fd17e4c738c..0042e24a10c 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts @@ -61,13 +61,13 @@ export class NotificationsToasts extends Themable { constructor( private container: HTMLElement, private model: INotificationsModel, - @IInstantiationService private instantiationService: IInstantiationService, - @IPartService private partService: IPartService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IPartService private readonly partService: IPartService, @IThemeService themeService: IThemeService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, @IContextKeyService contextKeyService: IContextKeyService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IWindowService private windowService: IWindowService + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IWindowService private readonly windowService: IWindowService ) { super(themeService); diff --git a/src/vs/workbench/browser/parts/notifications/notificationsViewer.ts b/src/vs/workbench/browser/parts/notifications/notificationsViewer.ts index f6f7c768b6d..58142cdbcab 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsViewer.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsViewer.ts @@ -181,9 +181,9 @@ export class NotificationRenderer implements IListRenderer implements IPanelService { @IInstantiationService instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, @IContextKeyService contextKeyService: IContextKeyService, - @ILifecycleService private lifecycleService: ILifecycleService + @ILifecycleService private readonly lifecycleService: ILifecycleService ) { super( notificationService, diff --git a/src/vs/workbench/browser/parts/quickinput/quickInput.ts b/src/vs/workbench/browser/parts/quickinput/quickInput.ts index 3b33f1b9256..9926fb1de1f 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInput.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInput.ts @@ -794,14 +794,14 @@ export class QuickInputService extends Component implements IQuickInputService { private controller: QuickInput; constructor( - @IEnvironmentService private environmentService: IEnvironmentService, - @IConfigurationService private configurationService: IConfigurationService, - @IInstantiationService private instantiationService: IInstantiationService, - @IPartService private partService: IPartService, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IKeybindingService private keybindingService: IKeybindingService, - @IContextKeyService private contextKeyService: IContextKeyService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IPartService private readonly partService: IPartService, + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, @IThemeService themeService: IThemeService, @IStorageService storageService: IStorageService ) { @@ -1412,7 +1412,7 @@ export class BackAction extends Action { public static readonly ID = 'workbench.action.quickInputBack'; public static readonly LABEL = localize('back', "Back"); - constructor(id: string, label: string, @IQuickInputService private quickInputService: IQuickInputService) { + constructor(id: string, label: string, @IQuickInputService private readonly quickInputService: IQuickInputService) { super(id, label); } diff --git a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts index 4682fd42f75..876cd49cbf2 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInputList.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInputList.ts @@ -239,7 +239,7 @@ export class QuickInputList { constructor( private parent: HTMLElement, id: string, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { this.id = id; this.container = dom.append(this.parent, $('.quick-input-list')); diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index dc0bf69e762..f06b9827812 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -86,13 +86,13 @@ export class QuickOpenController extends Component implements IQuickOpenService private pendingGetResultsInvocation: CancellationTokenSource; constructor( - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @INotificationService private notificationService: INotificationService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IConfigurationService private configurationService: IConfigurationService, - @IInstantiationService private instantiationService: IInstantiationService, - @IPartService private partService: IPartService, - @IEnvironmentService private environmentService: IEnvironmentService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @INotificationService private readonly notificationService: INotificationService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IPartService private readonly partService: IPartService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, @IThemeService themeService: IThemeService, @IStorageService storageService: IStorageService ) { @@ -645,9 +645,9 @@ class EditorHistoryHandler { private scorerCache: ScorerCache; constructor( - @IHistoryService private historyService: IHistoryService, - @IInstantiationService private instantiationService: IInstantiationService, - @IFileService private fileService: IFileService + @IHistoryService private readonly historyService: IHistoryService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IFileService private readonly fileService: IFileService ) { this.scorerCache = Object.create(null); } @@ -729,10 +729,10 @@ export class EditorHistoryEntry extends EditorQuickOpenEntry { constructor( input: IEditorInput | IResourceInput, @IEditorService editorService: IEditorService, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService, - @ITextFileService private textFileService: ITextFileService, - @IConfigurationService private configurationService: IConfigurationService, + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService, + @ITextFileService private readonly textFileService: ITextFileService, + @IConfigurationService private readonly configurationService: IConfigurationService, @ILabelService labelService: ILabelService, @IFileService fileService: IFileService ) { @@ -826,11 +826,11 @@ export class RemoveFromEditorHistoryAction extends Action { constructor( id: string, label: string, - @IQuickInputService private quickInputService: IQuickInputService, - @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService, - @IInstantiationService private instantiationService: IInstantiationService, - @IHistoryService private historyService: IHistoryService + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IModelService private readonly modelService: IModelService, + @IModeService private readonly modeService: IModeService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IHistoryService private readonly historyService: IHistoryService ) { super(id, label); } diff --git a/src/vs/workbench/browser/parts/quickopen/quickopen.ts b/src/vs/workbench/browser/parts/quickopen/quickopen.ts index e9d1f7a968d..1c00cf57074 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickopen.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickopen.ts @@ -43,9 +43,9 @@ export class BaseQuickOpenNavigateAction extends Action { label: string, private next: boolean, private quickNavigate: boolean, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IQuickInputService private quickInputService: IQuickInputService, - @IKeybindingService private keybindingService: IKeybindingService + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IKeybindingService private readonly keybindingService: IKeybindingService ) { super(id, label); } diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index e9be92173e0..5847a12b0a0 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -56,7 +56,7 @@ export class SidebarPart extends CompositePart implements IViewletServi @IInstantiationService instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, @IContextKeyService contextKeyService: IContextKeyService, - @IExtensionService private extensionService: IExtensionService + @IExtensionService private readonly extensionService: IExtensionService ) { super( notificationService, @@ -253,8 +253,8 @@ class FocusSideBarAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPartService private partService: IPartService + @IViewletService private readonly viewletService: IViewletService, + @IPartService private readonly partService: IPartService ) { super(id, label); } diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index 01871fd4645..93559ebac8d 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -42,9 +42,9 @@ export class StatusbarPart extends Part implements IStatusbarService { constructor( id: string, - @IInstantiationService private instantiationService: IInstantiationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @IStorageService storageService: IStorageService ) { super(id, { hasTitle: false }, themeService, storageService); @@ -227,13 +227,13 @@ class StatusBarEntryItem implements IStatusbarItem { constructor( private entry: IStatusbarEntry, - @ICommandService private commandService: ICommandService, - @IInstantiationService private instantiationService: IInstantiationService, - @INotificationService private notificationService: INotificationService, - @ITelemetryService private telemetryService: ITelemetryService, - @IContextMenuService private contextMenuService: IContextMenuService, - @IEditorService private editorService: IEditorService, - @IThemeService private themeService: IThemeService + @ICommandService private readonly commandService: ICommandService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @INotificationService private readonly notificationService: INotificationService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @IEditorService private readonly editorService: IEditorService, + @IThemeService private readonly themeService: IThemeService ) { this.entry = entry; @@ -323,7 +323,7 @@ class StatusBarEntryItem implements IStatusbarItem { class ManageExtensionAction extends Action { constructor( - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super('statusbar.manage.extension', nls.localize('manageExtension', "Manage Extension")); } diff --git a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts index b4c611954b4..f76c39c936f 100644 --- a/src/vs/workbench/browser/parts/titlebar/menubarControl.ts +++ b/src/vs/workbench/browser/parts/titlebar/menubarControl.ts @@ -81,20 +81,20 @@ export class MenubarControl extends Disposable { private static MAX_MENU_RECENT_ENTRIES = 10; constructor( - @IThemeService private themeService: IThemeService, - @IMenubarService private menubarService: IMenubarService, - @IMenuService private menuService: IMenuService, - @IWindowService private windowService: IWindowService, - @IWindowsService private windowsService: IWindowsService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IKeybindingService private keybindingService: IKeybindingService, - @IConfigurationService private configurationService: IConfigurationService, - @ILabelService private labelService: ILabelService, - @IUpdateService private updateService: IUpdateService, - @IStorageService private storageService: IStorageService, - @INotificationService private notificationService: INotificationService, - @IPreferencesService private preferencesService: IPreferencesService, - @IEnvironmentService private environmentService: IEnvironmentService + @IThemeService private readonly themeService: IThemeService, + @IMenubarService private readonly menubarService: IMenubarService, + @IMenuService private readonly menuService: IMenuService, + @IWindowService private readonly windowService: IWindowService, + @IWindowsService private readonly windowsService: IWindowsService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @ILabelService private readonly labelService: ILabelService, + @IUpdateService private readonly updateService: IUpdateService, + @IStorageService private readonly storageService: IStorageService, + @INotificationService private readonly notificationService: INotificationService, + @IPreferencesService private readonly preferencesService: IPreferencesService, + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { super(); diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index 106d1426292..32a8716eca9 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -63,16 +63,16 @@ export class TitlebarPart extends Part implements ITitleService { constructor( id: string, - @IContextMenuService private contextMenuService: IContextMenuService, - @IWindowService private windowService: IWindowService, - @IConfigurationService private configurationService: IConfigurationService, - @IWindowsService private windowsService: IWindowsService, - @IEditorService private editorService: IEditorService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IInstantiationService private instantiationService: IInstantiationService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @IWindowService private readonly windowService: IWindowService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IWindowsService private readonly windowsService: IWindowsService, + @IEditorService private readonly editorService: IEditorService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, - @ILabelService private labelService: ILabelService, + @ILabelService private readonly labelService: ILabelService, @IStorageService storageService: IStorageService ) { super(id, { hasTitle: false }, themeService, storageService); diff --git a/src/vs/workbench/browser/parts/views/customView.ts b/src/vs/workbench/browser/parts/views/customView.ts index 961e43eb88c..d3494ac9b65 100644 --- a/src/vs/workbench/browser/parts/views/customView.ts +++ b/src/vs/workbench/browser/parts/views/customView.ts @@ -51,7 +51,7 @@ export class CustomTreeViewPanel extends ViewletPanel { constructor( options: IViewletViewOptions, - @INotificationService private notificationService: INotificationService, + @INotificationService private readonly notificationService: INotificationService, @IKeybindingService keybindingService: IKeybindingService, @IContextMenuService contextMenuService: IContextMenuService, @IConfigurationService configurationService: IConfigurationService, @@ -117,8 +117,8 @@ class TitleMenus implements IDisposable { constructor( id: string, - @IContextKeyService private contextKeyService: IContextKeyService, - @IMenuService private menuService: IMenuService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IMenuService private readonly menuService: IMenuService, ) { if (this.titleDisposable) { this.titleDisposable.dispose(); @@ -211,12 +211,12 @@ export class CustomTreeView extends Disposable implements ITreeView { constructor( private id: string, private container: ViewContainer, - @IExtensionService private extensionService: IExtensionService, - @IWorkbenchThemeService private themeService: IWorkbenchThemeService, - @IInstantiationService private instantiationService: IInstantiationService, - @ICommandService private commandService: ICommandService, - @IConfigurationService private configurationService: IConfigurationService, - @IProgressService2 private progressService: IProgressService2 + @IExtensionService private readonly extensionService: IExtensionService, + @IWorkbenchThemeService private readonly themeService: IWorkbenchThemeService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ICommandService private readonly commandService: ICommandService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IProgressService2 private readonly progressService: IProgressService2 ) { super(); this.root = new Root(); @@ -556,7 +556,7 @@ class TreeDataSource implements IDataSource { constructor( private treeView: ITreeView, private container: ViewContainer, - @IProgressService2 private progressService: IProgressService2 + @IProgressService2 private readonly progressService: IProgressService2 ) { } @@ -626,9 +626,9 @@ class TreeRenderer implements IRenderer { private menus: TreeMenus, private labels: ResourceLabels, private actionItemProvider: IActionItemProvider, - @IWorkbenchThemeService private themeService: IWorkbenchThemeService, - @IConfigurationService private configurationService: IConfigurationService, - @ILabelService private labelService: ILabelService + @IWorkbenchThemeService private readonly themeService: IWorkbenchThemeService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @ILabelService private readonly labelService: ILabelService ) { } @@ -763,7 +763,7 @@ class TreeController extends WorkbenchTreeController { constructor( private treeViewId: string, private menus: TreeMenus, - @IContextMenuService private contextMenuService: IContextMenuService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, @IKeybindingService private readonly _keybindingService: IKeybindingService, @IConfigurationService configurationService: IConfigurationService ) { @@ -838,9 +838,9 @@ class TreeMenus extends Disposable implements IDisposable { constructor( private id: string, - @IContextKeyService private contextKeyService: IContextKeyService, - @IMenuService private menuService: IMenuService, - @IContextMenuService private contextMenuService: IContextMenuService + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IMenuService private readonly menuService: IMenuService, + @IContextMenuService private readonly contextMenuService: IContextMenuService ) { super(); } diff --git a/src/vs/workbench/browser/parts/views/views.ts b/src/vs/workbench/browser/parts/views/views.ts index a5cf3679c23..6324d584f9c 100644 --- a/src/vs/workbench/browser/parts/views/views.ts +++ b/src/vs/workbench/browser/parts/views/views.ts @@ -84,7 +84,7 @@ class ViewDescriptorCollection extends Disposable implements IViewDescriptorColl constructor( container: ViewContainer, - @IContextKeyService private contextKeyService: IContextKeyService + @IContextKeyService private readonly contextKeyService: IContextKeyService ) { super(); const onRelevantViewsRegistered = filterViewEvent(container, ViewsRegistry.onViewsRegistered); @@ -516,8 +516,8 @@ export class ViewsService extends Disposable implements IViewsService { private readonly activeViewContextKeys: Map>; constructor( - @IViewletService private viewletService: IViewletService, - @IContextKeyService private contextKeyService: IContextKeyService + @IViewletService private readonly viewletService: IViewletService, + @IContextKeyService private readonly contextKeyService: IContextKeyService ) { super(); diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index 030dcf0fa0e..97b8b9b2678 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -317,7 +317,7 @@ export class QuickOpenAction extends Action { id: string, label: string, prefix: string, - @IQuickOpenService private quickOpenService: IQuickOpenService + @IQuickOpenService private readonly quickOpenService: IQuickOpenService ) { super(id, label); diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index b6a5f34ec75..31c5a02dbf8 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -128,8 +128,8 @@ export class ShowViewletAction extends Action { name: string, viewletId: string, @IViewletService protected viewletService: IViewletService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IPartService private partService: IPartService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @IPartService private readonly partService: IPartService ) { super(id, name); diff --git a/src/vs/workbench/common/editor/binaryEditorModel.ts b/src/vs/workbench/common/editor/binaryEditorModel.ts index 183f5163765..9087c09cfcc 100644 --- a/src/vs/workbench/common/editor/binaryEditorModel.ts +++ b/src/vs/workbench/common/editor/binaryEditorModel.ts @@ -22,7 +22,7 @@ export class BinaryEditorModel extends EditorModel { constructor( resource: URI, name: string, - @IFileService private fileService: IFileService + @IFileService private readonly fileService: IFileService ) { super(); diff --git a/src/vs/workbench/common/editor/dataUriEditorInput.ts b/src/vs/workbench/common/editor/dataUriEditorInput.ts index 5eaa261c2a3..b807cbcdb1c 100644 --- a/src/vs/workbench/common/editor/dataUriEditorInput.ts +++ b/src/vs/workbench/common/editor/dataUriEditorInput.ts @@ -25,7 +25,7 @@ export class DataUriEditorInput extends EditorInput { name: string, description: string, resource: URI, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(); diff --git a/src/vs/workbench/common/editor/editorGroup.ts b/src/vs/workbench/common/editor/editorGroup.ts index 885b2871801..650785bc720 100644 --- a/src/vs/workbench/common/editor/editorGroup.ts +++ b/src/vs/workbench/common/editor/editorGroup.ts @@ -101,8 +101,8 @@ export class EditorGroup extends Disposable { constructor( labelOrSerializedGroup: ISerializedEditorGroup, - @IInstantiationService private instantiationService: IInstantiationService, - @IConfigurationService private configurationService: IConfigurationService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(); diff --git a/src/vs/workbench/common/editor/resourceEditorInput.ts b/src/vs/workbench/common/editor/resourceEditorInput.ts index c0f7d4ff143..8e9061c79ec 100644 --- a/src/vs/workbench/common/editor/resourceEditorInput.ts +++ b/src/vs/workbench/common/editor/resourceEditorInput.ts @@ -28,8 +28,8 @@ export class ResourceEditorInput extends EditorInput { name: string, description: string, resource: URI, - @ITextModelService private textModelResolverService: ITextModelService, - @IHashService private hashService: IHashService + @ITextModelService private readonly textModelResolverService: ITextModelService, + @IHashService private readonly hashService: IHashService ) { super(); diff --git a/src/vs/workbench/common/editor/untitledEditorInput.ts b/src/vs/workbench/common/editor/untitledEditorInput.ts index 438200b313a..817ec4eefc4 100644 --- a/src/vs/workbench/common/editor/untitledEditorInput.ts +++ b/src/vs/workbench/common/editor/untitledEditorInput.ts @@ -41,10 +41,10 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport private modeId: string, private initialValue: string, private preferredEncoding: string, - @IInstantiationService private instantiationService: IInstantiationService, - @ITextFileService private textFileService: ITextFileService, - @IHashService private hashService: IHashService, - @ILabelService private labelService: ILabelService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ITextFileService private readonly textFileService: ITextFileService, + @IHashService private readonly hashService: IHashService, + @ILabelService private readonly labelService: ILabelService ) { super(); diff --git a/src/vs/workbench/common/editor/untitledEditorModel.ts b/src/vs/workbench/common/editor/untitledEditorModel.ts index 371f2c57cfe..54817b0a6b4 100644 --- a/src/vs/workbench/common/editor/untitledEditorModel.ts +++ b/src/vs/workbench/common/editor/untitledEditorModel.ts @@ -43,8 +43,8 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin private preferredEncoding: string, @IModeService modeService: IModeService, @IModelService modelService: IModelService, - @IBackupFileService private backupFileService: IBackupFileService, - @ITextResourceConfigurationService private configurationService: ITextResourceConfigurationService + @IBackupFileService private readonly backupFileService: IBackupFileService, + @ITextResourceConfigurationService private readonly configurationService: ITextResourceConfigurationService ) { super(modelService, modeService); diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 3eb403d77a6..1dafd0865db 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -51,7 +51,7 @@ export class CloseCurrentWindowAction extends Action { static readonly ID = 'workbench.action.closeWindow'; static readonly LABEL = nls.localize('closeWindow', "Close Window"); - constructor(id: string, label: string, @IWindowService private windowService: IWindowService) { + constructor(id: string, label: string, @IWindowService private readonly windowService: IWindowService) { super(id, label); } @@ -70,9 +70,9 @@ export class CloseWorkspaceAction extends Action { constructor( id: string, label: string, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @INotificationService private notificationService: INotificationService, - @IWindowService private windowService: IWindowService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @INotificationService private readonly notificationService: INotificationService, + @IWindowService private readonly windowService: IWindowService ) { super(id, label); } @@ -96,7 +96,7 @@ export class NewWindowAction extends Action { constructor( id: string, label: string, - @IWindowsService private windowsService: IWindowsService + @IWindowsService private readonly windowsService: IWindowsService ) { super(id, label); } @@ -111,7 +111,7 @@ export class ToggleFullScreenAction extends Action { static readonly ID = 'workbench.action.toggleFullScreen'; static LABEL = nls.localize('toggleFullScreen', "Toggle Full Screen"); - constructor(id: string, label: string, @IWindowService private windowService: IWindowService) { + constructor(id: string, label: string, @IWindowService private readonly windowService: IWindowService) { super(id, label); } @@ -130,7 +130,7 @@ export class ToggleMenuBarAction extends Action { constructor( id: string, label: string, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label); } @@ -159,7 +159,7 @@ export class ToggleDevToolsAction extends Action { static readonly ID = 'workbench.action.toggleDevTools'; static LABEL = nls.localize('toggleDevTools', "Toggle Developer Tools"); - constructor(id: string, label: string, @IWindowService private windowsService: IWindowService) { + constructor(id: string, label: string, @IWindowService private readonly windowsService: IWindowService) { super(id, label); } @@ -174,7 +174,7 @@ export abstract class BaseZoomAction extends Action { constructor( id: string, label: string, - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService ) { super(id, label); } @@ -263,7 +263,7 @@ export class ReloadWindowAction extends Action { constructor( id: string, label: string, - @IWindowService private windowService: IWindowService + @IWindowService private readonly windowService: IWindowService ) { super(id, label); } @@ -281,7 +281,7 @@ export class ReloadWindowWithExtensionsDisabledAction extends Action { constructor( id: string, label: string, - @IWindowService private windowService: IWindowService + @IWindowService private readonly windowService: IWindowService ) { super(id, label); } @@ -552,7 +552,7 @@ export class OpenIssueReporterAction extends Action { constructor( id: string, label: string, - @IWorkbenchIssueService private issueService: IWorkbenchIssueService + @IWorkbenchIssueService private readonly issueService: IWorkbenchIssueService ) { super(id, label); } @@ -570,7 +570,7 @@ export class OpenProcessExplorer extends Action { constructor( id: string, label: string, - @IWorkbenchIssueService private issueService: IWorkbenchIssueService + @IWorkbenchIssueService private readonly issueService: IWorkbenchIssueService ) { super(id, label); } @@ -588,7 +588,7 @@ export class ReportPerformanceIssueUsingReporterAction extends Action { constructor( id: string, label: string, - @IWorkbenchIssueService private issueService: IWorkbenchIssueService + @IWorkbenchIssueService private readonly issueService: IWorkbenchIssueService ) { super(id, label); } @@ -690,7 +690,7 @@ export class ToggleSharedProcessAction extends Action { static readonly ID = 'workbench.action.toggleSharedProcess'; static LABEL = nls.localize('toggleSharedProcess', "Toggle Shared Process"); - constructor(id: string, label: string, @IWindowsService private windowsService: IWindowsService) { + constructor(id: string, label: string, @IWindowsService private readonly windowsService: IWindowsService) { super(id, label); } @@ -1032,7 +1032,7 @@ export class NewWindowTab extends Action { constructor( _id: string, _label: string, - @IWindowsService private windowsService: IWindowsService + @IWindowsService private readonly windowsService: IWindowsService ) { super(NewWindowTab.ID, NewWindowTab.LABEL); } @@ -1050,7 +1050,7 @@ export class ShowPreviousWindowTab extends Action { constructor( _id: string, _label: string, - @IWindowsService private windowsService: IWindowsService + @IWindowsService private readonly windowsService: IWindowsService ) { super(ShowPreviousWindowTab.ID, ShowPreviousWindowTab.LABEL); } @@ -1068,7 +1068,7 @@ export class ShowNextWindowTab extends Action { constructor( _id: string, _label: string, - @IWindowsService private windowsService: IWindowsService + @IWindowsService private readonly windowsService: IWindowsService ) { super(ShowNextWindowTab.ID, ShowNextWindowTab.LABEL); } @@ -1086,7 +1086,7 @@ export class MoveWindowTabToNewWindow extends Action { constructor( _id: string, _label: string, - @IWindowsService private windowsService: IWindowsService + @IWindowsService private readonly windowsService: IWindowsService ) { super(MoveWindowTabToNewWindow.ID, MoveWindowTabToNewWindow.LABEL); } @@ -1104,7 +1104,7 @@ export class MergeAllWindowTabs extends Action { constructor( _id: string, _label: string, - @IWindowsService private windowsService: IWindowsService + @IWindowsService private readonly windowsService: IWindowsService ) { super(MergeAllWindowTabs.ID, MergeAllWindowTabs.LABEL); } @@ -1122,7 +1122,7 @@ export class ToggleWindowTabsBar extends Action { constructor( _id: string, _label: string, - @IWindowsService private windowsService: IWindowsService + @IWindowsService private readonly windowsService: IWindowsService ) { super(ToggleWindowTabsBar.ID, ToggleWindowTabsBar.LABEL); } @@ -1236,7 +1236,7 @@ export class ShowAboutDialogAction extends Action { constructor( id: string, label: string, - @IWindowsService private windowsService: IWindowsService + @IWindowsService private readonly windowsService: IWindowsService ) { super(id, label); } @@ -1254,8 +1254,8 @@ export class InspectContextKeysAction extends Action { constructor( id: string, label: string, - @IContextKeyService private contextKeyService: IContextKeyService, - @IWindowService private windowService: IWindowService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IWindowService private readonly windowService: IWindowService, ) { super(id, label); } @@ -1313,7 +1313,7 @@ export class ToggleScreencastModeAction extends Action { static disposable: IDisposable | undefined; - constructor(id: string, label: string, @IKeybindingService private keybindingService: IKeybindingService) { + constructor(id: string, label: string, @IKeybindingService private readonly keybindingService: IKeybindingService) { super(id, label); } diff --git a/src/vs/workbench/electron-browser/resources.ts b/src/vs/workbench/electron-browser/resources.ts index 6a95d4c1751..8fe732e5f6c 100644 --- a/src/vs/workbench/electron-browser/resources.ts +++ b/src/vs/workbench/electron-browser/resources.ts @@ -26,8 +26,8 @@ export class ResourceGlobMatcher extends Disposable { constructor( private globFn: (root?: URI) => IExpression, private shouldUpdate: (event: IConfigurationChangeEvent) => boolean, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IConfigurationService private configurationService: IConfigurationService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(); diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index 763130da465..4937c342c55 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -64,22 +64,22 @@ export class ElectronWindow extends Themable { private pendingFoldersToAdd: URI[]; constructor( - @IEditorService private editorService: EditorServiceImpl, - @IWindowsService private windowsService: IWindowsService, - @IWindowService private windowService: IWindowService, - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, - @ITitleService private titleService: ITitleService, + @IEditorService private readonly editorService: EditorServiceImpl, + @IWindowsService private readonly windowsService: IWindowsService, + @IWindowService private readonly windowService: IWindowService, + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService, + @ITitleService private readonly titleService: ITitleService, @IWorkbenchThemeService protected themeService: IWorkbenchThemeService, - @INotificationService private notificationService: INotificationService, - @ICommandService private commandService: ICommandService, - @IKeybindingService private keybindingService: IKeybindingService, - @IContextMenuService private contextMenuService: IContextMenuService, - @ITelemetryService private telemetryService: ITelemetryService, - @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService, - @IFileService private fileService: IFileService, - @IMenuService private menuService: IMenuService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IIntegrityService private integrityService: IIntegrityService + @INotificationService private readonly notificationService: INotificationService, + @ICommandService private readonly commandService: ICommandService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService, + @IFileService private readonly fileService: IFileService, + @IMenuService private readonly menuService: IMenuService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IIntegrityService private readonly integrityService: IIntegrityService ) { super(themeService); diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 0803361ed66..a82184edcf0 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -236,14 +236,14 @@ export class Workbench extends Disposable implements IPartService { serviceCollection: ServiceCollection, private lifecycleService: LifecycleService, private mainProcessClient: IPCClient, - @IInstantiationService private instantiationService: IInstantiationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IStorageService private storageService: IStorageService, - @IConfigurationService private configurationService: WorkspaceService, - @IWorkbenchThemeService private themeService: WorkbenchThemeService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWindowService private windowService: IWindowService, - @INotificationService private notificationService: NotificationService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IStorageService private readonly storageService: IStorageService, + @IConfigurationService private readonly configurationService: WorkspaceService, + @IWorkbenchThemeService private readonly themeService: WorkbenchThemeService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IWindowService private readonly windowService: IWindowService, + @INotificationService private readonly notificationService: NotificationService ) { super(); diff --git a/src/vs/workbench/parts/backup/common/backupModelTracker.ts b/src/vs/workbench/parts/backup/common/backupModelTracker.ts index 6a742b7e639..68a433394c4 100644 --- a/src/vs/workbench/parts/backup/common/backupModelTracker.ts +++ b/src/vs/workbench/parts/backup/common/backupModelTracker.ts @@ -21,10 +21,10 @@ export class BackupModelTracker extends Disposable implements IWorkbenchContribu private configuredAutoSaveAfterDelay: boolean; constructor( - @IBackupFileService private backupFileService: IBackupFileService, - @ITextFileService private textFileService: ITextFileService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IConfigurationService private configurationService: IConfigurationService + @IBackupFileService private readonly backupFileService: IBackupFileService, + @ITextFileService private readonly textFileService: ITextFileService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(); diff --git a/src/vs/workbench/parts/backup/common/backupRestorer.ts b/src/vs/workbench/parts/backup/common/backupRestorer.ts index 89f173c7478..a78ffc4d2f2 100644 --- a/src/vs/workbench/parts/backup/common/backupRestorer.ts +++ b/src/vs/workbench/parts/backup/common/backupRestorer.ts @@ -17,9 +17,9 @@ export class BackupRestorer implements IWorkbenchContribution { private static readonly UNTITLED_REGEX = /Untitled-\d+/; constructor( - @IEditorService private editorService: IEditorService, - @IBackupFileService private backupFileService: IBackupFileService, - @ILifecycleService private lifecycleService: ILifecycleService + @IEditorService private readonly editorService: IEditorService, + @IBackupFileService private readonly backupFileService: IBackupFileService, + @ILifecycleService private readonly lifecycleService: ILifecycleService ) { this.restoreBackups(); } diff --git a/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts b/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts index da1d7577551..677b621801e 100644 --- a/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts +++ b/src/vs/workbench/parts/cli/electron-browser/cli.contribution.ts @@ -45,9 +45,9 @@ class InstallAction extends Action { constructor( id: string, label: string, - @INotificationService private notificationService: INotificationService, - @IDialogService private dialogService: IDialogService, - @ILogService private logService: ILogService + @INotificationService private readonly notificationService: INotificationService, + @IDialogService private readonly dialogService: IDialogService, + @ILogService private readonly logService: ILogService ) { super(id, label); } @@ -126,9 +126,9 @@ class UninstallAction extends Action { constructor( id: string, label: string, - @INotificationService private notificationService: INotificationService, - @ILogService private logService: ILogService, - @IDialogService private dialogService: IDialogService + @INotificationService private readonly notificationService: INotificationService, + @ILogService private readonly logService: ILogService, + @IDialogService private readonly dialogService: IDialogService ) { super(id, label); } diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts b/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts index 09170fdd1f1..5e1b6da2163 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts @@ -24,7 +24,7 @@ export class ToggleMultiCursorModifierAction extends Action { constructor( id: string, label: string, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label); } diff --git a/src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts b/src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts index ef05a7fe117..3de0eb9dc44 100644 --- a/src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts +++ b/src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts @@ -166,15 +166,15 @@ export class ReviewController implements IEditorContribution { constructor( editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, - @IThemeService private themeService: IThemeService, - @ICommentService private commentService: ICommentService, - @INotificationService private notificationService: INotificationService, - @IInstantiationService private instantiationService: IInstantiationService, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService, - @ICodeEditorService private codeEditorService: ICodeEditorService, - @IOpenerService private openerService: IOpenerService, - @IDialogService private dialogService: IDialogService + @IThemeService private readonly themeService: IThemeService, + @ICommentService private readonly commentService: ICommentService, + @INotificationService private readonly notificationService: INotificationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService, + @ICodeEditorService private readonly codeEditorService: ICodeEditorService, + @IOpenerService private readonly openerService: IOpenerService, + @IDialogService private readonly dialogService: IDialogService ) { this.editor = editor; this.globalToDispose = []; diff --git a/src/vs/workbench/parts/comments/electron-browser/commentsPanel.ts b/src/vs/workbench/parts/comments/electron-browser/commentsPanel.ts index 7bfec8f848a..43a7d4b5d85 100644 --- a/src/vs/workbench/parts/comments/electron-browser/commentsPanel.ts +++ b/src/vs/workbench/parts/comments/electron-browser/commentsPanel.ts @@ -38,11 +38,11 @@ export class CommentsPanel extends Panel { private collapseAllAction: IAction; constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @ICommentService private commentService: ICommentService, - @IEditorService private editorService: IEditorService, - @ICommandService private commandService: ICommandService, - @IOpenerService private openerService: IOpenerService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ICommentService private readonly commentService: ICommentService, + @IEditorService private readonly editorService: IEditorService, + @ICommandService private readonly commandService: ICommandService, + @IOpenerService private readonly openerService: IOpenerService, @ITelemetryService telemetryService: ITelemetryService, @IThemeService themeService: IThemeService, @IStorageService storageService: IStorageService diff --git a/src/vs/workbench/parts/comments/electron-browser/commentsTreeViewer.ts b/src/vs/workbench/parts/comments/electron-browser/commentsTreeViewer.ts index dc92d3b0217..5989090ec45 100644 --- a/src/vs/workbench/parts/comments/electron-browser/commentsTreeViewer.ts +++ b/src/vs/workbench/parts/comments/electron-browser/commentsTreeViewer.ts @@ -71,7 +71,7 @@ export class CommentsModelRenderer implements ITreeRenderer { constructor( private labels: ResourceLabels, - @IOpenerService private openerService: IOpenerService + @IOpenerService private readonly openerService: IOpenerService ) { } diff --git a/src/vs/workbench/parts/debug/browser/baseDebugView.ts b/src/vs/workbench/parts/debug/browser/baseDebugView.ts index 74949f48d0e..b574dca5f88 100644 --- a/src/vs/workbench/parts/debug/browser/baseDebugView.ts +++ b/src/vs/workbench/parts/debug/browser/baseDebugView.ts @@ -130,8 +130,8 @@ export abstract class AbstractExpressionsRenderer constructor( @IDebugService protected debugService: IDebugService, - @IContextViewService private contextViewService: IContextViewService, - @IThemeService private themeService: IThemeService + @IContextViewService private readonly contextViewService: IContextViewService, + @IThemeService private readonly themeService: IThemeService ) { super(debugService.getViewModel().onDidSelectExpression); } diff --git a/src/vs/workbench/parts/debug/browser/breakpointsView.ts b/src/vs/workbench/parts/debug/browser/breakpointsView.ts index 723fa3a7d5b..1c572502b27 100644 --- a/src/vs/workbench/parts/debug/browser/breakpointsView.ts +++ b/src/vs/workbench/parts/debug/browser/breakpointsView.ts @@ -50,12 +50,12 @@ export class BreakpointsView extends ViewletPanel { constructor( options: IViewletViewOptions, @IContextMenuService contextMenuService: IContextMenuService, - @IDebugService private debugService: IDebugService, + @IDebugService private readonly debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService, - @IThemeService private themeService: IThemeService, - @IEditorService private editorService: IEditorService, - @IContextViewService private contextViewService: IContextViewService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IThemeService private readonly themeService: IThemeService, + @IEditorService private readonly editorService: IEditorService, + @IContextViewService private readonly contextViewService: IContextViewService, @IConfigurationService configurationService: IConfigurationService ) { super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section") }, keybindingService, contextMenuService, configurationService); @@ -285,8 +285,8 @@ interface IInputTemplateData { class BreakpointsRenderer implements IListRenderer { constructor( - @IDebugService private debugService: IDebugService, - @ILabelService private labelService: ILabelService + @IDebugService private readonly debugService: IDebugService, + @ILabelService private readonly labelService: ILabelService ) { // noop } @@ -394,7 +394,7 @@ class ExceptionBreakpointsRenderer implements IListRenderer { constructor( - @IDebugService private debugService: IDebugService + @IDebugService private readonly debugService: IDebugService ) { // noop } diff --git a/src/vs/workbench/parts/debug/browser/debugActionItems.ts b/src/vs/workbench/parts/debug/browser/debugActionItems.ts index 98faa27f8ec..5982a254e28 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionItems.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionItems.ts @@ -38,11 +38,11 @@ export class StartDebugActionItem implements IActionItem { constructor( private context: any, private action: IAction, - @IDebugService private debugService: IDebugService, - @IThemeService private themeService: IThemeService, - @IConfigurationService private configurationService: IConfigurationService, - @ICommandService private commandService: ICommandService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IDebugService private readonly debugService: IDebugService, + @IThemeService private readonly themeService: IThemeService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @ICommandService private readonly commandService: ICommandService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @IContextViewService contextViewService: IContextViewService, ) { this.toDispose = []; diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 7485fe71b15..55ff3660ac6 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -79,8 +79,8 @@ export class ConfigureAction extends AbstractDebugAction { constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @INotificationService private notificationService: INotificationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @INotificationService private readonly notificationService: INotificationService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService ) { super(id, label, 'debug-action configure', debugService, keybindingService); this.toDispose.push(debugService.getConfigurationManager().onDidSelectConfiguration(() => this.updateClass())); @@ -122,8 +122,8 @@ export class StartAction extends AbstractDebugAction { constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IHistoryService private historyService: IHistoryService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IHistoryService private readonly historyService: IHistoryService ) { super(id, label, 'debug-action start', debugService, keybindingService); @@ -194,7 +194,7 @@ export class SelectAndStartAction extends AbstractDebugAction { @ICommandService commandService: ICommandService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IFileService fileService: IFileService, - @IQuickOpenService private quickOpenService: IQuickOpenService + @IQuickOpenService private readonly quickOpenService: IQuickOpenService ) { super(id, label, undefined, debugService, keybindingService); } @@ -212,8 +212,8 @@ export class RestartAction extends AbstractDebugAction { constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IHistoryService private historyService: IHistoryService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IHistoryService private readonly historyService: IHistoryService ) { super(id, label, 'debug-action restart', debugService, keybindingService, 70); this.setLabel(this.debugService.getViewModel().focusedSession); @@ -717,7 +717,7 @@ export class FocusReplAction extends Action { constructor(id: string, label: string, - @IPanelService private panelService: IPanelService + @IPanelService private readonly panelService: IPanelService ) { super(id, label); } @@ -735,7 +735,7 @@ export class FocusSessionAction extends AbstractDebugAction { constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @IEditorService private editorService: IEditorService + @IEditorService private readonly editorService: IEditorService ) { super(id, label, null, debugService, keybindingService, 100); } diff --git a/src/vs/workbench/parts/debug/browser/debugContentProvider.ts b/src/vs/workbench/parts/debug/browser/debugContentProvider.ts index e462340b76a..8e21de41975 100644 --- a/src/vs/workbench/parts/debug/browser/debugContentProvider.ts +++ b/src/vs/workbench/parts/debug/browser/debugContentProvider.ts @@ -39,10 +39,10 @@ export class DebugContentProvider implements IWorkbenchContribution, ITextModelC constructor( @ITextModelService textModelResolverService: ITextModelService, - @IDebugService private debugService: IDebugService, - @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService, - @IEditorWorkerService private editorWorkerService: IEditorWorkerService + @IDebugService private readonly debugService: IDebugService, + @IModelService private readonly modelService: IModelService, + @IModeService private readonly modeService: IModeService, + @IEditorWorkerService private readonly editorWorkerService: IEditorWorkerService ) { textModelResolverService.registerTextModelContentProvider(DEBUG_SCHEME, this); DebugContentProvider.INSTANCE = this; diff --git a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts index 9c55e1bcb8e..ca2475294da 100644 --- a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts +++ b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts @@ -38,8 +38,8 @@ export class DebugEditorModelManager implements IWorkbenchContribution { private ignoreDecorationsChangedEvent: boolean; constructor( - @IModelService private modelService: IModelService, - @IDebugService private debugService: IDebugService, + @IModelService private readonly modelService: IModelService, + @IDebugService private readonly debugService: IDebugService, ) { this.modelDataMap = new Map(); this.toDispose = []; diff --git a/src/vs/workbench/parts/debug/browser/debugQuickOpen.ts b/src/vs/workbench/parts/debug/browser/debugQuickOpen.ts index 0f6aa619a07..d32017e208e 100644 --- a/src/vs/workbench/parts/debug/browser/debugQuickOpen.ts +++ b/src/vs/workbench/parts/debug/browser/debugQuickOpen.ts @@ -80,10 +80,10 @@ export class DebugQuickOpenHandler extends Quickopen.QuickOpenHandler { private autoFocusIndex: number; constructor( - @IDebugService private debugService: IDebugService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @ICommandService private commandService: ICommandService, - @INotificationService private notificationService: INotificationService + @IDebugService private readonly debugService: IDebugService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @ICommandService private readonly commandService: ICommandService, + @INotificationService private readonly notificationService: INotificationService ) { super(); } diff --git a/src/vs/workbench/parts/debug/browser/debugStatus.ts b/src/vs/workbench/parts/debug/browser/debugStatus.ts index 4ada0c1e5f4..0a069f34415 100644 --- a/src/vs/workbench/parts/debug/browser/debugStatus.ts +++ b/src/vs/workbench/parts/debug/browser/debugStatus.ts @@ -24,8 +24,8 @@ export class DebugStatus extends Themable implements IStatusbarItem { private showInStatusBar: string; constructor( - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IDebugService private debugService: IDebugService, + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @IDebugService private readonly debugService: IDebugService, @IThemeService themeService: IThemeService, @IConfigurationService configurationService: IConfigurationService ) { diff --git a/src/vs/workbench/parts/debug/browser/debugToolbar.ts b/src/vs/workbench/parts/debug/browser/debugToolbar.ts index 8e2fe051416..98ae68a8914 100644 --- a/src/vs/workbench/parts/debug/browser/debugToolbar.ts +++ b/src/vs/workbench/parts/debug/browser/debugToolbar.ts @@ -58,16 +58,16 @@ export class DebugToolbar extends Themable implements IWorkbenchContribution { private isBuilt: boolean; constructor( - @INotificationService private notificationService: INotificationService, - @ITelemetryService private telemetryService: ITelemetryService, - @IDebugService private debugService: IDebugService, - @IPartService private partService: IPartService, - @IStorageService private storageService: IStorageService, - @IConfigurationService private configurationService: IConfigurationService, + @INotificationService private readonly notificationService: INotificationService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IDebugService private readonly debugService: IDebugService, + @IPartService private readonly partService: IPartService, + @IStorageService private readonly storageService: IStorageService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IThemeService themeService: IThemeService, - @IKeybindingService private keybindingService: IKeybindingService, + @IKeybindingService private readonly keybindingService: IKeybindingService, @IContextViewService contextViewService: IContextViewService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(themeService); diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index f97321a3da3..43d5daa5de7 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -39,8 +39,8 @@ export class DebugViewlet extends ViewContainerViewlet { constructor( @IPartService partService: IPartService, @ITelemetryService telemetryService: ITelemetryService, - @IProgressService private progressService: IProgressService, - @IDebugService private debugService: IDebugService, + @IProgressService private readonly progressService: IProgressService, + @IDebugService private readonly debugService: IDebugService, @IInstantiationService instantiationService: IInstantiationService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IStorageService storageService: IStorageService, @@ -48,8 +48,8 @@ export class DebugViewlet extends ViewContainerViewlet { @IContextMenuService contextMenuService: IContextMenuService, @IExtensionService extensionService: IExtensionService, @IConfigurationService configurationService: IConfigurationService, - @IKeybindingService private keybindingService: IKeybindingService, - @IContextViewService private contextViewService: IContextViewService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @IContextViewService private readonly contextViewService: IContextViewService, ) { super(VIEWLET_ID, `${VIEWLET_ID}.state`, false, configurationService, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); diff --git a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts index 5dc601d2784..07fe76310f3 100644 --- a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts @@ -28,7 +28,7 @@ export class ExceptionWidget extends ZoneWidget { constructor(editor: ICodeEditor, private exceptionInfo: IExceptionInfo, @IThemeService themeService: IThemeService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(editor, { showFrame: true, showArrow: true, frameWidth: 1, className: 'exception-widget-container' }); diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index a795c92dbc2..65a0a88e405 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -22,7 +22,7 @@ export class LinkDetector { ]; constructor( - @IEditorService private editorService: IEditorService + @IEditorService private readonly editorService: IEditorService ) { // noop } diff --git a/src/vs/workbench/parts/debug/browser/loadedScriptsView.ts b/src/vs/workbench/parts/debug/browser/loadedScriptsView.ts index 3c9ca928d17..3849c3c194c 100644 --- a/src/vs/workbench/parts/debug/browser/loadedScriptsView.ts +++ b/src/vs/workbench/parts/debug/browser/loadedScriptsView.ts @@ -373,15 +373,15 @@ export class LoadedScriptsView extends ViewletPanel { options: IViewletViewOptions, @IContextMenuService contextMenuService: IContextMenuService, @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IConfigurationService configurationService: IConfigurationService, - @IEditorService private editorService: IEditorService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IDebugService private debugService: IDebugService, - @IListService private listService: IListService, - @IThemeService private themeService: IThemeService + @IEditorService private readonly editorService: IEditorService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IDebugService private readonly debugService: IDebugService, + @IListService private readonly listService: IListService, + @IThemeService private readonly themeService: IThemeService ) { super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('loadedScriptsSection', "Loaded Scripts Section") }, keybindingService, contextMenuService, configurationService); this.loadedScriptsItemType = CONTEXT_LOADED_SCRIPTS_ITEM_TYPE.bindTo(contextKeyService); diff --git a/src/vs/workbench/parts/debug/browser/statusbarColorProvider.ts b/src/vs/workbench/parts/debug/browser/statusbarColorProvider.ts index afb16080fcd..f3cdc5b0192 100644 --- a/src/vs/workbench/parts/debug/browser/statusbarColorProvider.ts +++ b/src/vs/workbench/parts/debug/browser/statusbarColorProvider.ts @@ -38,9 +38,9 @@ export class StatusBarColorProvider extends Themable implements IWorkbenchContri constructor( @IThemeService themeService: IThemeService, - @IDebugService private debugService: IDebugService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IPartService private partService: IPartService + @IDebugService private readonly debugService: IDebugService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IPartService private readonly partService: IPartService ) { super(themeService); diff --git a/src/vs/workbench/parts/debug/electron-browser/breakpointWidget.ts b/src/vs/workbench/parts/debug/electron-browser/breakpointWidget.ts index a9a1f42be75..173de047a1a 100644 --- a/src/vs/workbench/parts/debug/electron-browser/breakpointWidget.ts +++ b/src/vs/workbench/parts/debug/electron-browser/breakpointWidget.ts @@ -56,13 +56,13 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakpointWi private breakpoint: IBreakpoint; constructor(editor: ICodeEditor, private lineNumber: number, private context: Context, - @IContextViewService private contextViewService: IContextViewService, - @IDebugService private debugService: IDebugService, - @IThemeService private themeService: IThemeService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IInstantiationService private instantiationService: IInstantiationService, - @IModelService private modelService: IModelService, - @ICodeEditorService private codeEditorService: ICodeEditorService, + @IContextViewService private readonly contextViewService: IContextViewService, + @IDebugService private readonly debugService: IDebugService, + @IThemeService private readonly themeService: IThemeService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IModelService private readonly modelService: IModelService, + @ICodeEditorService private readonly codeEditorService: ICodeEditorService, ) { super(editor, { showFrame: true, showArrow: false, frameWidth: 1 }); diff --git a/src/vs/workbench/parts/debug/electron-browser/callStackView.ts b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts index caf764b0f45..702e4fa5007 100644 --- a/src/vs/workbench/parts/debug/electron-browser/callStackView.ts +++ b/src/vs/workbench/parts/debug/electron-browser/callStackView.ts @@ -52,15 +52,15 @@ export class CallStackView extends ViewletPanel { constructor( private options: IViewletViewOptions, @IContextMenuService contextMenuService: IContextMenuService, - @IDebugService private debugService: IDebugService, + @IDebugService private readonly debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService, - @IEditorService private editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IEditorService private readonly editorService: IEditorService, @IConfigurationService configurationService: IConfigurationService, @IMenuService menuService: IMenuService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IThemeService private themeService: IThemeService, - @IListService private listService: IListService + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IThemeService private readonly themeService: IThemeService, + @IListService private readonly listService: IListService ) { super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService); this.callStackItemType = CONTEXT_CALLSTACK_ITEM_TYPE.bindTo(contextKeyService); @@ -419,7 +419,7 @@ class ThreadsRenderer implements ITreeRenderer { static readonly ID = 'stackFrame'; - constructor(@ILabelService private labelService: ILabelService) { } + constructor(@ILabelService private readonly labelService: ILabelService) { } get templateId(): string { return StackFramesRenderer.ID; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index 23f58ed1934..3f403d02f7c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -56,15 +56,15 @@ export class ConfigurationManager implements IConfigurationManager { private debugConfigurationTypeContext: IContextKey; constructor( - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IEditorService private editorService: IEditorService, - @IConfigurationService private configurationService: IConfigurationService, - @IQuickInputService private quickInputService: IQuickInputService, - @IInstantiationService private instantiationService: IInstantiationService, - @ICommandService private commandService: ICommandService, - @IStorageService private storageService: IStorageService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IEditorService private readonly editorService: IEditorService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ICommandService private readonly commandService: ICommandService, + @IStorageService private readonly storageService: IStorageService, @ILifecycleService lifecycleService: ILifecycleService, - @IExtensionService private extensionService: IExtensionService, + @IExtensionService private readonly extensionService: IExtensionService, @IContextKeyService contextKeyService: IContextKeyService ) { this.configProviders = []; @@ -469,7 +469,7 @@ class Launch implements ILaunch { constructor( private configurationManager: ConfigurationManager, public workspace: IWorkspaceFolder, - @IFileService private fileService: IFileService, + @IFileService private readonly fileService: IFileService, @IEditorService protected editorService: IEditorService, @IConfigurationService protected configurationService: IConfigurationService, @IWorkspaceContextService protected contextService: IWorkspaceContextService, @@ -622,7 +622,7 @@ class UserLaunch extends Launch implements ILaunch { @IFileService fileService: IFileService, @IEditorService editorService: IEditorService, @IConfigurationService configurationService: IConfigurationService, - @IPreferencesService private preferencesService: IPreferencesService, + @IPreferencesService private readonly preferencesService: IPreferencesService, @IWorkspaceContextService contextService: IWorkspaceContextService ) { super(configurationManager, undefined, fileService, editorService, configurationService, contextService); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 55005ac0aac..7290b663198 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -72,16 +72,16 @@ export class DebugEditorContribution implements IDebugEditorContribution { constructor( private editor: ICodeEditor, - @IDebugService private debugService: IDebugService, - @IContextMenuService private contextMenuService: IContextMenuService, - @IInstantiationService private instantiationService: IInstantiationService, + @IDebugService private readonly debugService: IDebugService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, - @ICommandService private commandService: ICommandService, - @ICodeEditorService private codeEditorService: ICodeEditorService, - @ITelemetryService private telemetryService: ITelemetryService, - @IConfigurationService private configurationService: IConfigurationService, - @IKeybindingService private keybindingService: IKeybindingService, - @IDialogService private dialogService: IDialogService, + @ICommandService private readonly commandService: ICommandService, + @ICodeEditorService private readonly codeEditorService: ICodeEditorService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @IDialogService private readonly dialogService: IDialogService, ) { this.breakpointHintDecoration = []; this.hoverWidget = this.instantiationService.createInstance(DebugHoverWidget, this.editor); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 012e1b11809..3cc5eabfdbe 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -58,13 +58,13 @@ export class DebugHoverWidget implements IContentWidget { constructor( private editor: ICodeEditor, - @IDebugService private debugService: IDebugService, - @IInstantiationService private instantiationService: IInstantiationService, - @IThemeService private themeService: IThemeService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IListService private listService: IListService, - @IConfigurationService private configurationService: IConfigurationService, - @IKeybindingService private keybindingService: IKeybindingService + @IDebugService private readonly debugService: IDebugService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IThemeService private readonly themeService: IThemeService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IListService private readonly listService: IListService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IKeybindingService private readonly keybindingService: IKeybindingService ) { this.toDispose = []; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 6f40a1d320c..cfebc210a02 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -90,25 +90,25 @@ export class DebugService implements IDebugService { private previousState: State; constructor( - @IStorageService private storageService: IStorageService, - @IEditorService private editorService: IEditorService, - @ITextFileService private textFileService: ITextFileService, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService, - @INotificationService private notificationService: INotificationService, - @IDialogService private dialogService: IDialogService, - @IPartService private partService: IPartService, - @IBroadcastService private broadcastService: IBroadcastService, - @ITelemetryService private telemetryService: ITelemetryService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IStorageService private readonly storageService: IStorageService, + @IEditorService private readonly editorService: IEditorService, + @ITextFileService private readonly textFileService: ITextFileService, + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService, + @INotificationService private readonly notificationService: INotificationService, + @IDialogService private readonly dialogService: IDialogService, + @IPartService private readonly partService: IPartService, + @IBroadcastService private readonly broadcastService: IBroadcastService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @IContextKeyService contextKeyService: IContextKeyService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IInstantiationService private instantiationService: IInstantiationService, - @IExtensionService private extensionService: IExtensionService, - @IMarkerService private markerService: IMarkerService, - @ITaskService private taskService: ITaskService, - @IFileService private fileService: IFileService, - @IConfigurationService private configurationService: IConfigurationService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IExtensionService private readonly extensionService: IExtensionService, + @IMarkerService private readonly markerService: IMarkerService, + @ITaskService private readonly taskService: ITaskService, + @IFileService private readonly fileService: IFileService, + @IConfigurationService private readonly configurationService: IConfigurationService, ) { this.toDispose = []; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugSession.ts b/src/vs/workbench/parts/debug/electron-browser/debugSession.ts index 6640b6ccb64..c5b7edff2d6 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugSession.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugSession.ts @@ -54,13 +54,13 @@ export class DebugSession implements IDebugSession { private _configuration: { resolved: IConfig, unresolved: IConfig }, public root: IWorkspaceFolder, private model: DebugModel, - @IDebugService private debugService: IDebugService, - @ITelemetryService private telemetryService: ITelemetryService, - @IOutputService private outputService: IOutputService, - @IWindowService private windowService: IWindowService, - @IConfigurationService private configurationService: IConfigurationService, - @IViewletService private viewletService: IViewletService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService + @IDebugService private readonly debugService: IDebugService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IOutputService private readonly outputService: IOutputService, + @IWindowService private readonly windowService: IWindowService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IViewletService private readonly viewletService: IViewletService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService ) { this.id = generateUuid(); this.repl = new ReplModel(this); diff --git a/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts b/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts index abb75fd58fa..fb7babcc56b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts +++ b/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts @@ -14,7 +14,7 @@ export class CopyValueAction extends Action { static readonly ID = 'workbench.debug.viewlet.action.copyValue'; static LABEL = nls.localize('copyValue', "Copy Value"); - constructor(id: string, label: string, private value: any, @IDebugService private debugService: IDebugService) { + constructor(id: string, label: string, private value: any, @IDebugService private readonly debugService: IDebugService) { super(id, label, 'debug-action copy-value'); this._enabled = typeof this.value === 'string' || (this.value instanceof Variable && !!this.value.evaluateName); } diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index 726551f3b95..47a2fab74b6 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -109,19 +109,19 @@ export class Repl extends Panel implements IPrivateReplService, IHistoryNavigati private replElementsChangeListener: IDisposable; constructor( - @IDebugService private debugService: IDebugService, + @IDebugService private readonly debugService: IDebugService, @ITelemetryService telemetryService: ITelemetryService, - @IInstantiationService private instantiationService: IInstantiationService, - @IStorageService private storageService: IStorageService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IStorageService private readonly storageService: IStorageService, @IThemeService protected themeService: IThemeService, - @IModelService private modelService: IModelService, - @IContextKeyService private contextKeyService: IContextKeyService, + @IModelService private readonly modelService: IModelService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, @ICodeEditorService codeEditorService: ICodeEditorService, - @IContextMenuService private contextMenuService: IContextMenuService, - @IListService private listService: IListService, - @IConfigurationService private configurationService: IConfigurationService, - @ITextResourcePropertiesService private textResourcePropertiesService: ITextResourcePropertiesService, - @IKeybindingService private keybindingService: IKeybindingService + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @IListService private readonly listService: IListService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @ITextResourcePropertiesService private readonly textResourcePropertiesService: ITextResourcePropertiesService, + @IKeybindingService private readonly keybindingService: IKeybindingService ) { super(REPL_ID, telemetryService, themeService, storageService); @@ -565,9 +565,9 @@ class ReplSimpleElementsRenderer implements ITreeRenderer = this._onExperimentEnabled.event; constructor( - @IStorageService private storageService: IStorageService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @ITextFileService private textFileService: ITextFileService, - @IEnvironmentService private environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IRequestService private requestService: IRequestService, - @IConfigurationService private configurationService: IConfigurationService + @IStorageService private readonly storageService: IStorageService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @ITextFileService private readonly textFileService: ITextFileService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IRequestService private readonly requestService: IRequestService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(); diff --git a/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.ts b/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.ts index 22f5b40819a..7ab0213525c 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.ts @@ -42,7 +42,7 @@ export class ExtensionsHandler extends QuickOpenHandler { public static readonly ID = 'workbench.picker.extensions'; - constructor(@IViewletService private viewletService: IViewletService) { + constructor(@IViewletService private readonly viewletService: IViewletService) { super(); } @@ -74,10 +74,10 @@ export class GalleryExtensionsHandler extends QuickOpenHandler { public static readonly ID = 'workbench.picker.gallery'; constructor( - @IViewletService private viewletService: IViewletService, - @IExtensionGalleryService private galleryService: IExtensionGalleryService, - @IExtensionManagementService private extensionsService: IExtensionManagementService, - @INotificationService private notificationService: INotificationService + @IViewletService private readonly viewletService: IViewletService, + @IExtensionGalleryService private readonly galleryService: IExtensionGalleryService, + @IExtensionManagementService private readonly extensionsService: IExtensionManagementService, + @INotificationService private readonly notificationService: INotificationService ) { super(); } diff --git a/src/vs/workbench/parts/extensions/browser/extensionsViewer.ts b/src/vs/workbench/parts/extensions/browser/extensionsViewer.ts index 27d82abbe09..55891efe29b 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsViewer.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsViewer.ts @@ -63,7 +63,7 @@ export class Renderer implements IRenderer { private static readonly EXTENSION_TEMPLATE_ID = 'extension-template'; private static readonly UNKNOWN_EXTENSION_TEMPLATE_ID = 'unknown-extension-template'; - constructor(@IInstantiationService private instantiationService: IInstantiationService) { + constructor(@IInstantiationService private readonly instantiationService: IInstantiationService) { } public getHeight(tree: ITree, element: IExtensionData): number { @@ -163,7 +163,7 @@ export class Renderer implements IRenderer { export class Controller extends WorkbenchTreeController { constructor( - @IExtensionsWorkbenchService private extensionsWorkdbenchService: IExtensionsWorkbenchService, + @IExtensionsWorkbenchService private readonly extensionsWorkdbenchService: IExtensionsWorkbenchService, @IConfigurationService configurationService: IConfigurationService ) { super({}, configurationService); @@ -201,7 +201,7 @@ class OpenExtensionAction extends Action { private _extensionData: IExtensionData; - constructor(@IExtensionsWorkbenchService private extensionsWorkdbenchService: IExtensionsWorkbenchService) { + constructor(@IExtensionsWorkbenchService private readonly extensionsWorkdbenchService: IExtensionsWorkbenchService) { super('extensions.action.openExtension', ''); } diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts index e4d5ba4a874..2c02e266815 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionEditor.ts @@ -192,7 +192,7 @@ export class ExtensionEditor extends BaseEditor { @IPartService private readonly partService: IPartService, @IExtensionTipsService private readonly extensionTipsService: IExtensionTipsService, @IStorageService storageService: IStorageService, - @IExtensionService private extensionService: IExtensionService + @IExtensionService private readonly extensionService: IExtensionService ) { super(ExtensionEditor.ID, telemetryService, themeService, storageService); this.disposables = []; diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index cf4e41a8960..12ad98c5f78 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -92,21 +92,21 @@ export class ExtensionTipsService extends Disposable implements IExtensionTipsSe constructor( @IExtensionGalleryService private readonly _galleryService: IExtensionGalleryService, @IModelService private readonly _modelService: IModelService, - @IStorageService private storageService: IStorageService, - @IExtensionManagementService private extensionsService: IExtensionManagementService, - @IInstantiationService private instantiationService: IInstantiationService, - @IFileService private fileService: IFileService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IConfigurationService private configurationService: IConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IExtensionService private extensionService: IExtensionService, - @IRequestService private requestService: IRequestService, - @IViewletService private viewletService: IViewletService, - @INotificationService private notificationService: INotificationService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @IExtensionsWorkbenchService private extensionWorkbenchService: IExtensionsWorkbenchService, - @IExperimentService private experimentService: IExperimentService, + @IStorageService private readonly storageService: IStorageService, + @IExtensionManagementService private readonly extensionsService: IExtensionManagementService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IFileService private readonly fileService: IFileService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IExtensionService private readonly extensionService: IExtensionService, + @IRequestService private readonly requestService: IRequestService, + @IViewletService private readonly viewletService: IViewletService, + @INotificationService private readonly notificationService: INotificationService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @IExtensionsWorkbenchService private readonly extensionWorkbenchService: IExtensionsWorkbenchService, + @IExperimentService private readonly experimentService: IExperimentService, ) { super(); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts index 22d810d995c..0a4a7dc91d2 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.ts @@ -139,10 +139,10 @@ export class InstallAction extends Action { set extension(extension: IExtension) { this._extension = extension; this.update(); } constructor( - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IInstantiationService private instantiationService: IInstantiationService, - @INotificationService private notificationService: INotificationService, - @IOpenerService private openerService: IOpenerService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @INotificationService private readonly notificationService: INotificationService, + @IOpenerService private readonly openerService: IOpenerService ) { super(`extensions.install`, InstallAction.INSTALL_LABEL, InstallAction.Class, false); @@ -217,7 +217,7 @@ export class UninstallAction extends Action { set extension(extension: IExtension) { this._extension = extension; this.update(); } constructor( - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService ) { super('extensions.uninstall', UninstallAction.UninstallLabel, UninstallAction.UninstallClass, false); @@ -368,10 +368,10 @@ export class UpdateAction extends Action { set extension(extension: IExtension) { this._extension = extension; this.update(); } constructor( - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IInstantiationService private instantiationService: IInstantiationService, - @INotificationService private notificationService: INotificationService, - @IOpenerService private openerService: IOpenerService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @INotificationService private readonly notificationService: INotificationService, + @IOpenerService private readonly openerService: IOpenerService ) { super(`extensions.update`, '', UpdateAction.DisabledClass, false); this.disposables.push(this.extensionsWorkbenchService.onChange(extension => this.update(extension))); @@ -510,7 +510,7 @@ export class DropDownMenuActionItem extends ExtensionActionItem { constructor(action: DropDownAction, tabOnlyOnFocus: boolean, - @IContextMenuService private contextMenuService: IContextMenuService + @IContextMenuService private readonly contextMenuService: IContextMenuService ) { super(null, action, { icon: true, label: true, tabOnlyOnFocus }); } @@ -559,7 +559,7 @@ export class ManageExtensionAction extends DropDownAction { constructor( @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService, @IInstantiationService instantiationService: IInstantiationService, - @IExtensionService private extensionService: IExtensionService + @IExtensionService private readonly extensionService: IExtensionService ) { super(ManageExtensionAction.ID, '', '', true, true, instantiationService); @@ -619,12 +619,12 @@ export class InstallAnotherVersionAction extends Action { static LABEL = localize('install another version', "Install Another Version..."); constructor(readonly extension: IExtension, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService, - @IQuickInputService private quickInputService: IQuickInputService, - @IInstantiationService private instantiationService: IInstantiationService, - @INotificationService private notificationService: INotificationService, - @IOpenerService private openerService: IOpenerService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @INotificationService private readonly notificationService: INotificationService, + @IOpenerService private readonly openerService: IOpenerService ) { super(InstallAnotherVersionAction.ID, InstallAnotherVersionAction.LABEL); this.enabled = this.extension && !!this.extension.gallery; @@ -740,8 +740,8 @@ export class EnableForWorkspaceAction extends Action implements IExtensionAction private disposables: IDisposable[] = []; constructor(readonly extension: IExtension, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService ) { super(EnableForWorkspaceAction.ID, EnableForWorkspaceAction.LABEL); this.disposables.push(extensionsWorkbenchService.onChange(e => this.update(e))); @@ -777,12 +777,12 @@ export class InstallInRemoteServerAction extends Action implements IExtensionAct constructor(readonly extension: IExtension, readonly runningExtensions: IExtensionDescription[], @IExtensionsWorkbenchService extensionWorkbenchService: IExtensionsWorkbenchService, - @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService, - @IConfigurationService private configurationService: IConfigurationService, - @IStorageService private storageService: IStorageService, - @ILabelService private labelService: ILabelService, - @IDialogService private dialogService: IDialogService, - @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IStorageService private readonly storageService: IStorageService, + @ILabelService private readonly labelService: ILabelService, + @IDialogService private readonly dialogService: IDialogService, + @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService ) { super(InstallInRemoteServerAction.ID, InstallInRemoteServerAction.LABEL); @@ -846,10 +846,10 @@ export class EnableGloballyAction extends Action implements IExtensionAction { private disposables: IDisposable[] = []; constructor(readonly extension: IExtension, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService, - @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService, - @IConfigurationService private configurationService: IConfigurationService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(EnableGloballyAction.ID, EnableGloballyAction.LABEL); this.disposables.push(extensionsWorkbenchService.onChange(e => this.update(e))); @@ -892,9 +892,9 @@ export class DisableForWorkspaceAction extends Action implements IExtensionActio private disposables: IDisposable[] = []; constructor(readonly extension: IExtension, readonly runningExtensions: IExtensionDescription[], - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService ) { super(DisableForWorkspaceAction.ID, DisableForWorkspaceAction.LABEL); this.disposables.push(extensionsWorkbenchService.onChange(e => this.update(e))); @@ -929,8 +929,8 @@ export class DisableGloballyAction extends Action implements IExtensionAction { private disposables: IDisposable[] = []; constructor(readonly extension: IExtension, readonly runningExtensions: IExtensionDescription[], - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService ) { super(DisableGloballyAction.ID, DisableGloballyAction.LABEL); this.disposables.push(extensionsWorkbenchService.onChange(e => this.update(e))); @@ -1044,9 +1044,9 @@ export class CheckForUpdatesAction extends Action { constructor( id = CheckForUpdatesAction.ID, label = CheckForUpdatesAction.LABEL, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IViewletService private viewletService: IViewletService, - @INotificationService private notificationService: INotificationService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IViewletService private readonly viewletService: IViewletService, + @INotificationService private readonly notificationService: INotificationService ) { super(id, label, '', true); } @@ -1095,7 +1095,7 @@ export class ToggleAutoUpdateAction extends Action { id: string, label: string, private autoUpdateValue: boolean, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label, '', true); this.updateEnablement(); @@ -1149,10 +1149,10 @@ export class UpdateAllAction extends Action { constructor( id = UpdateAllAction.ID, label = UpdateAllAction.LABEL, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @INotificationService private notificationService: INotificationService, - @IInstantiationService private instantiationService: IInstantiationService, - @IOpenerService private openerService: IOpenerService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @INotificationService private readonly notificationService: INotificationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IOpenerService private readonly openerService: IOpenerService ) { super(id, label, '', false); @@ -1203,12 +1203,12 @@ export class ReloadAction extends Action { private throttler: Throttler; constructor( - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IWindowService private windowService: IWindowService, - @IExtensionService private extensionService: IExtensionService, - @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService, - @IConfigurationService private configurationService: IConfigurationService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IWindowService private readonly windowService: IWindowService, + @IExtensionService private readonly extensionService: IExtensionService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super('extensions.reload', localize('reloadAction', "Reload"), ReloadAction.DisabledClass, false); this.throttler = new Throttler(); @@ -1340,7 +1340,7 @@ export class ShowEnabledExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); } @@ -1363,7 +1363,7 @@ export class ShowInstalledExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); } @@ -1386,7 +1386,7 @@ export class ShowDisabledExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, 'null', true); } @@ -1412,7 +1412,7 @@ export class ClearExtensionsInputAction extends Action { id: string, label: string, onSearchChange: Event, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, 'clear-extensions', true); this.enabled = false; @@ -1445,7 +1445,7 @@ export class ShowBuiltInExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); } @@ -1468,7 +1468,7 @@ export class ShowOutdatedExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); } @@ -1491,7 +1491,7 @@ export class ShowPopularExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); } @@ -1514,7 +1514,7 @@ export class ShowRecommendedExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); } @@ -1542,11 +1542,11 @@ export class InstallWorkspaceRecommendedExtensionsAction extends Action { id: string = InstallWorkspaceRecommendedExtensionsAction.ID, label: string = InstallWorkspaceRecommendedExtensionsAction.LABEL, recommendations: IExtensionRecommendation[], - @IViewletService private viewletService: IViewletService, - @INotificationService private notificationService: INotificationService, - @IInstantiationService private instantiationService: IInstantiationService, - @IOpenerService private openerService: IOpenerService, - @IExtensionsWorkbenchService private extensionWorkbenchService: IExtensionsWorkbenchService + @IViewletService private readonly viewletService: IViewletService, + @INotificationService private readonly notificationService: INotificationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IOpenerService private readonly openerService: IOpenerService, + @IExtensionsWorkbenchService private readonly extensionWorkbenchService: IExtensionsWorkbenchService ) { super(id, label, 'extension-action'); this.recommendations = recommendations; @@ -1585,11 +1585,11 @@ export class InstallRecommendedExtensionAction extends Action { constructor( extensionId: string, - @IViewletService private viewletService: IViewletService, - @INotificationService private notificationService: INotificationService, - @IInstantiationService private instantiationService: IInstantiationService, - @IOpenerService private openerService: IOpenerService, - @IExtensionsWorkbenchService private extensionWorkbenchService: IExtensionsWorkbenchService + @IViewletService private readonly viewletService: IViewletService, + @INotificationService private readonly notificationService: INotificationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IOpenerService private readonly openerService: IOpenerService, + @IExtensionsWorkbenchService private readonly extensionWorkbenchService: IExtensionsWorkbenchService ) { super(InstallRecommendedExtensionAction.ID, InstallRecommendedExtensionAction.LABEL, undefined, false); this.extensionId = extensionId; @@ -1627,7 +1627,7 @@ export class IgnoreExtensionRecommendationAction extends Action { extension: IExtension; constructor( - @IExtensionTipsService private extensionsTipsService: IExtensionTipsService, + @IExtensionTipsService private readonly extensionsTipsService: IExtensionTipsService, ) { super(IgnoreExtensionRecommendationAction.ID, 'Ignore Recommendation'); @@ -1657,7 +1657,7 @@ export class UndoIgnoreExtensionRecommendationAction extends Action { extension: IExtension; constructor( - @IExtensionTipsService private extensionsTipsService: IExtensionTipsService, + @IExtensionTipsService private readonly extensionsTipsService: IExtensionTipsService, ) { super(UndoIgnoreExtensionRecommendationAction.ID, 'Undo'); @@ -1686,7 +1686,7 @@ export class ShowRecommendedKeymapExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); } @@ -1709,7 +1709,7 @@ export class ShowLanguageExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); } @@ -1732,7 +1732,7 @@ export class ShowAzureExtensionsAction extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); } @@ -1757,7 +1757,7 @@ export class ChangeSortAction extends Action { label: string, onSearchChange: Event, private sortBy: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); @@ -1796,7 +1796,7 @@ export class ChangeGroupAction extends Action { label: string, onSearchChange: Event, private groupBy: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label, undefined, true); @@ -1942,10 +1942,10 @@ export abstract class AbstractConfigureRecommendedExtensionsAction extends Actio id: string, label: string, @IWorkspaceContextService protected contextService: IWorkspaceContextService, - @IFileService private fileService: IFileService, + @IFileService private readonly fileService: IFileService, @IEditorService protected editorService: IEditorService, - @IJSONEditingService private jsonEditingService: IJSONEditingService, - @ITextModelService private textModelResolverService: ITextModelService + @IJSONEditingService private readonly jsonEditingService: IJSONEditingService, + @ITextModelService private readonly textModelResolverService: ITextModelService ) { super(id, label); } @@ -2154,7 +2154,7 @@ export class ConfigureWorkspaceFolderRecommendedExtensionsAction extends Abstrac @IEditorService editorService: IEditorService, @IJSONEditingService jsonEditingService: IJSONEditingService, @ITextModelService textModelResolverService: ITextModelService, - @ICommandService private commandService: ICommandService + @ICommandService private readonly commandService: ICommandService ) { super(id, label, contextService, fileService, editorService, jsonEditingService, textModelResolverService); this.contextService.onDidChangeWorkspaceFolders(() => this.update(), this, this.disposables); @@ -2199,8 +2199,8 @@ export class AddToWorkspaceFolderRecommendationsAction extends AbstractConfigure @IEditorService editorService: IEditorService, @IJSONEditingService jsonEditingService: IJSONEditingService, @ITextModelService textModelResolverService: ITextModelService, - @ICommandService private commandService: ICommandService, - @INotificationService private notificationService: INotificationService + @ICommandService private readonly commandService: ICommandService, + @INotificationService private readonly notificationService: INotificationService ) { super(id, label, contextService, fileService, editorService, jsonEditingService, textModelResolverService); } @@ -2282,7 +2282,7 @@ export class AddToWorkspaceRecommendationsAction extends AbstractConfigureRecomm @IEditorService editorService: IEditorService, @IJSONEditingService jsonEditingService: IJSONEditingService, @ITextModelService textModelResolverService: ITextModelService, - @INotificationService private notificationService: INotificationService + @INotificationService private readonly notificationService: INotificationService ) { super(id, label, contextService, fileService, editorService, jsonEditingService, textModelResolverService); } @@ -2376,10 +2376,10 @@ export class DisabledStatusLabelAction extends Action { constructor( private runningExtensions: IExtensionDescription[], - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService, - @IConfigurationService private configurationService: IConfigurationService, - @ILabelService private labelService: ILabelService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @ILabelService private readonly labelService: ILabelService ) { super('extensions.install', localize('disabled', "Disabled"), `${DisabledStatusLabelAction.Class} hide`, false); this.disposables.push(this.extensionsWorkbenchService.onChange((extension) => this.update(extension))); @@ -2421,8 +2421,8 @@ export class DisableAllAction extends Action { constructor( id: string = DisableAllAction.ID, label: string = DisableAllAction.LABEL, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService ) { super(id, label); this.update(); @@ -2452,8 +2452,8 @@ export class DisableAllWorkpsaceAction extends Action { constructor( id: string = DisableAllWorkpsaceAction.ID, label: string = DisableAllWorkpsaceAction.LABEL, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService ) { super(id, label); this.update(); @@ -2484,8 +2484,8 @@ export class EnableAllAction extends Action { constructor( id: string = EnableAllAction.ID, label: string = EnableAllAction.LABEL, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService ) { super(id, label); this.update(); @@ -2515,9 +2515,9 @@ export class EnableAllWorkpsaceAction extends Action { constructor( id: string = EnableAllWorkpsaceAction.ID, label: string = EnableAllWorkpsaceAction.LABEL, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService ) { super(id, label); this.update(); @@ -2547,9 +2547,9 @@ export class OpenExtensionsFolderAction extends Action { constructor( id: string, label: string, - @IWindowsService private windowsService: IWindowsService, - @IFileService private fileService: IFileService, - @IEnvironmentService private environmentService: IEnvironmentService + @IWindowsService private readonly windowsService: IWindowsService, + @IFileService private readonly fileService: IFileService, + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { super(id, label, undefined, true); } @@ -2578,9 +2578,9 @@ export class InstallVSIXAction extends Action { constructor( id = InstallVSIXAction.ID, label = InstallVSIXAction.LABEL, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @INotificationService private notificationService: INotificationService, - @IWindowService private windowService: IWindowService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @INotificationService private readonly notificationService: INotificationService, + @IWindowService private readonly windowService: IWindowService ) { super(id, label, 'extension-action install-vsix', true); } @@ -2618,11 +2618,11 @@ export class ReinstallAction extends Action { constructor( id: string = ReinstallAction.ID, label: string = ReinstallAction.LABEL, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IQuickInputService private quickInputService: IQuickInputService, - @INotificationService private notificationService: INotificationService, - @IWindowService private windowService: IWindowService, - @IViewletService private viewletService: IViewletService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @INotificationService private readonly notificationService: INotificationService, + @IWindowService private readonly windowService: IWindowService, + @IViewletService private readonly viewletService: IViewletService ) { super(id, label); } @@ -2680,12 +2680,12 @@ export class InstallSpecificVersionOfExtensionAction extends Action { constructor( id: string = InstallSpecificVersionOfExtensionAction.ID, label: string = InstallSpecificVersionOfExtensionAction.LABEL, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService, - @IQuickInputService private quickInputService: IQuickInputService, - @INotificationService private notificationService: INotificationService, - @IWindowService private windowService: IWindowService, - @IViewletService private viewletService: IViewletService + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @INotificationService private readonly notificationService: INotificationService, + @IWindowService private readonly windowService: IWindowService, + @IViewletService private readonly viewletService: IViewletService ) { super(id, label); } diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsAutoProfiler.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsAutoProfiler.ts index 3fc50a54fd1..ba99bca686c 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsAutoProfiler.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsAutoProfiler.ts @@ -28,7 +28,7 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont private readonly _blame = new Set(); constructor( - @IExtensionService private _extensionService: IExtensionService, + @IExtensionService private readonly _extensionService: IExtensionService, @IExtensionHostProfileService private readonly _extensionProfileService: IExtensionHostProfileService, @IExtensionsWorkbenchService private readonly _anotherExtensionService: IExtensionsWorkbenchService, @ITelemetryService private readonly _telemetryService: ITelemetryService, diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsList.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsList.ts index 2d566e09e56..25da386997c 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsList.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsList.ts @@ -53,13 +53,13 @@ export class Renderer implements IPagedRenderer { constructor( private extensionViewState: IExtensionsViewState, - @IInstantiationService private instantiationService: IInstantiationService, - @INotificationService private notificationService: INotificationService, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, - @IExtensionService private extensionService: IExtensionService, - @IExtensionTipsService private extensionTipsService: IExtensionTipsService, - @IThemeService private themeService: IThemeService, - @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @INotificationService private readonly notificationService: INotificationService, + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, + @IExtensionService private readonly extensionService: IExtensionService, + @IExtensionTipsService private readonly extensionTipsService: IExtensionTipsService, + @IThemeService private readonly themeService: IThemeService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService ) { } get templateId() { return 'extension'; } diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts index 42134b1127a..2f0dfa6915e 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts @@ -29,12 +29,12 @@ export class KeymapExtensions implements IWorkbenchContribution { private disposables: IDisposable[] = []; constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService, - @IExtensionTipsService private tipsService: IExtensionTipsService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, + @IExtensionTipsService private readonly tipsService: IExtensionTipsService, @ILifecycleService lifecycleService: ILifecycleService, - @INotificationService private notificationService: INotificationService, - @ITelemetryService private telemetryService: ITelemetryService, + @INotificationService private readonly notificationService: INotificationService, + @ITelemetryService private readonly telemetryService: ITelemetryService, ) { this.disposables.push( lifecycleService.onShutdown(() => this.dispose()), diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index b3a1149b902..0b7e42e4907 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -84,7 +84,7 @@ const viewIdNameMappings: { [id: string]: string } = { export class ExtensionsViewletViewsContribution implements IWorkbenchContribution { constructor( - @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService ) { this.registerViews(); } @@ -295,12 +295,12 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio constructor( @IPartService partService: IPartService, @ITelemetryService telemetryService: ITelemetryService, - @IProgressService2 private progressService: IProgressService2, + @IProgressService2 private readonly progressService: IProgressService2, @IInstantiationService instantiationService: IInstantiationService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @INotificationService private notificationService: INotificationService, - @IViewletService private viewletService: IViewletService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @INotificationService private readonly notificationService: INotificationService, + @IViewletService private readonly viewletService: IViewletService, @IThemeService themeService: IThemeService, @IConfigurationService configurationService: IConfigurationService, @IStorageService storageService: IStorageService, @@ -308,7 +308,7 @@ export class ExtensionsViewlet extends ViewContainerViewlet implements IExtensio @IContextKeyService contextKeyService: IContextKeyService, @IContextMenuService contextMenuService: IContextMenuService, @IExtensionService extensionService: IExtensionService, - @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService ) { super(VIEWLET_ID, `${VIEWLET_ID}.state`, true, configurationService, partService, telemetryService, storageService, instantiationService, themeService, contextMenuService, extensionService, contextService); @@ -578,8 +578,8 @@ export class StatusUpdater implements IWorkbenchContribution { private badgeHandle: IDisposable; constructor( - @IActivityService private activityService: IActivityService, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService + @IActivityService private readonly activityService: IActivityService, + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService ) { extensionsWorkbenchService.onChange(this.onServiceChange, this, this.disposables); } @@ -611,11 +611,11 @@ export class MaliciousExtensionChecker implements IWorkbenchContribution { private disposables: IDisposable[]; constructor( - @IExtensionManagementService private extensionsManagementService: IExtensionManagementService, - @IWindowService private windowService: IWindowService, - @ILogService private logService: ILogService, - @INotificationService private notificationService: INotificationService, - @IEnvironmentService private environmentService: IEnvironmentService + @IExtensionManagementService private readonly extensionsManagementService: IExtensionManagementService, + @IWindowService private readonly windowService: IWindowService, + @ILogService private readonly logService: ILogService, + @INotificationService private readonly notificationService: INotificationService, + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { if (!this.environmentService.disableExtensions) { this.loopCheckForMaliciousExtensions(); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts index d8930a0fd91..4caf4f4da0e 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts @@ -74,16 +74,16 @@ export class ExtensionsListView extends ViewletPanel { @IKeybindingService keybindingService: IKeybindingService, @IContextMenuService contextMenuService: IContextMenuService, @IInstantiationService protected instantiationService: IInstantiationService, - @IThemeService private themeService: IThemeService, - @IExtensionService private extensionService: IExtensionService, + @IThemeService private readonly themeService: IThemeService, + @IExtensionService private readonly extensionService: IExtensionService, @IExtensionsWorkbenchService protected extensionsWorkbenchService: IExtensionsWorkbenchService, - @IEditorService private editorService: IEditorService, + @IEditorService private readonly editorService: IEditorService, @IExtensionTipsService protected tipsService: IExtensionTipsService, - @IModeService private modeService: IModeService, - @ITelemetryService private telemetryService: ITelemetryService, + @IModeService private readonly modeService: IModeService, + @ITelemetryService private readonly telemetryService: ITelemetryService, @IConfigurationService configurationService: IConfigurationService, @IWorkspaceContextService protected contextService: IWorkspaceContextService, - @IExperimentService private experimentService: IExperimentService + @IExperimentService private readonly experimentService: IExperimentService ) { super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: options.title }, keybindingService, contextMenuService, configurationService); } diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts index b56c8f7da9c..0c533a55045 100644 --- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts @@ -377,21 +377,21 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService, private _extensionAllowedBadgeProviders: string[]; constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @IEditorService private editorService: IEditorService, - @IExtensionManagementService private extensionService: IExtensionManagementService, - @IExtensionGalleryService private galleryService: IExtensionGalleryService, - @IConfigurationService private configurationService: IConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService, - @INotificationService private notificationService: INotificationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IEditorService private readonly editorService: IEditorService, + @IExtensionManagementService private readonly extensionService: IExtensionManagementService, + @IExtensionGalleryService private readonly galleryService: IExtensionGalleryService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @INotificationService private readonly notificationService: INotificationService, @IURLService urlService: IURLService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService, - @IWindowService private windowService: IWindowService, - @ILogService private logService: ILogService, - @IProgressService2 private progressService: IProgressService2, - @IExtensionService private runtimeExtensionService: IExtensionService, - @IExtensionManagementServerService private extensionManagementServerService: IExtensionManagementServerService, - @IStorageService private storageService: IStorageService + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, + @IWindowService private readonly windowService: IWindowService, + @ILogService private readonly logService: ILogService, + @IProgressService2 private readonly progressService: IProgressService2, + @IExtensionService private readonly runtimeExtensionService: IExtensionService, + @IExtensionManagementServerService private readonly extensionManagementServerService: IExtensionManagementServerService, + @IStorageService private readonly storageService: IStorageService ) { this.stateProvider = ext => this.getExtensionState(ext); diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts index 1c0d70f0874..405ea26a556 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts @@ -62,11 +62,11 @@ export class FeedbackDropdown extends Dropdown { constructor( container: HTMLElement, private options: IFeedbackDropdownOptions, - @ICommandService private commandService: ICommandService, - @ITelemetryService private telemetryService: ITelemetryService, - @IIntegrityService private integrityService: IIntegrityService, - @IThemeService private themeService: IThemeService, - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService + @ICommandService private readonly commandService: ICommandService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IIntegrityService private readonly integrityService: IIntegrityService, + @IThemeService private readonly themeService: IThemeService, + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService ) { super(container, { contextViewProvider: options.contextViewProvider, diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts b/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts index 0c063708507..2b126ff033c 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts @@ -58,11 +58,11 @@ export class FeedbackStatusbarItem extends Themable implements IStatusbarItem { private hideAction: HideAction; constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @IContextViewService private contextViewService: IContextViewService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IContextMenuService private contextMenuService: IContextMenuService, - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IContextViewService private readonly contextViewService: IContextViewService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService, @IThemeService themeService: IThemeService ) { super(themeService); @@ -155,7 +155,7 @@ export class FeedbackStatusbarItem extends Themable implements IStatusbarItem { class HideAction extends Action { constructor( - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService ) { super('feedback.hide', localize('hide', "Hide")); } diff --git a/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.ts b/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.ts index 737c31585b6..bb43de19df7 100644 --- a/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.ts +++ b/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.ts @@ -27,8 +27,8 @@ export class BinaryFileEditor extends BaseBinaryResourceEditor { @ITelemetryService telemetryService: ITelemetryService, @IThemeService themeService: IThemeService, @IFileService fileService: IFileService, - @IWindowsService private windowsService: IWindowsService, - @IEditorService private editorService: IEditorService, + @IWindowsService private readonly windowsService: IWindowsService, + @IEditorService private readonly editorService: IEditorService, @IStorageService storageService: IStorageService ) { super( diff --git a/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts b/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts index daab84d2b77..3bcdf9b9fdc 100644 --- a/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts +++ b/src/vs/workbench/parts/files/browser/editors/fileEditorTracker.ts @@ -36,15 +36,15 @@ export class FileEditorTracker extends Disposable implements IWorkbenchContribut private activeOutOfWorkspaceWatchers: ResourceMap; constructor( - @IEditorService private editorService: IEditorService, - @ITextFileService private textFileService: ITextFileService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IFileService private fileService: IFileService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IConfigurationService private configurationService: IConfigurationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IWindowService private windowService: IWindowService + @IEditorService private readonly editorService: IEditorService, + @ITextFileService private readonly textFileService: ITextFileService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @IFileService private readonly fileService: IFileService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IWindowService private readonly windowService: IWindowService ) { super(); diff --git a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts index c700404bd39..6685a076486 100644 --- a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts +++ b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts @@ -42,18 +42,18 @@ export class TextFileEditor extends BaseTextEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, - @IFileService private fileService: IFileService, - @IViewletService private viewletService: IViewletService, + @IFileService private readonly fileService: IFileService, + @IViewletService private readonly viewletService: IViewletService, @IInstantiationService instantiationService: IInstantiationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @IStorageService storageService: IStorageService, @ITextResourceConfigurationService configurationService: ITextResourceConfigurationService, @IEditorService editorService: IEditorService, @IThemeService themeService: IThemeService, @IEditorGroupsService editorGroupService: IEditorGroupsService, @ITextFileService textFileService: ITextFileService, - @IWindowsService private windowsService: IWindowsService, - @IPreferencesService private preferencesService: IPreferencesService, + @IWindowsService private readonly windowsService: IWindowsService, + @IPreferencesService private readonly preferencesService: IPreferencesService, @IWindowService windowService: IWindowService ) { super(TextFileEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorService, editorGroupService, windowService); diff --git a/src/vs/workbench/parts/files/common/dirtyFilesTracker.ts b/src/vs/workbench/parts/files/common/dirtyFilesTracker.ts index 32db20982c2..4ab6e130c6a 100644 --- a/src/vs/workbench/parts/files/common/dirtyFilesTracker.ts +++ b/src/vs/workbench/parts/files/common/dirtyFilesTracker.ts @@ -23,12 +23,12 @@ export class DirtyFilesTracker extends Disposable implements IWorkbenchContribut private badgeHandle: IDisposable; constructor( - @ITextFileService private textFileService: ITextFileService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IEditorService private editorService: IEditorService, - @IActivityService private activityService: IActivityService, - @IWindowService private windowService: IWindowService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService + @ITextFileService private readonly textFileService: ITextFileService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IEditorService private readonly editorService: IEditorService, + @IActivityService private readonly activityService: IActivityService, + @IWindowService private readonly windowService: IWindowService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService ) { super(); diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts index 0d8adaccef1..660e206385d 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts @@ -37,11 +37,11 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { constructor( private resource: URI, preferredEncoding: string, - @IInstantiationService private instantiationService: IInstantiationService, - @ITextFileService private textFileService: ITextFileService, - @ITextModelService private textModelResolverService: ITextModelService, - @IHashService private hashService: IHashService, - @ILabelService private labelService: ILabelService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ITextFileService private readonly textFileService: ITextFileService, + @ITextModelService private readonly textModelResolverService: ITextModelService, + @IHashService private readonly hashService: IHashService, + @ILabelService private readonly labelService: ILabelService ) { super(); diff --git a/src/vs/workbench/parts/files/common/explorerModel.ts b/src/vs/workbench/parts/files/common/explorerModel.ts index efc03521ff7..8bddd00c946 100644 --- a/src/vs/workbench/parts/files/common/explorerModel.ts +++ b/src/vs/workbench/parts/files/common/explorerModel.ts @@ -22,7 +22,7 @@ export class Model { private _roots: ExplorerItem[]; private _listener: IDisposable; - constructor(@IWorkspaceContextService private contextService: IWorkspaceContextService) { + constructor(@IWorkspaceContextService private readonly contextService: IWorkspaceContextService) { const setRoots = () => this._roots = this.contextService.getWorkspace().folders .map(folder => new ExplorerItem(folder.uri, undefined, false, false, true, folder.name)); this._listener = this.contextService.onDidChangeWorkspaceFolders(() => setRoots()); diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index 3a145b8b474..f82f13bf802 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -147,10 +147,10 @@ export class FileOnDiskContentProvider implements ITextModelContentProvider { private fileWatcher: IDisposable; constructor( - @ITextFileService private textFileService: ITextFileService, - @IFileService private fileService: IFileService, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService + @ITextFileService private readonly textFileService: ITextFileService, + @IFileService private readonly fileService: IFileService, + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService ) { } diff --git a/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts b/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts index c7f73dc9eab..c35edcbf9ff 100644 --- a/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/electron-browser/explorerViewlet.ts @@ -41,8 +41,8 @@ export class ExplorerViewletViewsContribution extends Disposable implements IWor private openEditorsVisibleContextKey: IContextKey; constructor( - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IConfigurationService private configurationService: IConfigurationService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IContextKeyService contextKeyService: IContextKeyService ) { super(); @@ -158,8 +158,8 @@ export class ExplorerViewlet extends ViewContainerViewlet implements IExplorerVi @ITelemetryService telemetryService: ITelemetryService, @IWorkspaceContextService protected contextService: IWorkspaceContextService, @IStorageService protected storageService: IStorageService, - @IEditorService private editorService: IEditorService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, + @IEditorService private readonly editorService: IEditorService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, @IConfigurationService configurationService: IConfigurationService, @IInstantiationService protected instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, diff --git a/src/vs/workbench/parts/files/electron-browser/fileActions.ts b/src/vs/workbench/parts/files/electron-browser/fileActions.ts index 2827d61714d..d0cab444558 100644 --- a/src/vs/workbench/parts/files/electron-browser/fileActions.ts +++ b/src/vs/workbench/parts/files/electron-browser/fileActions.ts @@ -451,7 +451,7 @@ export class GlobalNewUntitledFileAction extends Action { constructor( id: string, label: string, - @IEditorService private editorService: IEditorService + @IEditorService private readonly editorService: IEditorService ) { super(id, label); } @@ -482,7 +482,7 @@ class CreateFileAction extends BaseCreateAction { constructor( element: ExplorerItem, @IFileService fileService: IFileService, - @IEditorService private editorService: IEditorService, + @IEditorService private readonly editorService: IEditorService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { @@ -538,9 +538,9 @@ class BaseDeleteFileAction extends BaseFileAction { private useTrash: boolean, @IFileService fileService: IFileService, @INotificationService notificationService: INotificationService, - @IDialogService private dialogService: IDialogService, + @IDialogService private readonly dialogService: IDialogService, @ITextFileService textFileService: ITextFileService, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private readonly configurationService: IConfigurationService ) { super('moveFileToTrash', MOVE_FILE_TO_TRASH_LABEL, fileService, notificationService, textFileService); @@ -764,8 +764,8 @@ export class AddFilesAction extends BaseFileAction { element: ExplorerItem, clazz: string, @IFileService fileService: IFileService, - @IEditorService private editorService: IEditorService, - @IDialogService private dialogService: IDialogService, + @IEditorService private readonly editorService: IEditorService, + @IDialogService private readonly dialogService: IDialogService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { @@ -882,7 +882,7 @@ class CopyFileAction extends BaseFileAction { @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService, @IContextKeyService contextKeyService: IContextKeyService, - @IClipboardService private clipboardService: IClipboardService + @IClipboardService private readonly clipboardService: IClipboardService ) { super('filesExplorer.copy', COPY_FILE_LABEL, fileService, notificationService, textFileService); @@ -919,7 +919,7 @@ class PasteFileAction extends BaseFileAction { @IFileService fileService: IFileService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService, - @IEditorService private editorService: IEditorService + @IEditorService private readonly editorService: IEditorService ) { super(PasteFileAction.ID, PASTE_FILE_LABEL, fileService, notificationService, textFileService); @@ -982,7 +982,7 @@ export class DuplicateFileAction extends BaseFileAction { fileToDuplicate: ExplorerItem, target: ExplorerItem, @IFileService fileService: IFileService, - @IEditorService private editorService: IEditorService, + @IEditorService private readonly editorService: IEditorService, @INotificationService notificationService: INotificationService, @ITextFileService textFileService: ITextFileService ) { @@ -1106,9 +1106,9 @@ export class GlobalCompareResourcesAction extends Action { constructor( id: string, label: string, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IEditorService private editorService: IEditorService, - @INotificationService private notificationService: INotificationService, + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @IEditorService private readonly editorService: IEditorService, + @INotificationService private readonly notificationService: INotificationService, ) { super(id, label); } @@ -1165,7 +1165,7 @@ export class ToggleAutoSaveAction extends Action { constructor( id: string, label: string, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label); } @@ -1195,8 +1195,8 @@ export abstract class BaseSaveAllAction extends BaseErrorReportingAction { constructor( id: string, label: string, - @ITextFileService private textFileService: ITextFileService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, + @ITextFileService private readonly textFileService: ITextFileService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, @ICommandService protected commandService: ICommandService, @INotificationService notificationService: INotificationService, ) { @@ -1287,7 +1287,7 @@ export class CloseGroupAction extends Action { public static readonly ID = 'workbench.files.action.closeGroup'; public static readonly LABEL = nls.localize('closeGroup', "Close Group"); - constructor(id: string, label: string, @ICommandService private commandService: ICommandService) { + constructor(id: string, label: string, @ICommandService private readonly commandService: ICommandService) { super(id, label, 'action-close-all-files'); } @@ -1304,7 +1304,7 @@ export class FocusFilesExplorer extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label); } @@ -1328,9 +1328,9 @@ export class ShowActiveFileInExplorer extends Action { constructor( id: string, label: string, - @IEditorService private editorService: IEditorService, - @INotificationService private notificationService: INotificationService, - @ICommandService private commandService: ICommandService + @IEditorService private readonly editorService: IEditorService, + @INotificationService private readonly notificationService: INotificationService, + @ICommandService private readonly commandService: ICommandService ) { super(id, label); } @@ -1355,7 +1355,7 @@ export class CollapseExplorerView extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label); } @@ -1383,7 +1383,7 @@ export class RefreshExplorerView extends Action { constructor( id: string, label: string, - @IViewletService private viewletService: IViewletService + @IViewletService private readonly viewletService: IViewletService ) { super(id, label); } @@ -1406,9 +1406,9 @@ export class ShowOpenedFileInNewWindow extends Action { constructor( id: string, label: string, - @IEditorService private editorService: IEditorService, - @IWindowService private windowService: IWindowService, - @INotificationService private notificationService: INotificationService + @IEditorService private readonly editorService: IEditorService, + @IWindowService private readonly windowService: IWindowService, + @INotificationService private readonly notificationService: INotificationService ) { super(id, label); } @@ -1500,10 +1500,10 @@ export class CompareWithClipboardAction extends Action { constructor( id: string, label: string, - @IEditorService private editorService: IEditorService, - @IInstantiationService private instantiationService: IInstantiationService, - @ITextModelService private textModelService: ITextModelService, - @IFileService private fileService: IFileService + @IEditorService private readonly editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ITextModelService private readonly textModelService: ITextModelService, + @IFileService private readonly fileService: IFileService ) { super(id, label); @@ -1540,9 +1540,9 @@ export class CompareWithClipboardAction extends Action { class ClipboardContentProvider implements ITextModelContentProvider { constructor( - @IClipboardService private clipboardService: IClipboardService, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService + @IClipboardService private readonly clipboardService: IClipboardService, + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService ) { } provideTextContent(resource: URI): Promise { diff --git a/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts b/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts index 4593b4babae..896fe0e9717 100644 --- a/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts +++ b/src/vs/workbench/parts/files/electron-browser/saveErrorHandler.ts @@ -47,13 +47,13 @@ export class SaveErrorHandler extends Disposable implements ISaveErrorHandler, I private activeConflictResolutionResource: URI; constructor( - @INotificationService private notificationService: INotificationService, - @ITextFileService private textFileService: ITextFileService, + @INotificationService private readonly notificationService: INotificationService, + @ITextFileService private readonly textFileService: ITextFileService, @IContextKeyService contextKeyService: IContextKeyService, - @IEditorService private editorService: IEditorService, + @IEditorService private readonly editorService: IEditorService, @ITextModelService textModelService: ITextModelService, - @IInstantiationService private instantiationService: IInstantiationService, - @IStorageService private storageService: IStorageService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IStorageService private readonly storageService: IStorageService ) { super(); @@ -193,7 +193,7 @@ function clearPendingResolveSaveConflictMessages(): void { class ResolveConflictLearnMoreAction extends Action { constructor( - @IOpenerService private openerService: IOpenerService + @IOpenerService private readonly openerService: IOpenerService ) { super('workbench.files.action.resolveConflictLearnMore', nls.localize('learnMore', "Learn More")); } @@ -206,7 +206,7 @@ class ResolveConflictLearnMoreAction extends Action { class DoNotShowResolveConflictLearnMoreAction extends Action { constructor( - @IStorageService private storageService: IStorageService + @IStorageService private readonly storageService: IStorageService ) { super('workbench.files.action.resolveConflictLearnMoreDoNotShowAgain', nls.localize('dontShowAgain', "Don't Show Again")); } @@ -225,11 +225,11 @@ class ResolveSaveConflictAction extends Action { constructor( private model: ITextFileEditorModel, - @IEditorService private editorService: IEditorService, - @INotificationService private notificationService: INotificationService, - @IInstantiationService private instantiationService: IInstantiationService, - @IStorageService private storageService: IStorageService, - @IEnvironmentService private environmentService: IEnvironmentService + @IEditorService private readonly editorService: IEditorService, + @INotificationService private readonly notificationService: INotificationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IStorageService private readonly storageService: IStorageService, + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { super('workbench.files.action.resolveConflict', nls.localize('compareChanges', "Compare")); } diff --git a/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts b/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts index bec073bda21..40315768e67 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/emptyView.ts @@ -34,11 +34,11 @@ export class EmptyView extends ViewletPanel { constructor( options: IViewletViewOptions, - @IThemeService private themeService: IThemeService, - @IInstantiationService private instantiationService: IInstantiationService, + @IThemeService private readonly themeService: IThemeService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IKeybindingService keybindingService: IKeybindingService, @IContextMenuService contextMenuService: IContextMenuService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, @IConfigurationService configurationService: IConfigurationService ) { super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService); diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts index 52c32ca641e..aa5a6f305a4 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts @@ -84,19 +84,19 @@ export class ExplorerView extends TreeViewsViewletPanel implements IExplorerView constructor( options: IExplorerViewOptions, - @INotificationService private notificationService: INotificationService, + @INotificationService private readonly notificationService: INotificationService, @IContextMenuService contextMenuService: IContextMenuService, - @IInstantiationService private instantiationService: IInstantiationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IProgressService private progressService: IProgressService, - @IEditorService private editorService: IEditorService, - @IFileService private fileService: IFileService, - @IPartService private partService: IPartService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IProgressService private readonly progressService: IProgressService, + @IEditorService private readonly editorService: IEditorService, + @IFileService private readonly fileService: IFileService, + @IPartService private readonly partService: IPartService, @IKeybindingService keybindingService: IKeybindingService, @IContextKeyService contextKeyService: IContextKeyService, @IConfigurationService configurationService: IConfigurationService, @IDecorationsService decorationService: IDecorationsService, - @ILabelService private labelService: ILabelService + @ILabelService private readonly labelService: ILabelService ) { super({ ...(options as IViewletPanelOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService); diff --git a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts index c1f0f4e3011..fd6eb80e7e6 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/explorerViewer.ts @@ -57,10 +57,10 @@ import { fillInContextMenuActions } from 'vs/platform/actions/browser/menuItemAc export class FileDataSource implements IDataSource { constructor( - @IProgressService private progressService: IProgressService, - @INotificationService private notificationService: INotificationService, - @IFileService private fileService: IFileService, - @IPartService private partService: IPartService + @IProgressService private readonly progressService: IProgressService, + @INotificationService private readonly notificationService: INotificationService, + @IFileService private readonly fileService: IFileService, + @IPartService private readonly partService: IPartService ) { } public getId(tree: ITree, stat: ExplorerItem | Model): string { @@ -196,10 +196,10 @@ export class FileRenderer implements IRenderer { constructor( private state: FileViewletState, private labels: ResourceLabels, - @IContextViewService private contextViewService: IContextViewService, - @IThemeService private themeService: IThemeService, - @IConfigurationService private configurationService: IConfigurationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IContextViewService private readonly contextViewService: IContextViewService, + @IThemeService private readonly themeService: IThemeService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService ) { this.config = this.configurationService.getValue(); this.configListener = this.configurationService.onDidChangeConfiguration(e => { @@ -396,12 +396,12 @@ export class FileController extends WorkbenchTreeController implements IDisposab private previousSelectionRangeStop: ExplorerItem; constructor( - @IEditorService private editorService: IEditorService, - @IContextMenuService private contextMenuService: IContextMenuService, - @ITelemetryService private telemetryService: ITelemetryService, - @IMenuService private menuService: IMenuService, + @IEditorService private readonly editorService: IEditorService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IMenuService private readonly menuService: IMenuService, @IContextKeyService contextKeyService: IContextKeyService, - @IClipboardService private clipboardService: IClipboardService, + @IClipboardService private readonly clipboardService: IClipboardService, @IConfigurationService configurationService: IConfigurationService ) { super({ clickBehavior: ClickBehavior.ON_MOUSE_UP /* do not change to not break DND */ }, configurationService); @@ -579,8 +579,8 @@ export class FileSorter implements ISorter { private sortOrder: SortOrder; constructor( - @IConfigurationService private configurationService: IConfigurationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IConfigurationService private readonly configurationService: IConfigurationService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService ) { this.toDispose = []; @@ -698,8 +698,8 @@ export class FileFilter implements IFilter { private workspaceFolderChangeListener: IDisposable; constructor( - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IConfigurationService private configurationService: IConfigurationService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { this.hiddenExpressionPerRoot = new Map(); @@ -761,15 +761,15 @@ export class FileDragAndDrop extends SimpleFileResourceDragAndDrop { private dropEnabled: boolean; constructor( - @INotificationService private notificationService: INotificationService, - @IDialogService private dialogService: IDialogService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IFileService private fileService: IFileService, - @IConfigurationService private configurationService: IConfigurationService, + @INotificationService private readonly notificationService: INotificationService, + @IDialogService private readonly dialogService: IDialogService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IFileService private readonly fileService: IFileService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IInstantiationService instantiationService: IInstantiationService, - @ITextFileService private textFileService: ITextFileService, - @IWindowService private windowService: IWindowService, - @IWorkspaceEditingService private workspaceEditingService: IWorkspaceEditingService + @ITextFileService private readonly textFileService: ITextFileService, + @IWindowService private readonly windowService: IWindowService, + @IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService ) { super(stat => this.statToResource(stat), instantiationService); diff --git a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts index 56433813eba..0267c9b2035 100644 --- a/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/electron-browser/views/openEditorsView.ts @@ -60,18 +60,18 @@ export class OpenEditorsView extends ViewletPanel { constructor( options: IViewletViewOptions, - @IInstantiationService private instantiationService: IInstantiationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IContextMenuService contextMenuService: IContextMenuService, - @ITextFileService private textFileService: ITextFileService, - @IEditorService private editorService: IEditorService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, + @ITextFileService private readonly textFileService: ITextFileService, + @IEditorService private readonly editorService: IEditorService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, @IConfigurationService configurationService: IConfigurationService, @IKeybindingService keybindingService: IKeybindingService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IThemeService private themeService: IThemeService, - @ITelemetryService private telemetryService: ITelemetryService, - @IMenuService private menuService: IMenuService + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IThemeService private readonly themeService: IThemeService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IMenuService private readonly menuService: IMenuService ) { super({ ...(options as IViewletPanelOptions), diff --git a/src/vs/workbench/parts/localizations/electron-browser/localizations.contribution.ts b/src/vs/workbench/parts/localizations/electron-browser/localizations.contribution.ts index d841013ca21..b6cd57de315 100644 --- a/src/vs/workbench/parts/localizations/electron-browser/localizations.contribution.ts +++ b/src/vs/workbench/parts/localizations/electron-browser/localizations.contribution.ts @@ -36,16 +36,16 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureLocaleAction, export class LocalizationWorkbenchContribution extends Disposable implements IWorkbenchContribution { constructor( - @ILocalizationsService private localizationService: ILocalizationsService, - @INotificationService private notificationService: INotificationService, - @IJSONEditingService private jsonEditingService: IJSONEditingService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWindowsService private windowsService: IWindowsService, - @IStorageService private storageService: IStorageService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @IExtensionGalleryService private galleryService: IExtensionGalleryService, - @IViewletService private viewletService: IViewletService, - @ITelemetryService private telemetryService: ITelemetryService + @ILocalizationsService private readonly localizationService: ILocalizationsService, + @INotificationService private readonly notificationService: INotificationService, + @IJSONEditingService private readonly jsonEditingService: IJSONEditingService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IWindowsService private readonly windowsService: IWindowsService, + @IStorageService private readonly storageService: IStorageService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @IExtensionGalleryService private readonly galleryService: IExtensionGalleryService, + @IViewletService private readonly viewletService: IViewletService, + @ITelemetryService private readonly telemetryService: ITelemetryService ) { super(); this.updateLocaleDefintionSchema(); diff --git a/src/vs/workbench/parts/localizations/electron-browser/localizationsActions.ts b/src/vs/workbench/parts/localizations/electron-browser/localizationsActions.ts index 4af595651f9..42123a2b12a 100644 --- a/src/vs/workbench/parts/localizations/electron-browser/localizationsActions.ts +++ b/src/vs/workbench/parts/localizations/electron-browser/localizationsActions.ts @@ -28,10 +28,10 @@ export class ConfigureLocaleAction extends Action { ].join('\n'); constructor(id: string, label: string, - @IFileService private fileService: IFileService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IEditorService private editorService: IEditorService, - @ILabelService private labelService: ILabelService + @IFileService private readonly fileService: IFileService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IEditorService private readonly editorService: IEditorService, + @ILabelService private readonly labelService: ILabelService ) { super(id, label); } diff --git a/src/vs/workbench/parts/logs/electron-browser/logsActions.ts b/src/vs/workbench/parts/logs/electron-browser/logsActions.ts index a4d6c938d09..cc2468a05e1 100644 --- a/src/vs/workbench/parts/logs/electron-browser/logsActions.ts +++ b/src/vs/workbench/parts/logs/electron-browser/logsActions.ts @@ -17,8 +17,8 @@ export class OpenLogsFolderAction extends Action { static LABEL = nls.localize('openLogsFolder', "Open Logs Folder"); constructor(id: string, label: string, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWindowsService private windowsService: IWindowsService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IWindowsService private readonly windowsService: IWindowsService, ) { super(id, label); } @@ -34,8 +34,8 @@ export class SetLogLevelAction extends Action { static LABEL = nls.localize('setLogLevel', "Set Log Level..."); constructor(id: string, label: string, - @IQuickInputService private quickInputService: IQuickInputService, - @ILogService private logService: ILogService + @IQuickInputService private readonly quickInputService: IQuickInputService, + @ILogService private readonly logService: ILogService ) { super(id, label); } diff --git a/src/vs/workbench/parts/markers/electron-browser/markers.ts b/src/vs/workbench/parts/markers/electron-browser/markers.ts index 87af6149f01..e1e13bdf141 100644 --- a/src/vs/workbench/parts/markers/electron-browser/markers.ts +++ b/src/vs/workbench/parts/markers/electron-browser/markers.ts @@ -49,12 +49,12 @@ export class MarkersWorkbenchService extends Disposable implements IMarkersWorkb private readonly codeActions: Map> = new Map>(); constructor( - @IMarkerService private markerService: IMarkerService, + @IMarkerService private readonly markerService: IMarkerService, @IInstantiationService instantiationService: IInstantiationService, - @IBulkEditService private bulkEditService: IBulkEditService, - @ICommandService private commandService: ICommandService, - @IEditorService private editorService: IEditorService, - @IModelService private modelService: IModelService + @IBulkEditService private readonly bulkEditService: IBulkEditService, + @ICommandService private readonly commandService: ICommandService, + @IEditorService private readonly editorService: IEditorService, + @IModelService private readonly modelService: IModelService ) { super(); this.markersModel = this._register(instantiationService.createInstance(MarkersModel, this.readMarkers())); @@ -170,8 +170,8 @@ export class MarkersWorkbenchService extends Disposable implements IMarkersWorkb export class ActivityUpdater extends Disposable implements IWorkbenchContribution { constructor( - @IActivityService private activityService: IActivityService, - @IMarkersWorkbenchService private markersWorkbenchService: IMarkersWorkbenchService + @IActivityService private readonly activityService: IActivityService, + @IMarkersWorkbenchService private readonly markersWorkbenchService: IMarkersWorkbenchService ) { super(); this._register(this.markersWorkbenchService.markersModel.onDidChange(() => this.updateBadge())); diff --git a/src/vs/workbench/parts/markers/electron-browser/markersPanel.ts b/src/vs/workbench/parts/markers/electron-browser/markersPanel.ts index 9ec004d32a5..7f28670dbc0 100644 --- a/src/vs/workbench/parts/markers/electron-browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/electron-browser/markersPanel.ts @@ -92,18 +92,18 @@ export class MarkersPanel extends Panel implements IMarkerFilterController { private disposables: IDisposable[] = []; constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @IEditorService private editorService: IEditorService, - @IConfigurationService private configurationService: IConfigurationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IEditorService private readonly editorService: IEditorService, + @IConfigurationService private readonly configurationService: IConfigurationService, @ITelemetryService telemetryService: ITelemetryService, @IThemeService themeService: IThemeService, - @IMarkersWorkbenchService private markersWorkbenchService: IMarkersWorkbenchService, + @IMarkersWorkbenchService private readonly markersWorkbenchService: IMarkersWorkbenchService, @IStorageService storageService: IStorageService, @IContextKeyService contextKeyService: IContextKeyService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IContextMenuService private contextMenuService: IContextMenuService, - @IMenuService private menuService: IMenuService, - @IKeybindingService private keybindingService: IKeybindingService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @IMenuService private readonly menuService: IMenuService, + @IKeybindingService private readonly keybindingService: IKeybindingService, ) { super(Constants.MARKERS_PANEL_ID, telemetryService, themeService, storageService); this.panelFoucusContextKey = Constants.MarkerPanelFocusContextKey.bindTo(contextKeyService); diff --git a/src/vs/workbench/parts/markers/electron-browser/markersPanelActions.ts b/src/vs/workbench/parts/markers/electron-browser/markersPanelActions.ts index cde33a3e401..b81abdf184c 100644 --- a/src/vs/workbench/parts/markers/electron-browser/markersPanelActions.ts +++ b/src/vs/workbench/parts/markers/electron-browser/markersPanelActions.ts @@ -53,7 +53,7 @@ export class ShowProblemsPanelAction extends Action { public static readonly LABEL = Messages.MARKERS_PANEL_SHOW_LABEL; constructor(id: string, label: string, - @IPanelService private panelService: IPanelService + @IPanelService private readonly panelService: IPanelService ) { super(id, label); } @@ -129,10 +129,10 @@ export class MarkersFilterActionItem extends BaseActionItem { constructor( readonly action: MarkersFilterAction, private filterController: IMarkerFilterController, - @IInstantiationService private instantiationService: IInstantiationService, - @IContextViewService private contextViewService: IContextViewService, - @IThemeService private themeService: IThemeService, - @ITelemetryService private telemetryService: ITelemetryService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IContextViewService private readonly contextViewService: IContextViewService, + @IThemeService private readonly themeService: IThemeService, + @ITelemetryService private readonly telemetryService: ITelemetryService, @IContextKeyService contextKeyService: IContextKeyService ) { super(null, action); @@ -300,7 +300,7 @@ export class QuickFixAction extends Action { constructor( readonly marker: Marker, @IModelService modelService: IModelService, - @IMarkersWorkbenchService private markerWorkbenchService: IMarkersWorkbenchService, + @IMarkersWorkbenchService private readonly markerWorkbenchService: IMarkersWorkbenchService, ) { super(QuickFixAction.ID, Messages.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX, 'markers-panel-action-quickfix', false); if (modelService.getModel(this.marker.resource)) { @@ -330,8 +330,8 @@ export class QuickFixAction extends Action { export class QuickFixActionItem extends ActionItem { constructor(action: QuickFixAction, - @IContextMenuService private contextMenuService: IContextMenuService, - @IMarkersWorkbenchService private markerWorkbenchService: IMarkersWorkbenchService + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @IMarkersWorkbenchService private readonly markerWorkbenchService: IMarkersWorkbenchService ) { super(null, action, { icon: true, label: false }); } diff --git a/src/vs/workbench/parts/markers/electron-browser/markersTreeViewer.ts b/src/vs/workbench/parts/markers/electron-browser/markersTreeViewer.ts index c492f4a30df..c18c2778053 100644 --- a/src/vs/workbench/parts/markers/electron-browser/markersTreeViewer.ts +++ b/src/vs/workbench/parts/markers/electron-browser/markersTreeViewer.ts @@ -51,7 +51,7 @@ interface IRelatedInformationTemplateData { export class MarkersTreeAccessibilityProvider implements IAccessibilityProvider { - constructor(@ILabelService private labelService: ILabelService) { } + constructor(@ILabelService private readonly labelService: ILabelService) { } public getAriaLabel(element: TreeElement): string { if (element instanceof ResourceMarkers) { @@ -132,8 +132,8 @@ export class ResourceMarkersRenderer implements ITreeRenderer>, - @IThemeService private themeService: IThemeService, - @ILabelService private labelService: ILabelService + @IThemeService private readonly themeService: IThemeService, + @ILabelService private readonly labelService: ILabelService ) { onDidChangeRenderNodeCount(this.onDidChangeRenderNodeCount, this, this.disposables); } @@ -338,7 +338,7 @@ class MarkerWidget extends Disposable { export class RelatedInformationRenderer implements ITreeRenderer { constructor( - @ILabelService private labelService: ILabelService + @ILabelService private readonly labelService: ILabelService ) { } templateId = TemplateId.RelatedInformation; diff --git a/src/vs/workbench/parts/output/browser/outputActions.ts b/src/vs/workbench/parts/output/browser/outputActions.ts index 944d07638a2..b36e961422e 100644 --- a/src/vs/workbench/parts/output/browser/outputActions.ts +++ b/src/vs/workbench/parts/output/browser/outputActions.ts @@ -44,7 +44,7 @@ export class ClearOutputAction extends Action { constructor( id: string, label: string, - @IOutputService private outputService: IOutputService + @IOutputService private readonly outputService: IOutputService ) { super(id, label, 'output-action clear-output'); } @@ -65,7 +65,7 @@ export class ToggleOutputScrollLockAction extends Action { private toDispose: IDisposable[] = []; constructor(id: string, label: string, - @IOutputService private outputService: IOutputService) { + @IOutputService private readonly outputService: IOutputService) { super(id, label, 'output-action output-scroll-unlock'); this.toDispose.push(this.outputService.onActiveOutputChannel(channel => this.setClass(this.outputService.getActiveChannel().scrollLock))); } @@ -98,7 +98,7 @@ export class SwitchOutputAction extends Action { public static readonly ID = 'workbench.output.action.switchBetweenOutputs'; - constructor(@IOutputService private outputService: IOutputService) { + constructor(@IOutputService private readonly outputService: IOutputService) { super(SwitchOutputAction.ID, nls.localize('switchToOutput.label', "Switch to Output")); this.class = 'output-action switch-to-output'; @@ -118,7 +118,7 @@ export class SwitchOutputActionItem extends SelectActionItem { constructor( action: IAction, - @IOutputService private outputService: IOutputService, + @IOutputService private readonly outputService: IOutputService, @IThemeService themeService: IThemeService, @IContextViewService contextViewService: IContextViewService ) { @@ -173,9 +173,9 @@ export class OpenLogOutputFile extends Action { private disposables: IDisposable[] = []; constructor( - @IOutputService private outputService: IOutputService, - @IEditorService private editorService: IEditorService, - @IInstantiationService private instantiationService: IInstantiationService + @IOutputService private readonly outputService: IOutputService, + @IEditorService private readonly editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(OpenLogOutputFile.ID, OpenLogOutputFile.LABEL, 'output-action open-log-file'); this.outputService.onActiveOutputChannel(this.update, this, this.disposables); @@ -203,8 +203,8 @@ export class ShowLogsOutputChannelAction extends Action { static LABEL = nls.localize('showLogs', "Show Logs..."); constructor(id: string, label: string, - @IQuickInputService private quickInputService: IQuickInputService, - @IOutputService private outputService: IOutputService + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IOutputService private readonly outputService: IOutputService ) { super(id, label); } @@ -233,10 +233,10 @@ export class OpenOutputLogFileAction extends Action { static LABEL = nls.localize('openLogFile', "Open Log File..."); constructor(id: string, label: string, - @IQuickInputService private quickInputService: IQuickInputService, - @IOutputService private outputService: IOutputService, - @IEditorService private editorService: IEditorService, - @IInstantiationService private instantiationService: IInstantiationService + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IOutputService private readonly outputService: IOutputService, + @IEditorService private readonly editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(id, label); } diff --git a/src/vs/workbench/parts/output/browser/outputPanel.ts b/src/vs/workbench/parts/output/browser/outputPanel.ts index 9ad546c5ac2..226d63fcf40 100644 --- a/src/vs/workbench/parts/output/browser/outputPanel.ts +++ b/src/vs/workbench/parts/output/browser/outputPanel.ts @@ -35,11 +35,11 @@ export class OutputPanel extends AbstractTextResourceEditor { @ITelemetryService telemetryService: ITelemetryService, @IInstantiationService instantiationService: IInstantiationService, @IStorageService storageService: IStorageService, - @IConfigurationService private baseConfigurationService: IConfigurationService, + @IConfigurationService private readonly baseConfigurationService: IConfigurationService, @ITextResourceConfigurationService textResourceConfigurationService: ITextResourceConfigurationService, @IThemeService themeService: IThemeService, - @IOutputService private outputService: IOutputService, - @IContextKeyService private contextKeyService: IContextKeyService, + @IOutputService private readonly outputService: IOutputService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, @IEditorGroupsService editorGroupService: IEditorGroupsService, @ITextFileService textFileService: ITextFileService, @IEditorService editorService: IEditorService, diff --git a/src/vs/workbench/parts/output/common/outputLinkProvider.ts b/src/vs/workbench/parts/output/common/outputLinkProvider.ts index d739924dda7..6d9451401a2 100644 --- a/src/vs/workbench/parts/output/common/outputLinkProvider.ts +++ b/src/vs/workbench/parts/output/common/outputLinkProvider.ts @@ -22,8 +22,8 @@ export class OutputLinkProvider { private linkProviderRegistration: IDisposable; constructor( - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IModelService private modelService: IModelService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IModelService private readonly modelService: IModelService ) { this.disposeWorkerScheduler = new RunOnceScheduler(() => this.disposeWorker(), OutputLinkProvider.DISPOSE_WORKER_TIME); diff --git a/src/vs/workbench/parts/output/electron-browser/outputServices.ts b/src/vs/workbench/parts/output/electron-browser/outputServices.ts index e20c5dc6247..a7863fe0201 100644 --- a/src/vs/workbench/parts/output/electron-browser/outputServices.ts +++ b/src/vs/workbench/parts/output/electron-browser/outputServices.ts @@ -433,17 +433,17 @@ export class OutputService extends Disposable implements IOutputService, ITextMo private _outputPanel: OutputPanel; constructor( - @IStorageService private storageService: IStorageService, - @IInstantiationService private instantiationService: IInstantiationService, - @IPanelService private panelService: IPanelService, + @IStorageService private readonly storageService: IStorageService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IPanelService private readonly panelService: IPanelService, @IWorkspaceContextService contextService: IWorkspaceContextService, @ITextModelService textModelResolverService: ITextModelService, @IEnvironmentService environmentService: IEnvironmentService, @IWindowService windowService: IWindowService, - @ILogService private logService: ILogService, - @ITelemetryService private telemetryService: ITelemetryService, - @ILifecycleService private lifecycleService: ILifecycleService, - @IContextKeyService private contextKeyService: IContextKeyService, + @ILogService private readonly logService: ILogService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, ) { super(); this.activeChannelIdInStorage = this.storageService.get(OUTPUT_ACTIVE_CHANNEL_KEY, StorageScope.WORKSPACE, null); @@ -645,8 +645,8 @@ export class LogContentProvider { private channels: Map = new Map(); constructor( - @IOutputService private outputService: IOutputService, - @IInstantiationService private instantiationService: IInstantiationService + @IOutputService private readonly outputService: IOutputService, + @IInstantiationService private readonly instantiationService: IInstantiationService ) { } @@ -696,8 +696,8 @@ class BufferredOutputChannel extends Disposable implements OutputChannel { constructor( protected readonly outputChannelIdentifier: IOutputChannelDescriptor, - @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService + @IModelService private readonly modelService: IModelService, + @IModeService private readonly modeService: IModeService ) { super(); diff --git a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts index 2387f28ebf2..c4bcaa98316 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts @@ -51,7 +51,7 @@ export class KeybindingsSearchWidget extends SearchWidget { constructor(parent: HTMLElement, options: SearchOptions, @IContextViewService contextViewService: IContextViewService, - @IKeybindingService private keybindingService: IKeybindingService, + @IKeybindingService private readonly keybindingService: IKeybindingService, @IInstantiationService instantiationService: IInstantiationService, @IThemeService themeService: IThemeService ) { @@ -165,8 +165,8 @@ export class DefineKeybindingWidget extends Widget { constructor( parent: HTMLElement, - @IInstantiationService private instantiationService: IInstantiationService, - @IThemeService private themeService: IThemeService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IThemeService private readonly themeService: IThemeService ) { super(); this.create(); diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index 62bc3e36505..3605aad7566 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -83,16 +83,16 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor constructor( @ITelemetryService telemetryService: ITelemetryService, @IThemeService themeService: IThemeService, - @IKeybindingService private keybindingsService: IKeybindingService, - @IContextMenuService private contextMenuService: IContextMenuService, - @IKeybindingEditingService private keybindingEditingService: IKeybindingEditingService, - @IContextKeyService private contextKeyService: IContextKeyService, - @INotificationService private notificationService: INotificationService, - @IClipboardService private clipboardService: IClipboardService, - @IInstantiationService private instantiationService: IInstantiationService, - @IEditorService private editorService: IEditorService, + @IKeybindingService private readonly keybindingsService: IKeybindingService, + @IContextMenuService private readonly contextMenuService: IContextMenuService, + @IKeybindingEditingService private readonly keybindingEditingService: IKeybindingEditingService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @INotificationService private readonly notificationService: INotificationService, + @IClipboardService private readonly clipboardService: IClipboardService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IEditorService private readonly editorService: IEditorService, @IStorageService storageService: IStorageService, - @IPreferencesService private preferencesService: IPreferencesService + @IPreferencesService private readonly preferencesService: IPreferencesService ) { super(KeybindingsEditor.ID, telemetryService, themeService, storageService); this.delayedFiltering = new Delayer(300); diff --git a/src/vs/workbench/parts/preferences/browser/preferencesActions.ts b/src/vs/workbench/parts/preferences/browser/preferencesActions.ts index 77798c6e35d..b3dc05798a8 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesActions.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesActions.ts @@ -24,7 +24,7 @@ export class OpenRawDefaultSettingsAction extends Action { constructor( id: string, label: string, - @IPreferencesService private preferencesService: IPreferencesService + @IPreferencesService private readonly preferencesService: IPreferencesService ) { super(id, label); } @@ -42,7 +42,7 @@ export class OpenSettings2Action extends Action { constructor( id: string, label: string, - @IPreferencesService private preferencesService: IPreferencesService + @IPreferencesService private readonly preferencesService: IPreferencesService ) { super(id, label); } @@ -60,7 +60,7 @@ export class OpenSettingsJsonAction extends Action { constructor( id: string, label: string, - @IPreferencesService private preferencesService: IPreferencesService + @IPreferencesService private readonly preferencesService: IPreferencesService ) { super(id, label); } @@ -78,7 +78,7 @@ export class OpenGlobalSettingsAction extends Action { constructor( id: string, label: string, - @IPreferencesService private preferencesService: IPreferencesService, + @IPreferencesService private readonly preferencesService: IPreferencesService, ) { super(id, label); } @@ -96,7 +96,7 @@ export class OpenGlobalKeybindingsAction extends Action { constructor( id: string, label: string, - @IPreferencesService private preferencesService: IPreferencesService + @IPreferencesService private readonly preferencesService: IPreferencesService ) { super(id, label); } @@ -114,7 +114,7 @@ export class OpenGlobalKeybindingsFileAction extends Action { constructor( id: string, label: string, - @IPreferencesService private preferencesService: IPreferencesService + @IPreferencesService private readonly preferencesService: IPreferencesService ) { super(id, label); } @@ -132,7 +132,7 @@ export class OpenDefaultKeybindingsFileAction extends Action { constructor( id: string, label: string, - @IPreferencesService private preferencesService: IPreferencesService + @IPreferencesService private readonly preferencesService: IPreferencesService ) { super(id, label); } @@ -152,8 +152,8 @@ export class OpenWorkspaceSettingsAction extends Action { constructor( id: string, label: string, - @IPreferencesService private preferencesService: IPreferencesService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, + @IPreferencesService private readonly preferencesService: IPreferencesService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, ) { super(id, label); this.update(); @@ -187,9 +187,9 @@ export class OpenFolderSettingsAction extends Action { constructor( id: string, label: string, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IPreferencesService private preferencesService: IPreferencesService, - @ICommandService private commandService: ICommandService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IPreferencesService private readonly preferencesService: IPreferencesService, + @ICommandService private readonly commandService: ICommandService, ) { super(id, label); this.update(); @@ -226,10 +226,10 @@ export class ConfigureLanguageBasedSettingsAction extends Action { constructor( id: string, label: string, - @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService, - @IQuickInputService private quickInputService: IQuickInputService, - @IPreferencesService private preferencesService: IPreferencesService + @IModelService private readonly modelService: IModelService, + @IModeService private readonly modeService: IModeService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IPreferencesService private readonly preferencesService: IPreferencesService ) { super(id, label); } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index a940fd32e4f..b104b1b3b94 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -88,13 +88,13 @@ export class PreferencesEditor extends BaseEditor { readonly onDidSizeConstraintsChange: Event<{ width: number; height: number; }> = this._onDidCreateWidget.event; constructor( - @IPreferencesService private preferencesService: IPreferencesService, + @IPreferencesService private readonly preferencesService: IPreferencesService, @ITelemetryService telemetryService: ITelemetryService, - @IEditorService private editorService: IEditorService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IInstantiationService private instantiationService: IInstantiationService, + @IEditorService private readonly editorService: IEditorService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, - @IProgressService private progressService: IProgressService, + @IProgressService private readonly progressService: IProgressService, @IStorageService storageService: IStorageService ) { super(PreferencesEditor.ID, telemetryService, themeService, storageService); @@ -378,11 +378,11 @@ class PreferencesRenderersController extends Disposable { readonly onDidFilterResultsCountChange: Event = this._onDidFilterResultsCountChange.event; constructor( - @IPreferencesSearchService private preferencesSearchService: IPreferencesSearchService, - @ITelemetryService private telemetryService: ITelemetryService, - @IPreferencesService private preferencesService: IPreferencesService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @ILogService private logService: ILogService + @IPreferencesSearchService private readonly preferencesSearchService: IPreferencesSearchService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IPreferencesService private readonly preferencesService: IPreferencesService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @ILogService private readonly logService: ILogService ) { super(); } @@ -790,10 +790,10 @@ class SideBySidePreferencesWidget extends Widget { constructor( parentElement: HTMLElement, - @IInstantiationService private instantiationService: IInstantiationService, - @IThemeService private themeService: IThemeService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IPreferencesService private preferencesService: IPreferencesService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IThemeService private readonly themeService: IThemeService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IPreferencesService private readonly preferencesService: IPreferencesService, ) { super(); diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index ffc0c4d6da3..0ba9ee2e032 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -69,7 +69,7 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend constructor(protected editor: ICodeEditor, readonly preferencesModel: SettingsEditorModel, @IPreferencesService protected preferencesService: IPreferencesService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IInstantiationService protected instantiationService: IInstantiationService ) { super(); @@ -445,7 +445,7 @@ export class SettingsGroupTitleRenderer extends Disposable implements HiddenArea private disposables: IDisposable[] = []; constructor(private editor: ICodeEditor, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(); } @@ -653,8 +653,8 @@ class EditSettingRenderer extends Disposable { constructor(private editor: ICodeEditor, private masterSettingsModel: ISettingsEditorModel, private settingHighlighter: SettingHighlighter, - @IInstantiationService private instantiationService: IInstantiationService, - @IContextMenuService private contextMenuService: IContextMenuService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IContextMenuService private readonly contextMenuService: IContextMenuService ) { super(); @@ -953,7 +953,7 @@ class WorkspaceConfigurationRenderer extends Disposable { private renderingDelayer: Delayer = new Delayer(200); constructor(private editor: ICodeEditor, private workspaceSettingsEditorModel: SettingsEditorModel, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService ) { super(); this._register(this.editor.getModel().onDidChangeContent(() => this.renderingDelayer.trigger(() => this.render(this.associatedSettingsEditorModel)))); diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index b4328ef07d0..04a1058cd26 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -299,8 +299,8 @@ export class FolderSettingsActionItem extends BaseActionItem { constructor( action: IAction, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IContextMenuService private contextMenuService: IContextMenuService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IContextMenuService private readonly contextMenuService: IContextMenuService ) { super(null, action); const workspace = this.contextService.getWorkspace(); @@ -472,8 +472,8 @@ export class SettingsTargetsWidget extends Widget { constructor( parent: HTMLElement, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IInstantiationService private instantiationService: IInstantiationService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(); this.create(parent); @@ -588,9 +588,9 @@ export class SearchWidget extends Widget { readonly onFocus: Event = this._onFocus.event; constructor(parent: HTMLElement, protected options: SearchOptions, - @IContextViewService private contextViewService: IContextViewService, + @IContextViewService private readonly contextViewService: IContextViewService, @IInstantiationService protected instantiationService: IInstantiationService, - @IThemeService private themeService: IThemeService + @IThemeService private readonly themeService: IThemeService ) { super(); this.create(parent); diff --git a/src/vs/workbench/parts/preferences/browser/settingsTree.ts b/src/vs/workbench/parts/preferences/browser/settingsTree.ts index 17c665a1760..d2b1dfea5cd 100644 --- a/src/vs/workbench/parts/preferences/browser/settingsTree.ts +++ b/src/vs/workbench/parts/preferences/browser/settingsTree.ts @@ -576,8 +576,8 @@ export class SettingNewExtensionsRenderer implements ITreeRenderer { if (e.affectsConfiguration(USE_SPLIT_JSON_SETTING)) { diff --git a/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.ts b/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.ts index a2158597913..339bf73f6d6 100644 --- a/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.ts +++ b/src/vs/workbench/parts/preferences/electron-browser/preferences.contribution.ts @@ -356,8 +356,8 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon constructor( @IEnvironmentService environmentService: IEnvironmentService, - @IPreferencesService private preferencesService: IPreferencesService, - @IWorkspaceContextService private workpsaceContextService: IWorkspaceContextService + @IPreferencesService private readonly preferencesService: IPreferencesService, + @IWorkspaceContextService private readonly workpsaceContextService: IWorkspaceContextService ) { super(); MenuRegistry.appendMenuItem(MenuId.EditorTitle, { diff --git a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts index 568ca6d58f4..b928db33ec3 100644 --- a/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts +++ b/src/vs/workbench/parts/preferences/electron-browser/preferencesSearch.ts @@ -34,11 +34,11 @@ export class PreferencesSearchService extends Disposable implements IPreferences private _installedExtensions: Promise; constructor( - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IInstantiationService private instantiationService: IInstantiationService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService ) { super(); @@ -166,9 +166,9 @@ class RemoteSearchProvider implements ISearchProvider { private _remoteSearchP: Promise; constructor(private options: IRemoteSearchProviderOptions, private installedExtensions: Promise, - @IEnvironmentService private environmentService: IEnvironmentService, - @IRequestService private requestService: IRequestService, - @ILogService private logService: ILogService + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IRequestService private readonly requestService: IRequestService, + @ILogService private readonly logService: ILogService ) { this._remoteSearchP = this.options.filter ? Promise.resolve(this.getSettingsForFilter(this.options.filter)) : diff --git a/src/vs/workbench/parts/preferences/electron-browser/settingsEditor2.ts b/src/vs/workbench/parts/preferences/electron-browser/settingsEditor2.ts index 5c291940215..5c29598d6b9 100644 --- a/src/vs/workbench/parts/preferences/electron-browser/settingsEditor2.ts +++ b/src/vs/workbench/parts/preferences/electron-browser/settingsEditor2.ts @@ -126,17 +126,17 @@ export class SettingsEditor2 extends BaseEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IThemeService themeService: IThemeService, - @IPreferencesService private preferencesService: IPreferencesService, - @IInstantiationService private instantiationService: IInstantiationService, - @IPreferencesSearchService private preferencesSearchService: IPreferencesSearchService, - @ILogService private logService: ILogService, + @IPreferencesService private readonly preferencesService: IPreferencesService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IPreferencesSearchService private readonly preferencesSearchService: IPreferencesSearchService, + @ILogService private readonly logService: ILogService, @IContextKeyService contextKeyService: IContextKeyService, - @IStorageService private storageService: IStorageService, - @INotificationService private notificationService: INotificationService, + @IStorageService private readonly storageService: IStorageService, + @INotificationService private readonly notificationService: INotificationService, @IEditorGroupsService protected editorGroupService: IEditorGroupsService, - @IKeybindingService private keybindingService: IKeybindingService + @IKeybindingService private readonly keybindingService: IKeybindingService ) { super(SettingsEditor2.ID, telemetryService, themeService, storageService); this.delayedFilterLogging = new Delayer(1000); diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index 365dc74ad52..c1c6e03e2c3 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -64,8 +64,8 @@ class CommandsHistory extends Disposable { private commandHistoryLength: number; constructor( - @IStorageService private storageService: IStorageService, - @IConfigurationService private configurationService: IConfigurationService + @IStorageService private readonly storageService: IStorageService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(); @@ -138,8 +138,8 @@ export class ShowAllCommandsAction extends Action { constructor( id: string, label: string, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IConfigurationService private configurationService: IConfigurationService + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label); } @@ -168,7 +168,7 @@ export class ClearCommandHistoryAction extends Action { constructor( id: string, label: string, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(id, label); } @@ -222,7 +222,7 @@ abstract class BaseCommandEntry extends QuickOpenEntryGroup { alias: string, highlights: { label: IHighlight[], alias: IHighlight[] }, private onBeforeRun: (commandId: string) => void, - @INotificationService private notificationService: INotificationService, + @INotificationService private readonly notificationService: INotificationService, @ITelemetryService protected telemetryService: ITelemetryService ) { super(); @@ -378,12 +378,12 @@ export class CommandsHandler extends QuickOpenHandler { private commandsHistory: CommandsHistory; constructor( - @IEditorService private editorService: IEditorService, - @IInstantiationService private instantiationService: IInstantiationService, - @IKeybindingService private keybindingService: IKeybindingService, - @IMenuService private menuService: IMenuService, - @IConfigurationService private configurationService: IConfigurationService, - @IExtensionService private extensionService: IExtensionService + @IEditorService private readonly editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @IMenuService private readonly menuService: IMenuService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IExtensionService private readonly extensionService: IExtensionService ) { super(); diff --git a/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts b/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts index 8a863e05d1c..16718fdef5d 100644 --- a/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.ts @@ -208,7 +208,7 @@ export class GotoLineHandler extends QuickOpenHandler { private rangeHighlightDecorationId: IEditorLineDecoration; private lastKnownEditorViewState: IEditorViewState; - constructor(@IEditorService private editorService: IEditorService) { + constructor(@IEditorService private readonly editorService: IEditorService) { super(); } diff --git a/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts b/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts index dc7fcb9d8a9..4e161da020a 100644 --- a/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.ts @@ -372,7 +372,7 @@ export class GotoSymbolHandler extends QuickOpenHandler { private pendingOutlineRequest: CancellationTokenSource; constructor( - @IEditorService private editorService: IEditorService + @IEditorService private readonly editorService: IEditorService ) { super(); diff --git a/src/vs/workbench/parts/quickopen/browser/helpHandler.ts b/src/vs/workbench/parts/quickopen/browser/helpHandler.ts index 2ecec8c79b3..ac714337b35 100644 --- a/src/vs/workbench/parts/quickopen/browser/helpHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/helpHandler.ts @@ -61,7 +61,7 @@ export class HelpHandler extends QuickOpenHandler { static readonly ID = 'workbench.picker.help'; - constructor(@IQuickOpenService private quickOpenService: IQuickOpenService) { + constructor(@IQuickOpenService private readonly quickOpenService: IQuickOpenService) { super(); } diff --git a/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts b/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts index ecd1cf645d6..5c6b0713db8 100644 --- a/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts @@ -68,12 +68,12 @@ export class ViewPickerHandler extends QuickOpenHandler { static readonly ID = 'workbench.picker.views'; constructor( - @IViewletService private viewletService: IViewletService, - @IViewsService private viewsService: IViewsService, - @IOutputService private outputService: IOutputService, - @ITerminalService private terminalService: ITerminalService, - @IPanelService private panelService: IPanelService, - @IContextKeyService private contextKeyService: IContextKeyService, + @IViewletService private readonly viewletService: IViewletService, + @IViewsService private readonly viewsService: IViewsService, + @IOutputService private readonly outputService: IOutputService, + @ITerminalService private readonly terminalService: ITerminalService, + @IPanelService private readonly panelService: IPanelService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, ) { super(); } @@ -218,8 +218,8 @@ export class QuickOpenViewPickerAction extends Action { constructor( id: string, label: string, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IKeybindingService private keybindingService: IKeybindingService + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @IKeybindingService private readonly keybindingService: IKeybindingService ) { super(id, label); } 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 70c6ea82a47..83be58a4ade 100644 --- a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts +++ b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts @@ -48,13 +48,13 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo private onDidChangeWorkspaceFoldersUnbind: IDisposable; constructor( - @IWindowsService private windowsService: IWindowsService, - @IWindowService private windowService: IWindowService, - @IConfigurationService private configurationService: IConfigurationService, - @IEnvironmentService private envService: IEnvironmentService, - @IDialogService private dialogService: IDialogService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IExtensionService private extensionService: IExtensionService + @IWindowsService private readonly windowsService: IWindowsService, + @IWindowService private readonly windowService: IWindowService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IEnvironmentService private readonly envService: IEnvironmentService, + @IDialogService private readonly dialogService: IDialogService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IExtensionService private readonly extensionService: IExtensionService ) { super(); diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index 558fa182e58..6dda5edb047 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -189,13 +189,13 @@ class DirtyDiffWidget extends PeekViewWidget { constructor( editor: ICodeEditor, private model: DirtyDiffModel, - @IThemeService private themeService: IThemeService, - @IInstantiationService private instantiationService: IInstantiationService, + @IThemeService private readonly themeService: IThemeService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IMenuService menuService: IMenuService, - @IKeybindingService private keybindingService: IKeybindingService, - @INotificationService private notificationService: INotificationService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @INotificationService private readonly notificationService: INotificationService, @IContextKeyService contextKeyService: IContextKeyService, - @IContextMenuService private contextMenuService: IContextMenuService + @IContextMenuService private readonly contextMenuService: IContextMenuService ) { super(editor, { isResizeable: true, frameWidth: 1, keepEditorSelection: true }); @@ -568,7 +568,7 @@ export class DirtyDiffController implements IEditorContribution { constructor( private editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { this.enabled = !contextKeyService.getContextKeyValue('isInDiffEditor'); @@ -952,9 +952,9 @@ export class DirtyDiffModel { constructor( private _editorModel: ITextModel, - @ISCMService private scmService: ISCMService, - @IEditorWorkerService private editorWorkerService: IEditorWorkerService, - @ITextModelService private textModelResolverService: ITextModelService + @ISCMService private readonly scmService: ISCMService, + @IEditorWorkerService private readonly editorWorkerService: IEditorWorkerService, + @ITextModelService private readonly textModelResolverService: ITextModelService ) { this.diffDelayer = new ThrottledDelayer(200); @@ -1143,9 +1143,9 @@ export class DirtyDiffWorkbenchController implements ext.IWorkbenchContribution, private disposables: IDisposable[] = []; constructor( - @IEditorService private editorService: IEditorService, - @IInstantiationService private instantiationService: IInstantiationService, - @IConfigurationService private configurationService: IConfigurationService + @IEditorService private readonly editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { this.stylesheet = createStyleSheet(); this.disposables.push(toDisposable(() => this.stylesheet.parentElement.removeChild(this.stylesheet))); diff --git a/src/vs/workbench/parts/scm/electron-browser/scmActivity.ts b/src/vs/workbench/parts/scm/electron-browser/scmActivity.ts index a90d7f067d0..17784ae69e5 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmActivity.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmActivity.ts @@ -23,9 +23,9 @@ export class StatusUpdater implements IWorkbenchContribution { private disposables: IDisposable[] = []; constructor( - @ISCMService private scmService: ISCMService, - @IActivityService private activityService: IActivityService, - @ILogService private logService: ILogService + @ISCMService private readonly scmService: ISCMService, + @IActivityService private readonly activityService: IActivityService, + @ILogService private readonly logService: ILogService ) { for (const repository of this.scmService.repositories) { this.onDidAddRepository(repository); @@ -88,10 +88,10 @@ export class StatusBarController implements IWorkbenchContribution { private disposables: IDisposable[] = []; constructor( - @ISCMService private scmService: ISCMService, - @IStatusbarService private statusbarService: IStatusbarService, + @ISCMService private readonly scmService: ISCMService, + @IStatusbarService private readonly statusbarService: IStatusbarService, @IContextKeyService contextKeyService: IContextKeyService, - @IEditorService private editorService: IEditorService + @IEditorService private readonly editorService: IEditorService ) { this.focusedProviderContextKey = contextKeyService.createKey('scmProvider', undefined); this.scmService.onDidAddRepository(this.onDidAddRepository, this, this.disposables); diff --git a/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts b/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts index bb11097129e..f9a5634e1df 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts @@ -51,8 +51,8 @@ export class SCMMenus implements IDisposable { constructor( provider: ISCMProvider | undefined, @IContextKeyService contextKeyService: IContextKeyService, - @IMenuService private menuService: IMenuService, - @IContextMenuService private contextMenuService: IContextMenuService + @IMenuService private readonly menuService: IMenuService, + @IContextMenuService private readonly contextMenuService: IContextMenuService ) { this.contextKeyService = contextKeyService.createScoped(); const scmProviderKey = this.contextKeyService.createKey('scmProvider', undefined); diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 22a296419ec..19d30856bec 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -225,9 +225,9 @@ class MainPanel extends ViewletPanel { @IKeybindingService protected keybindingService: IKeybindingService, @IContextMenuService protected contextMenuService: IContextMenuService, @ISCMService protected scmService: ISCMService, - @IInstantiationService private instantiationService: IInstantiationService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IMenuService private menuService: IMenuService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IMenuService private readonly menuService: IMenuService, @IConfigurationService configurationService: IConfigurationService ) { super({ id: 'scm.mainPanel', title: localize('scm providers', "Source Control Providers") }, keybindingService, contextMenuService, configurationService); @@ -742,7 +742,7 @@ export class RepositoryPanel extends ViewletPanel { @IContextMenuService protected contextMenuService: IContextMenuService, @IContextViewService protected contextViewService: IContextViewService, @ICommandService protected commandService: ICommandService, - @INotificationService private notificationService: INotificationService, + @INotificationService private readonly notificationService: INotificationService, @IEditorService protected editorService: IEditorService, @IInstantiationService protected instantiationService: IInstantiationService, @IConfigurationService protected configurationService: IConfigurationService, diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index 8fd9995bcfd..06d934a7501 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -46,9 +46,9 @@ export class OpenAnythingHandler extends QuickOpenHandler { private includeSymbols: boolean; constructor( - @INotificationService private notificationService: INotificationService, + @INotificationService private readonly notificationService: INotificationService, @IInstantiationService instantiationService: IInstantiationService, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(); diff --git a/src/vs/workbench/parts/search/browser/openFileHandler.ts b/src/vs/workbench/parts/search/browser/openFileHandler.ts index dc8fc7f9708..ff7a3ec092b 100644 --- a/src/vs/workbench/parts/search/browser/openFileHandler.ts +++ b/src/vs/workbench/parts/search/browser/openFileHandler.ts @@ -51,9 +51,9 @@ export class FileEntry extends EditorQuickOpenEntry { private description: string, private icon: string, @IEditorService editorService: IEditorService, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService, - @IConfigurationService private configurationService: IConfigurationService, + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IWorkspaceContextService contextService: IWorkspaceContextService ) { super(editorService); @@ -119,14 +119,14 @@ export class OpenFileHandler extends QuickOpenHandler { private cacheState: CacheState; constructor( - @IEditorService private editorService: IEditorService, - @IInstantiationService private instantiationService: IInstantiationService, - @IWorkbenchThemeService private themeService: IWorkbenchThemeService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @ISearchService private searchService: ISearchService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IFileService private fileService: IFileService, - @ILabelService private labelService: ILabelService + @IEditorService private readonly editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IWorkbenchThemeService private readonly themeService: IWorkbenchThemeService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @ISearchService private readonly searchService: ISearchService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IFileService private readonly fileService: IFileService, + @ILabelService private readonly labelService: ILabelService ) { super(); diff --git a/src/vs/workbench/parts/search/browser/openSymbolHandler.ts b/src/vs/workbench/parts/search/browser/openSymbolHandler.ts index 4b4012b8ee6..bcc785e66b8 100644 --- a/src/vs/workbench/parts/search/browser/openSymbolHandler.ts +++ b/src/vs/workbench/parts/search/browser/openSymbolHandler.ts @@ -34,8 +34,8 @@ class SymbolEntry extends EditorQuickOpenEntry { private provider: IWorkspaceSymbolProvider, @IConfigurationService private readonly configurationService: IConfigurationService, @IEditorService editorService: IEditorService, - @ILabelService private labelService: ILabelService, - @IOpenerService private openerService: IOpenerService + @ILabelService private readonly labelService: ILabelService, + @IOpenerService private readonly openerService: IOpenerService ) { super(editorService); } @@ -141,7 +141,7 @@ export class OpenSymbolHandler extends QuickOpenHandler { private delayer: ThrottledDelayer; private options: IOpenSymbolOptions; - constructor(@IInstantiationService private instantiationService: IInstantiationService) { + constructor(@IInstantiationService private readonly instantiationService: IInstantiationService) { super(); this.delayer = new ThrottledDelayer(OpenSymbolHandler.TYPING_SEARCH_DELAY); diff --git a/src/vs/workbench/parts/search/browser/patternInputWidget.ts b/src/vs/workbench/parts/search/browser/patternInputWidget.ts index 7d7e8138cac..d41815d0459 100644 --- a/src/vs/workbench/parts/search/browser/patternInputWidget.ts +++ b/src/vs/workbench/parts/search/browser/patternInputWidget.ts @@ -46,7 +46,7 @@ export class PatternInputWidget extends Widget { constructor(parent: HTMLElement, private contextViewProvider: IContextViewProvider, options: IOptions = Object.create(null), @IThemeService protected themeService: IThemeService, - @IContextKeyService private contextKeyService: IContextKeyService + @IContextKeyService private readonly contextKeyService: IContextKeyService ) { super(); this.width = options.width || 100; diff --git a/src/vs/workbench/parts/search/browser/replaceService.ts b/src/vs/workbench/parts/search/browser/replaceService.ts index 79b23bf636d..1d003c86679 100644 --- a/src/vs/workbench/parts/search/browser/replaceService.ts +++ b/src/vs/workbench/parts/search/browser/replaceService.ts @@ -40,8 +40,8 @@ const toFileResource = (replaceResource: URI): URI => { export class ReplacePreviewContentProvider implements ITextModelContentProvider, IWorkbenchContribution { constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @ITextModelService private textModelResolverService: ITextModelService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ITextModelService private readonly textModelResolverService: ITextModelService ) { this.textModelResolverService.registerTextModelContentProvider(network.Schemas.internal, this); } @@ -56,11 +56,11 @@ export class ReplacePreviewContentProvider implements ITextModelContentProvider, class ReplacePreviewModel extends Disposable { constructor( - @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService, - @ITextModelService private textModelResolverService: ITextModelService, - @IReplaceService private replaceService: IReplaceService, - @ISearchWorkbenchService private searchWorkbenchService: ISearchWorkbenchService + @IModelService private readonly modelService: IModelService, + @IModeService private readonly modeService: IModeService, + @ITextModelService private readonly textModelResolverService: ITextModelService, + @IReplaceService private readonly replaceService: IReplaceService, + @ISearchWorkbenchService private readonly searchWorkbenchService: ISearchWorkbenchService ) { super(); } @@ -94,10 +94,10 @@ export class ReplaceService implements IReplaceService { _serviceBrand: any; constructor( - @ITextFileService private textFileService: ITextFileService, - @IEditorService private editorService: IEditorService, - @ITextModelService private textModelResolverService: ITextModelService, - @IBulkEditService private bulkEditorService: IBulkEditService + @ITextFileService private readonly textFileService: ITextFileService, + @IEditorService private readonly editorService: IEditorService, + @ITextModelService private readonly textModelResolverService: ITextModelService, + @IBulkEditService private readonly bulkEditorService: IBulkEditService ) { } replace(match: Match): Promise; diff --git a/src/vs/workbench/parts/search/browser/searchActions.ts b/src/vs/workbench/parts/search/browser/searchActions.ts index 526cc667fca..965e0149c13 100644 --- a/src/vs/workbench/parts/search/browser/searchActions.ts +++ b/src/vs/workbench/parts/search/browser/searchActions.ts @@ -92,8 +92,8 @@ export class FocusNextInputAction extends Action { static readonly ID = 'search.focus.nextInputBox'; constructor(id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService ) { super(id, label); } @@ -110,8 +110,8 @@ export class FocusPreviousInputAction extends Action { static readonly ID = 'search.focus.previousInputBox'; constructor(id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService ) { super(id, label); } @@ -161,7 +161,7 @@ export class OpenSearchViewletAction extends FindOrReplaceInFilesAction { constructor(id: string, label: string, @IViewletService viewletService: IViewletService, @IPanelService panelService: IPanelService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { super(id, label, viewletService, panelService, /*expandSearchReplaceWidget=*/false); } @@ -200,8 +200,8 @@ export class ReplaceInFilesAction extends FindOrReplaceInFilesAction { export class CloseReplaceAction extends Action { constructor(id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService ) { super(id, label); } @@ -222,8 +222,8 @@ export class RefreshAction extends Action { private searchView: SearchView; constructor(id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService ) { super(id, label, 'search-action refresh'); this.searchView = getSearchView(this.viewletService, this.panelService); @@ -252,8 +252,8 @@ export class CollapseDeepestExpandedLevelAction extends Action { static LABEL: string = nls.localize('CollapseDeepestExpandedLevelAction.label', "Collapse All"); constructor(id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService ) { super(id, label, 'search-action collapse'); this.update(); @@ -309,8 +309,8 @@ export class ClearSearchResultsAction extends Action { static LABEL: string = nls.localize('ClearSearchResultsAction.label', "Clear Search Results"); constructor(id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService ) { super(id, label, 'search-action clear-search-results'); this.update(); @@ -336,8 +336,8 @@ export class CancelSearchAction extends Action { static LABEL: string = nls.localize('CancelSearchAction.label', "Cancel Search"); constructor(id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService ) { super(id, label, 'search-action cancel-search'); this.update(); @@ -363,8 +363,8 @@ export class FocusNextSearchResultAction extends Action { static readonly LABEL = nls.localize('FocusNextSearchResult.label', "Focus Next Search Result"); constructor(id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService ) { super(id, label); } @@ -381,8 +381,8 @@ export class FocusPreviousSearchResultAction extends Action { static readonly LABEL = nls.localize('FocusPreviousSearchResult.label', "Focus Previous Search Result"); constructor(id: string, label: string, - @IViewletService private viewletService: IViewletService, - @IPanelService private panelService: IPanelService + @IViewletService private readonly viewletService: IViewletService, + @IPanelService private readonly panelService: IPanelService ) { super(id, label); } @@ -557,10 +557,10 @@ export class ReplaceAction extends AbstractSearchAndReplaceAction { static readonly LABEL = nls.localize('match.replace.label', "Replace"); constructor(private viewer: WorkbenchObjectTree, private element: Match, private viewlet: SearchView, - @IReplaceService private replaceService: IReplaceService, + @IReplaceService private readonly replaceService: IReplaceService, @IKeybindingService keyBindingService: IKeybindingService, - @IEditorService private editorService: IEditorService, - @IConfigurationService private configurationService: IConfigurationService) { + @IEditorService private readonly editorService: IEditorService, + @IConfigurationService private readonly configurationService: IConfigurationService) { super(Constants.ReplaceActionId, appendKeyBindingLabel(ReplaceAction.LABEL, keyBindingService.lookupKeybinding(Constants.ReplaceActionId), keyBindingService), 'action-replace'); } diff --git a/src/vs/workbench/parts/search/browser/searchResultsView.ts b/src/vs/workbench/parts/search/browser/searchResultsView.ts index f738f110a87..226cf38c68e 100644 --- a/src/vs/workbench/parts/search/browser/searchResultsView.ts +++ b/src/vs/workbench/parts/search/browser/searchResultsView.ts @@ -78,8 +78,8 @@ export class FolderMatchRenderer extends Disposable implements ITreeRenderer(); @@ -624,9 +624,9 @@ export class SearchResult extends Disposable { constructor( private _searchModel: SearchModel, - @IReplaceService private replaceService: IReplaceService, - @ITelemetryService private telemetryService: ITelemetryService, - @IInstantiationService private instantiationService: IInstantiationService, + @IReplaceService private readonly replaceService: IReplaceService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IInstantiationService private readonly instantiationService: IInstantiationService, @IModelService private readonly modelService: IModelService, ) { super(); @@ -851,9 +851,9 @@ export class SearchModel extends Disposable { private currentCancelTokenSource: CancellationTokenSource; constructor( - @ISearchService private searchService: ISearchService, - @ITelemetryService private telemetryService: ITelemetryService, - @IInstantiationService private instantiationService: IInstantiationService + @ISearchService private readonly searchService: ISearchService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(); this._searchResult = this.instantiationService.createInstance(SearchResult, this); @@ -1012,7 +1012,7 @@ export class SearchWorkbenchService implements ISearchWorkbenchService { _serviceBrand: any; private _searchModel: SearchModel; - constructor(@IInstantiationService private instantiationService: IInstantiationService) { + constructor(@IInstantiationService private readonly instantiationService: IInstantiationService) { } get searchModel(): SearchModel { diff --git a/src/vs/workbench/parts/search/electron-browser/search.contribution.ts b/src/vs/workbench/parts/search/electron-browser/search.contribution.ts index ec37aa744ec..e85523fac2f 100644 --- a/src/vs/workbench/parts/search/electron-browser/search.contribution.ts +++ b/src/vs/workbench/parts/search/electron-browser/search.contribution.ts @@ -427,8 +427,8 @@ class ShowAllSymbolsAction extends Action { constructor( actionId: string, actionLabel: string, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @ICodeEditorService private editorService: ICodeEditorService) { + @IQuickOpenService private readonly quickOpenService: IQuickOpenService, + @ICodeEditorService private readonly editorService: ICodeEditorService) { super(actionId, actionLabel); this.enabled = !!this.quickOpenService; } diff --git a/src/vs/workbench/parts/splash/electron-browser/partsSplash.contribution.ts b/src/vs/workbench/parts/splash/electron-browser/partsSplash.contribution.ts index 2bf9f241d7b..101253b23b1 100644 --- a/src/vs/workbench/parts/splash/electron-browser/partsSplash.contribution.ts +++ b/src/vs/workbench/parts/splash/electron-browser/partsSplash.contribution.ts @@ -35,7 +35,7 @@ class PartsSplash { @IStorageService private readonly _storageService: IStorageService, @IEnvironmentService private readonly _envService: IEnvironmentService, @ILifecycleService lifecycleService: ILifecycleService, - @IBroadcastService private broadcastService: IBroadcastService + @IBroadcastService private readonly broadcastService: IBroadcastService ) { lifecycleService.when(LifecyclePhase.Restored).then(_ => this._removePartsSplash()); Event.debounce(Event.any( diff --git a/src/vs/workbench/parts/stats/node/workspaceStats.ts b/src/vs/workbench/parts/stats/node/workspaceStats.ts index 82f14b0e445..d98b9c06057 100644 --- a/src/vs/workbench/parts/stats/node/workspaceStats.ts +++ b/src/vs/workbench/parts/stats/node/workspaceStats.ts @@ -207,14 +207,14 @@ export class WorkspaceStats implements IWorkbenchContribution { private static DISABLE_WORKSPACE_PROMPT_KEY = 'workspaces.dontPromptToOpen'; constructor( - @IFileService private fileService: IFileService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @ITelemetryService private telemetryService: ITelemetryService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWindowService private windowService: IWindowService, - @INotificationService private notificationService: INotificationService, - @IQuickInputService private quickInputService: IQuickInputService, - @IStorageService private storageService: IStorageService + @IFileService private readonly fileService: IFileService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IWindowService private readonly windowService: IWindowService, + @INotificationService private readonly notificationService: INotificationService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IStorageService private readonly storageService: IStorageService ) { this.report(); } diff --git a/src/vs/workbench/parts/tasks/electron-browser/runAutomaticTasks.ts b/src/vs/workbench/parts/tasks/electron-browser/runAutomaticTasks.ts index daf10109fa6..d4443610bd4 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/runAutomaticTasks.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/runAutomaticTasks.ts @@ -138,7 +138,7 @@ export class AllowAutomaticTaskRunning extends Action { constructor( id: string, label: string, - @IStorageService private storageService: IStorageService + @IStorageService private readonly storageService: IStorageService ) { super(id, label); } @@ -156,7 +156,7 @@ export class DisallowAutomaticTaskRunning extends Action { constructor( id: string, label: string, - @IStorageService private storageService: IStorageService + @IStorageService private readonly storageService: IStorageService ) { super(id, label); } diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index c18f2a3d32d..3d57be482f0 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -116,12 +116,12 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem { private icons: HTMLElement[]; constructor( - @IPanelService private panelService: IPanelService, - @IMarkerService private markerService: IMarkerService, - @ITaskService private taskService: ITaskService, - @IPartService private partService: IPartService, + @IPanelService private readonly panelService: IPanelService, + @IMarkerService private readonly markerService: IMarkerService, + @ITaskService private readonly taskService: ITaskService, + @IPartService private readonly partService: IPartService, @IThemeService themeService: IThemeService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService ) { super(themeService); @@ -288,7 +288,7 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem { class TaskStatusBarItem extends Themable implements IStatusbarItem { constructor( - @ITaskService private taskService: ITaskService, + @ITaskService private readonly taskService: ITaskService, @IThemeService themeService: IThemeService, ) { super(themeService); @@ -465,26 +465,26 @@ class TaskService extends Disposable implements ITaskService { private readonly _onDidStateChange: Emitter; constructor( - @IConfigurationService private configurationService: IConfigurationService, - @IMarkerService private markerService: IMarkerService, - @IOutputService private outputService: IOutputService, - @IEditorService private editorService: IEditorService, - @IFileService private fileService: IFileService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @ITelemetryService private telemetryService: ITelemetryService, - @ITextFileService private textFileService: ITextFileService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IMarkerService private readonly markerService: IMarkerService, + @IOutputService private readonly outputService: IOutputService, + @IEditorService private readonly editorService: IEditorService, + @IFileService private readonly fileService: IFileService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @ITextFileService private readonly textFileService: ITextFileService, @ILifecycleService lifecycleService: ILifecycleService, - @IModelService private modelService: IModelService, - @IExtensionService private extensionService: IExtensionService, - @IQuickInputService private quickInputService: IQuickInputService, - @IConfigurationResolverService private configurationResolverService: IConfigurationResolverService, - @ITerminalService private terminalService: ITerminalService, - @IStorageService private storageService: IStorageService, - @IProgressService2 private progressService: IProgressService2, - @IOpenerService private openerService: IOpenerService, + @IModelService private readonly modelService: IModelService, + @IExtensionService private readonly extensionService: IExtensionService, + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IConfigurationResolverService private readonly configurationResolverService: IConfigurationResolverService, + @ITerminalService private readonly terminalService: ITerminalService, + @IStorageService private readonly storageService: IStorageService, + @IProgressService2 private readonly progressService: IProgressService2, + @IOpenerService private readonly openerService: IOpenerService, @IWindowService private readonly _windowService: IWindowService, - @IDialogService private dialogService: IDialogService, - @INotificationService private notificationService: INotificationService, + @IDialogService private readonly dialogService: IDialogService, + @INotificationService private readonly notificationService: INotificationService, @IContextKeyService contextKeyService: IContextKeyService, ) { super(); diff --git a/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.ts b/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.ts index e0b33f622fb..1b8f9848510 100644 --- a/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.ts +++ b/src/vs/workbench/parts/terminal/browser/terminalQuickOpen.ts @@ -77,8 +77,8 @@ export class TerminalPickerHandler extends QuickOpenHandler { public static readonly ID = 'workbench.picker.terminals'; constructor( - @ITerminalService private terminalService: ITerminalService, - @ICommandService private commandService: ICommandService, + @ITerminalService private readonly terminalService: ITerminalService, + @ICommandService private readonly commandService: ICommandService, ) { super(); } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index bb1e786e7fb..c77fbe34407 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -74,7 +74,7 @@ export class ToggleTerminalAction extends TogglePanelAction { id: string, label: string, @IPanelService panelService: IPanelService, @IPartService partService: IPartService, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label, TERMINAL_PANEL_ID, panelService, partService); } @@ -101,7 +101,7 @@ export class KillTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label, 'terminal-action kill'); } @@ -126,7 +126,7 @@ export class QuickKillTerminalAction extends Action { constructor( id: string, label: string, private terminalEntry: TerminalEntry, - @IQuickOpenService private quickOpenService: IQuickOpenService + @IQuickOpenService private readonly quickOpenService: IQuickOpenService ) { super(id, label, 'terminal-action kill'); } @@ -152,7 +152,7 @@ export class CopyTerminalSelectionAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -173,7 +173,7 @@ export class SelectAllTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -297,9 +297,9 @@ export class CreateNewTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService, - @ICommandService private commandService: ICommandService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService + @ITerminalService private readonly terminalService: ITerminalService, + @ICommandService private readonly commandService: ICommandService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService ) { super(id, label, 'terminal-action new'); } @@ -351,7 +351,7 @@ export class CreateNewInActiveWorkspaceTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -374,8 +374,8 @@ export class SplitTerminalAction extends Action { constructor( id: string, label: string, @ITerminalService private readonly _terminalService: ITerminalService, - @ICommandService private commandService: ICommandService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService + @ICommandService private readonly commandService: ICommandService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService ) { super(id, label, 'terminal-action split'); } @@ -535,7 +535,7 @@ export class FocusActiveTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -557,7 +557,7 @@ export class FocusNextTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -575,7 +575,7 @@ export class FocusPreviousTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -594,7 +594,7 @@ export class TerminalPasteAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -615,7 +615,7 @@ export class SelectDefaultShellWindowsTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -632,8 +632,8 @@ export class RunSelectedTextInTerminalAction extends Action { constructor( id: string, label: string, - @ICodeEditorService private codeEditorService: ICodeEditorService, - @ITerminalService private terminalService: ITerminalService + @ICodeEditorService private readonly codeEditorService: ICodeEditorService, + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -667,9 +667,9 @@ export class RunActiveFileInTerminalAction extends Action { constructor( id: string, label: string, - @ICodeEditorService private codeEditorService: ICodeEditorService, - @ITerminalService private terminalService: ITerminalService, - @INotificationService private notificationService: INotificationService + @ICodeEditorService private readonly codeEditorService: ICodeEditorService, + @ITerminalService private readonly terminalService: ITerminalService, + @INotificationService private readonly notificationService: INotificationService ) { super(id, label); } @@ -703,7 +703,7 @@ export class SwitchTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label, 'terminal-action switch-terminal'); } @@ -722,7 +722,7 @@ export class SwitchTerminalActionItem extends SelectActionItem { constructor( action: IAction, - @ITerminalService private terminalService: ITerminalService, + @ITerminalService private readonly terminalService: ITerminalService, @IThemeService themeService: IThemeService, @IContextViewService contextViewService: IContextViewService ) { @@ -746,7 +746,7 @@ export class ScrollDownTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -767,7 +767,7 @@ export class ScrollDownPageTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -788,7 +788,7 @@ export class ScrollToBottomTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -809,7 +809,7 @@ export class ScrollUpTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -830,7 +830,7 @@ export class ScrollUpPageTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -851,7 +851,7 @@ export class ScrollToTopTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -872,7 +872,7 @@ export class ClearTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -893,7 +893,7 @@ export class ClearSelectionTerminalAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -914,7 +914,7 @@ export class AllowWorkspaceShellTerminalCommand extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -932,7 +932,7 @@ export class DisallowWorkspaceShellTerminalCommand extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -980,7 +980,7 @@ export class FocusTerminalFindWidgetAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -997,7 +997,7 @@ export class HideTerminalFindWidgetAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1010,7 +1010,7 @@ export class HideTerminalFindWidgetAction extends Action { export class QuickOpenActionTermContributor extends ActionBarContributor { constructor( - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(); } @@ -1037,7 +1037,7 @@ export class QuickOpenTermAction extends Action { constructor( id: string, label: string, - @IQuickOpenService private quickOpenService: IQuickOpenService + @IQuickOpenService private readonly quickOpenService: IQuickOpenService ) { super(id, label); } @@ -1075,7 +1075,7 @@ export class ScrollToPreviousCommandAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1096,7 +1096,7 @@ export class ScrollToNextCommandAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1117,7 +1117,7 @@ export class SelectToPreviousCommandAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1138,7 +1138,7 @@ export class SelectToNextCommandAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1159,7 +1159,7 @@ export class SelectToPreviousLineAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1180,7 +1180,7 @@ export class SelectToNextLineAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1202,7 +1202,7 @@ export class ToggleEscapeSequenceLoggingAction extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1219,7 +1219,7 @@ export class ToggleEscapeSequenceLoggingAction extends Action { abstract class ToggleFindOptionCommand extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1270,7 +1270,7 @@ export class FindNext extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } @@ -1288,7 +1288,7 @@ export class FindPrevious extends Action { constructor( id: string, label: string, - @ITerminalService private terminalService: ITerminalService + @ITerminalService private readonly terminalService: ITerminalService ) { super(id, label); } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 774f2fd3ad0..ca7d97330f5 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -130,7 +130,7 @@ export class TerminalInstance implements ITerminalInstance { @IClipboardService private readonly _clipboardService: IClipboardService, @IThemeService private readonly _themeService: IThemeService, @IConfigurationService private readonly _configurationService: IConfigurationService, - @ILogService private _logService: ILogService, + @ILogService private readonly _logService: ILogService, @IStorageService private readonly _storageService: IStorageService ) { this._disposables = []; diff --git a/src/vs/workbench/parts/terminal/node/terminalProcessExtHostProxy.ts b/src/vs/workbench/parts/terminal/node/terminalProcessExtHostProxy.ts index 831f8bdc353..ea06eac26f5 100644 --- a/src/vs/workbench/parts/terminal/node/terminalProcessExtHostProxy.ts +++ b/src/vs/workbench/parts/terminal/node/terminalProcessExtHostProxy.ts @@ -35,7 +35,7 @@ export class TerminalProcessExtHostProxy implements ITerminalChildProcess, ITerm activeWorkspaceRootUri: URI, cols: number, rows: number, - @ITerminalService private _terminalService: ITerminalService, + @ITerminalService private readonly _terminalService: ITerminalService, @IExtensionService private readonly _extensionService: IExtensionService ) { this._extensionService.whenInstalledExtensionsRegistered().then(() => { diff --git a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts index ccee4f70f9a..6df1b20da3d 100644 --- a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts +++ b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts @@ -33,11 +33,11 @@ export class SelectColorThemeAction extends Action { constructor( id: string, label: string, - @IQuickInputService private quickInputService: IQuickInputService, - @IWorkbenchThemeService private themeService: IWorkbenchThemeService, - @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService, - @IViewletService private viewletService: IViewletService, - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IWorkbenchThemeService private readonly themeService: IWorkbenchThemeService, + @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, + @IViewletService private readonly viewletService: IViewletService, + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService ) { super(id, label); } @@ -94,11 +94,11 @@ class SelectIconThemeAction extends Action { constructor( id: string, label: string, - @IQuickInputService private quickInputService: IQuickInputService, - @IWorkbenchThemeService private themeService: IWorkbenchThemeService, - @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService, - @IViewletService private viewletService: IViewletService, - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService + @IQuickInputService private readonly quickInputService: IQuickInputService, + @IWorkbenchThemeService private readonly themeService: IWorkbenchThemeService, + @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, + @IViewletService private readonly viewletService: IViewletService, + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService ) { super(id, label); @@ -187,8 +187,8 @@ class GenerateColorThemeAction extends Action { constructor( id: string, label: string, - @IWorkbenchThemeService private themeService: IWorkbenchThemeService, - @IEditorService private editorService: IEditorService, + @IWorkbenchThemeService private readonly themeService: IWorkbenchThemeService, + @IEditorService private readonly editorService: IEditorService, ) { super(id, label); } diff --git a/src/vs/workbench/parts/themes/test/electron-browser/themes.test.contribution.ts b/src/vs/workbench/parts/themes/test/electron-browser/themes.test.contribution.ts index c1b90c3bcc7..33140524211 100644 --- a/src/vs/workbench/parts/themes/test/electron-browser/themes.test.contribution.ts +++ b/src/vs/workbench/parts/themes/test/electron-browser/themes.test.contribution.ts @@ -87,9 +87,9 @@ class ThemeDocument { class Snapper { constructor( - @IModeService private modeService: IModeService, - @IWorkbenchThemeService private themeService: IWorkbenchThemeService, - @ITextMateService private textMateService: ITextMateService + @IModeService private readonly modeService: IModeService, + @IWorkbenchThemeService private readonly themeService: IWorkbenchThemeService, + @ITextMateService private readonly textMateService: ITextMateService ) { } diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index 943ea962324..a7190a0e6cc 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -41,7 +41,7 @@ function showReleaseNotes(instantiationService: IInstantiationService, version: export class OpenLatestReleaseNotesInBrowserAction extends Action { constructor( - @IOpenerService private openerService: IOpenerService + @IOpenerService private readonly openerService: IOpenerService ) { super('update.openLatestReleaseNotes', nls.localize('releaseNotes', "Release Notes"), null, true); } @@ -61,7 +61,7 @@ export abstract class AbstractShowReleaseNotesAction extends Action { id: string, label: string, private version: string, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(id, label, null, true); } @@ -162,7 +162,7 @@ class NeverShowAgain { return Promise.resolve(true); }); - constructor(key: string, @IStorageService private storageService: IStorageService) { + constructor(key: string, @IStorageService private readonly storageService: IStorageService) { this.key = `neverShowAgain:${key}`; } @@ -242,14 +242,14 @@ export class UpdateContribution implements IGlobalActivity { private disposables: IDisposable[] = []; constructor( - @IStorageService private storageService: IStorageService, - @ICommandService private commandService: ICommandService, - @IInstantiationService private instantiationService: IInstantiationService, - @INotificationService private notificationService: INotificationService, - @IDialogService private dialogService: IDialogService, - @IUpdateService private updateService: IUpdateService, - @IActivityService private activityService: IActivityService, - @IWindowService private windowService: IWindowService + @IStorageService private readonly storageService: IStorageService, + @ICommandService private readonly commandService: ICommandService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @INotificationService private readonly notificationService: INotificationService, + @IDialogService private readonly dialogService: IDialogService, + @IUpdateService private readonly updateService: IUpdateService, + @IActivityService private readonly activityService: IActivityService, + @IWindowService private readonly windowService: IWindowService ) { this.state = updateService.state; diff --git a/src/vs/workbench/parts/url/electron-browser/url.contribution.ts b/src/vs/workbench/parts/url/electron-browser/url.contribution.ts index efde9da784b..63e352b2003 100644 --- a/src/vs/workbench/parts/url/electron-browser/url.contribution.ts +++ b/src/vs/workbench/parts/url/electron-browser/url.contribution.ts @@ -20,8 +20,8 @@ export class OpenUrlAction extends Action { constructor( id: string, label: string, - @IURLService private urlService: IURLService, - @IQuickInputService private quickInputService: IQuickInputService, + @IURLService private readonly urlService: IURLService, + @IQuickInputService private readonly quickInputService: IQuickInputService, ) { super(id, label); } diff --git a/src/vs/workbench/parts/watermark/electron-browser/watermark.ts b/src/vs/workbench/parts/watermark/electron-browser/watermark.ts index 501cdfd65c0..db244eb6cb5 100644 --- a/src/vs/workbench/parts/watermark/electron-browser/watermark.ts +++ b/src/vs/workbench/parts/watermark/electron-browser/watermark.ts @@ -111,10 +111,10 @@ export class WatermarkContribution implements IWorkbenchContribution { constructor( @ILifecycleService lifecycleService: ILifecycleService, - @IPartService private partService: IPartService, - @IKeybindingService private keybindingService: IKeybindingService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IConfigurationService private configurationService: IConfigurationService + @IPartService private readonly partService: IPartService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { this.workbenchState = contextService.getWorkbenchState(); diff --git a/src/vs/workbench/parts/webview/electron-browser/webviewEditor.ts b/src/vs/workbench/parts/webview/electron-browser/webviewEditor.ts index 40896f71e7f..44cf74381e8 100644 --- a/src/vs/workbench/parts/webview/electron-browser/webviewEditor.ts +++ b/src/vs/workbench/parts/webview/electron-browser/webviewEditor.ts @@ -42,7 +42,7 @@ export class WebviewEditor extends BaseWebviewEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, @IThemeService themeService: IThemeService, - @IContextKeyService private _contextKeyService: IContextKeyService, + @IContextKeyService private readonly _contextKeyService: IContextKeyService, @IPartService private readonly _partService: IPartService, @IWorkspaceContextService private readonly _contextService: IWorkspaceContextService, @IInstantiationService private readonly _instantiationService: IInstantiationService, diff --git a/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts b/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts index c0a29198b6d..b31f5e15415 100644 --- a/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts +++ b/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts @@ -18,9 +18,9 @@ export class GettingStarted implements IWorkbenchContribution { private appName: string; constructor( - @IStorageService private storageService: IStorageService, + @IStorageService private readonly storageService: IStorageService, @IEnvironmentService environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private readonly telemetryService: ITelemetryService ) { this.appName = product.nameLong; diff --git a/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/telemetryOptOut.ts b/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/telemetryOptOut.ts index ac4bafa078b..38add0516f9 100644 --- a/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/telemetryOptOut.ts +++ b/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/telemetryOptOut.ts @@ -27,13 +27,13 @@ export class TelemetryOptOut implements IWorkbenchContribution { constructor( @IStorageService storageService: IStorageService, @IOpenerService openerService: IOpenerService, - @INotificationService private notificationService: INotificationService, + @INotificationService private readonly notificationService: INotificationService, @IWindowService windowService: IWindowService, @IWindowsService windowsService: IWindowsService, - @ITelemetryService private telemetryService: ITelemetryService, - @IExperimentService private experimentService: IExperimentService, - @IConfigurationService private configurationService: IConfigurationService, - @IExtensionGalleryService private galleryService: IExtensionGalleryService + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IExperimentService private readonly experimentService: IExperimentService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IExtensionGalleryService private readonly galleryService: IExtensionGalleryService ) { if (!product.telemetryOptOutUrl || storageService.get(TelemetryOptOut.TELEMETRY_OPT_OUT_SHOWN, StorageScope.GLOBAL)) { return; diff --git a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts index ab6f0fbbf0a..e44c0f8d11f 100644 --- a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts +++ b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts @@ -116,7 +116,7 @@ export class WelcomeOverlayAction extends Action { constructor( id: string, label: string, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(id, label); } @@ -157,11 +157,11 @@ class WelcomeOverlay { private _overlay: HTMLElement; constructor( - @IPartService private partService: IPartService, - @IEditorService private editorService: IEditorService, - @ICommandService private commandService: ICommandService, + @IPartService private readonly partService: IPartService, + @IEditorService private readonly editorService: IEditorService, + @ICommandService private readonly commandService: ICommandService, @IContextKeyService private readonly _contextKeyService: IContextKeyService, - @IKeybindingService private keybindingService: IKeybindingService + @IKeybindingService private readonly keybindingService: IKeybindingService ) { this._overlayVisible = OVERLAY_VISIBLE.bindTo(this._contextKeyService); this.create(); diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 9727a14e898..d39d751ebb2 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -58,7 +58,7 @@ export class WelcomePageContribution implements IWorkbenchContribution { @IFileService fileService: IFileService, @IWorkspaceContextService contextService: IWorkspaceContextService, @ILifecycleService lifecycleService: ILifecycleService, - @ICommandService private commandService: ICommandService, + @ICommandService private readonly commandService: ICommandService, ) { const enabled = isWelcomePageEnabled(configurationService, contextService); if (enabled && lifecycleService.startupKind !== StartupKind.ReloadedWindow) { @@ -124,7 +124,7 @@ export class WelcomePageAction extends Action { constructor( id: string, label: string, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(id, label); } @@ -252,21 +252,21 @@ class WelcomePage { readonly editorInput: WalkThroughInput; constructor( - @IEditorService private editorService: IEditorService, - @IInstantiationService private instantiationService: IInstantiationService, - @IWindowService private windowService: IWindowService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IConfigurationService private configurationService: IConfigurationService, - @IEnvironmentService private environmentService: IEnvironmentService, - @ILabelService private labelService: ILabelService, - @INotificationService private notificationService: INotificationService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService, - @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @IExtensionTipsService private tipsService: IExtensionTipsService, - @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, + @IEditorService private readonly editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IWindowService private readonly windowService: IWindowService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ILabelService private readonly labelService: ILabelService, + @INotificationService private readonly notificationService: INotificationService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, + @IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @IExtensionTipsService private readonly tipsService: IExtensionTipsService, + @IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService, @ILifecycleService lifecycleService: ILifecycleService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private readonly telemetryService: ITelemetryService ) { this.disposables.push(lifecycleService.onShutdown(() => this.dispose())); diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts index fd9080cdabd..e32d38a80fd 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.ts @@ -29,8 +29,8 @@ export class EditorWalkThroughAction extends Action { constructor( id: string, label: string, - @IEditorService private editorService: IEditorService, - @IInstantiationService private instantiationService: IInstantiationService + @IEditorService private readonly editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(id, label); } diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 390827101b8..533bd83e758 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -69,13 +69,13 @@ export class WalkThroughPart extends BaseEditor { @ITelemetryService telemetryService: ITelemetryService, @IThemeService themeService: IThemeService, @IModelService modelService: IModelService, - @IInstantiationService private instantiationService: IInstantiationService, - @IOpenerService private openerService: IOpenerService, - @IKeybindingService private keybindingService: IKeybindingService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IOpenerService private readonly openerService: IOpenerService, + @IKeybindingService private readonly keybindingService: IKeybindingService, @IStorageService storageService: IStorageService, - @IContextKeyService private contextKeyService: IContextKeyService, - @IConfigurationService private configurationService: IConfigurationService, - @INotificationService private notificationService: INotificationService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @INotificationService private readonly notificationService: INotificationService, @IEditorGroupsService editorGroupService: IEditorGroupsService ) { super(WalkThroughPart.ID, telemetryService, themeService, storageService); diff --git a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts index 45629ee297d..147f05b246e 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts @@ -17,10 +17,10 @@ import { Range } from 'vs/editor/common/core/range'; export class WalkThroughContentProvider implements ITextModelContentProvider, IWorkbenchContribution { constructor( - @ITextModelService private textModelResolverService: ITextModelService, - @ITextFileService private textFileService: ITextFileService, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService, + @ITextModelService private readonly textModelResolverService: ITextModelService, + @ITextFileService private readonly textFileService: ITextFileService, + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService, ) { this.textModelResolverService.registerTextModelContentProvider(Schemas.walkThrough, this); } @@ -52,10 +52,10 @@ export class WalkThroughContentProvider implements ITextModelContentProvider, IW export class WalkThroughSnippetContentProvider implements ITextModelContentProvider, IWorkbenchContribution { constructor( - @ITextModelService private textModelResolverService: ITextModelService, - @ITextFileService private textFileService: ITextFileService, - @IModeService private modeService: IModeService, - @IModelService private modelService: IModelService, + @ITextModelService private readonly textModelResolverService: ITextModelService, + @ITextFileService private readonly textFileService: ITextFileService, + @IModeService private readonly modeService: IModeService, + @IModelService private readonly modelService: IModelService, ) { this.textModelResolverService.registerTextModelContentProvider(Schemas.walkThroughSnippet, this); } diff --git a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts index 1b7bb164121..9bd77b22403 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts @@ -57,8 +57,8 @@ export class WalkThroughInput extends EditorInput { constructor( private options: WalkThroughInputOptions, - @ITextModelService private textModelResolverService: ITextModelService, - @IHashService private hashService: IHashService + @ITextModelService private readonly textModelResolverService: ITextModelService, + @IHashService private readonly hashService: IHashService ) { super(); } diff --git a/src/vs/workbench/services/activity/browser/activityService.ts b/src/vs/workbench/services/activity/browser/activityService.ts index 7afc6e1fe08..a5230bd32ae 100644 --- a/src/vs/workbench/services/activity/browser/activityService.ts +++ b/src/vs/workbench/services/activity/browser/activityService.ts @@ -16,7 +16,7 @@ export class ActivityService implements IActivityService { constructor( private activitybarPart: ActivitybarPart, private panelPart: PanelPart, - @IPanelService private panelService: IPanelService + @IPanelService private readonly panelService: IPanelService ) { } showActivity(compositeOrActionId: string, badge: IBadge, clazz?: string, priority?: number): IDisposable { diff --git a/src/vs/workbench/services/backup/node/backupFileService.ts b/src/vs/workbench/services/backup/node/backupFileService.ts index d9c46f9dc1a..f0e28bc0975 100644 --- a/src/vs/workbench/services/backup/node/backupFileService.ts +++ b/src/vs/workbench/services/backup/node/backupFileService.ts @@ -118,7 +118,7 @@ export class BackupFileService implements IBackupFileService { constructor( backupWorkspacePath: string, - @IFileService private fileService: IFileService + @IFileService private readonly fileService: IFileService ) { this.isShuttingDown = false; this.ioOperationQueues = new ResourceQueue(); diff --git a/src/vs/workbench/services/codeEditor/browser/codeEditorService.ts b/src/vs/workbench/services/codeEditor/browser/codeEditorService.ts index fec2a83d837..0c98821626b 100644 --- a/src/vs/workbench/services/codeEditor/browser/codeEditorService.ts +++ b/src/vs/workbench/services/codeEditor/browser/codeEditorService.ts @@ -14,7 +14,7 @@ import { ACTIVE_GROUP, IEditorService, SIDE_GROUP } from 'vs/workbench/services/ export class CodeEditorService extends CodeEditorServiceImpl { constructor( - @IEditorService private editorService: IEditorService, + @IEditorService private readonly editorService: IEditorService, @IThemeService themeService: IThemeService ) { super(themeService); diff --git a/src/vs/workbench/services/configuration/node/configurationEditingService.ts b/src/vs/workbench/services/configuration/node/configurationEditingService.ts index baf91eb95da..7b595d32955 100644 --- a/src/vs/workbench/services/configuration/node/configurationEditingService.ts +++ b/src/vs/workbench/services/configuration/node/configurationEditingService.ts @@ -122,15 +122,15 @@ export class ConfigurationEditingService { private queue: Queue; constructor( - @IConfigurationService private configurationService: IConfigurationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IFileService private fileService: IFileService, - @ITextModelService private textModelResolverService: ITextModelService, - @ITextFileService private textFileService: ITextFileService, - @INotificationService private notificationService: INotificationService, - @IPreferencesService private preferencesService: IPreferencesService, - @IEditorService private editorService: IEditorService + @IConfigurationService private readonly configurationService: IConfigurationService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IFileService private readonly fileService: IFileService, + @ITextModelService private readonly textModelResolverService: ITextModelService, + @ITextFileService private readonly textFileService: ITextFileService, + @INotificationService private readonly notificationService: INotificationService, + @IPreferencesService private readonly preferencesService: IPreferencesService, + @IEditorService private readonly editorService: IEditorService ) { this.queue = new Queue(); } diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts index 04965cbe28a..ed1331a4e6b 100644 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ b/src/vs/workbench/services/configuration/node/configurationService.ts @@ -693,8 +693,8 @@ export class DefaultConfigurationExportHelper { constructor( @IEnvironmentService environmentService: IEnvironmentService, - @IExtensionService private extensionService: IExtensionService, - @ICommandService private commandService: ICommandService) { + @IExtensionService private readonly extensionService: IExtensionService, + @ICommandService private readonly commandService: ICommandService) { if (environmentService.args['export-default-configuration']) { this.writeConfigModelAndQuit(environmentService.args['export-default-configuration']); } diff --git a/src/vs/workbench/services/configuration/node/jsonEditingService.ts b/src/vs/workbench/services/configuration/node/jsonEditingService.ts index 511b5f91fd0..c02b276b524 100644 --- a/src/vs/workbench/services/configuration/node/jsonEditingService.ts +++ b/src/vs/workbench/services/configuration/node/jsonEditingService.ts @@ -28,9 +28,9 @@ export class JSONEditingService implements IJSONEditingService { private queue: Queue; constructor( - @IFileService private fileService: IFileService, - @ITextModelService private textModelResolverService: ITextModelService, - @ITextFileService private textFileService: ITextFileService + @IFileService private readonly fileService: IFileService, + @ITextModelService private readonly textModelResolverService: ITextModelService, + @ITextFileService private readonly textFileService: ITextFileService ) { this.queue = new Queue(); } diff --git a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts index 44dbb4ac863..97655c13a1f 100644 --- a/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/electron-browser/configurationResolverService.ts @@ -30,10 +30,10 @@ export class ConfigurationResolverService extends AbstractVariableResolverServic envVariables: platform.IProcessEnvironment, @IEditorService editorService: IEditorService, @IEnvironmentService environmentService: IEnvironmentService, - @IConfigurationService private configurationService: IConfigurationService, - @ICommandService private commandService: ICommandService, - @IWorkspaceContextService private workspaceContextService: IWorkspaceContextService, - @IQuickInputService private quickInputService: IQuickInputService + @IConfigurationService private readonly configurationService: IConfigurationService, + @ICommandService private readonly commandService: ICommandService, + @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService, + @IQuickInputService private readonly quickInputService: IQuickInputService ) { super({ getFolderUri: (folderName: string): uri => { diff --git a/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts b/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts index b2092c9c5ff..f0a8f04c628 100644 --- a/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts +++ b/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts @@ -27,9 +27,9 @@ export class ContextMenuService extends Disposable implements IContextMenuServic get onDidContextMenu(): Event { return this._onDidContextMenu.event; } constructor( - @INotificationService private notificationService: INotificationService, - @ITelemetryService private telemetryService: ITelemetryService, - @IKeybindingService private keybindingService: IKeybindingService + @INotificationService private readonly notificationService: INotificationService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IKeybindingService private readonly keybindingService: IKeybindingService ) { super(); } diff --git a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts index 8ac304db7b9..fc83352b505 100644 --- a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts +++ b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts @@ -59,8 +59,8 @@ export class CrashReporterService implements ICrashReporterService { private isEnabled: boolean; constructor( - @ITelemetryService private telemetryService: ITelemetryService, - @IWindowsService private windowsService: IWindowsService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IWindowsService private readonly windowsService: IWindowsService, @IConfigurationService configurationService: IConfigurationService ) { const config = configurationService.getValue(TELEMETRY_SECTION_ID); diff --git a/src/vs/workbench/services/dialogs/electron-browser/dialogService.ts b/src/vs/workbench/services/dialogs/electron-browser/dialogService.ts index a268f461faf..89bb593da04 100644 --- a/src/vs/workbench/services/dialogs/electron-browser/dialogService.ts +++ b/src/vs/workbench/services/dialogs/electron-browser/dialogService.ts @@ -39,8 +39,8 @@ export class DialogService implements IDialogService { _serviceBrand: any; constructor( - @IWindowService private windowService: IWindowService, - @ILogService private logService: ILogService + @IWindowService private readonly windowService: IWindowService, + @ILogService private readonly logService: ILogService ) { } confirm(confirmation: IConfirmation): Promise { @@ -157,10 +157,10 @@ export class FileDialogService implements IFileDialogService { _serviceBrand: any; constructor( - @IWindowService private windowService: IWindowService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IHistoryService private historyService: IHistoryService, - @IEnvironmentService private environmentService: IEnvironmentService + @IWindowService private readonly windowService: IWindowService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IHistoryService private readonly historyService: IHistoryService, + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { } public defaultFilePath(schemeFilter: string): URI | undefined { diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index dddca753596..e33128bf7f3 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -58,12 +58,12 @@ export class EditorService extends Disposable implements EditorServiceImpl { private lastActiveGroupId: GroupIdentifier; constructor( - @IEditorGroupsService private editorGroupService: EditorGroupsServiceImpl, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IInstantiationService private instantiationService: IInstantiationService, - @ILabelService private labelService: ILabelService, - @IFileService private fileService: IFileService, - @IConfigurationService private configurationService: IConfigurationService + @IEditorGroupsService private readonly editorGroupService: EditorGroupsServiceImpl, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ILabelService private readonly labelService: ILabelService, + @IFileService private readonly fileService: IFileService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(); diff --git a/src/vs/workbench/services/extensions/electron-browser/inactiveExtensionUrlHandler.ts b/src/vs/workbench/services/extensions/electron-browser/inactiveExtensionUrlHandler.ts index 0d1958f91c2..a329e241f69 100644 --- a/src/vs/workbench/services/extensions/electron-browser/inactiveExtensionUrlHandler.ts +++ b/src/vs/workbench/services/extensions/electron-browser/inactiveExtensionUrlHandler.ts @@ -53,14 +53,14 @@ export class ExtensionUrlHandler implements IExtensionUrlHandler, IURLHandler { constructor( @IURLService urlService: IURLService, - @IExtensionService private extensionService: IExtensionService, - @IDialogService private dialogService: IDialogService, - @INotificationService private notificationService: INotificationService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService, - @IWindowService private windowService: IWindowService, - @IExtensionGalleryService private galleryService: IExtensionGalleryService, - @IStorageService private storageService: IStorageService + @IExtensionService private readonly extensionService: IExtensionService, + @IDialogService private readonly dialogService: IDialogService, + @INotificationService private readonly notificationService: INotificationService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, + @IWindowService private readonly windowService: IWindowService, + @IExtensionGalleryService private readonly galleryService: IExtensionGalleryService, + @IStorageService private readonly storageService: IStorageService ) { const interval = setInterval(() => this.garbageCollect(), THIRTY_SECONDS); const urlToHandleValue = this.storageService.get(URL_TO_HANDLE, StorageScope.WORKSPACE); diff --git a/src/vs/workbench/services/files/electron-browser/remoteFileService.ts b/src/vs/workbench/services/files/electron-browser/remoteFileService.ts index 945aa583248..da6dfd249e4 100644 --- a/src/vs/workbench/services/files/electron-browser/remoteFileService.ts +++ b/src/vs/workbench/services/files/electron-browser/remoteFileService.ts @@ -90,8 +90,8 @@ class WorkspaceWatchLogic extends Disposable { constructor( private _fileService: RemoteFileService, - @IConfigurationService private _configurationService: IConfigurationService, - @IWorkspaceContextService private _contextService: IWorkspaceContextService, + @IConfigurationService private readonly _configurationService: IConfigurationService, + @IWorkspaceContextService private readonly _contextService: IWorkspaceContextService, ) { super(); diff --git a/src/vs/workbench/services/history/electron-browser/history.ts b/src/vs/workbench/services/history/electron-browser/history.ts index 7dbf93bb04b..c10a07ee558 100644 --- a/src/vs/workbench/services/history/electron-browser/history.ts +++ b/src/vs/workbench/services/history/electron-browser/history.ts @@ -129,16 +129,16 @@ export class HistoryService extends Disposable implements IHistoryService { private canNavigateForwardContextKey: IContextKey; constructor( - @IEditorService private editorService: EditorServiceImpl, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IStorageService private storageService: IStorageService, - @IConfigurationService private configurationService: IConfigurationService, - @IFileService private fileService: IFileService, - @IWindowsService private windowService: IWindowsService, - @IInstantiationService private instantiationService: IInstantiationService, - @IPartService private partService: IPartService, - @IContextKeyService private contextKeyService: IContextKeyService + @IEditorService private readonly editorService: EditorServiceImpl, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IStorageService private readonly storageService: IStorageService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IFileService private readonly fileService: IFileService, + @IWindowsService private readonly windowService: IWindowsService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IPartService private readonly partService: IPartService, + @IContextKeyService private readonly contextKeyService: IContextKeyService ) { super(); diff --git a/src/vs/workbench/services/issue/electron-browser/workbenchIssueService.ts b/src/vs/workbench/services/issue/electron-browser/workbenchIssueService.ts index 6193a6c7136..ef84186551c 100644 --- a/src/vs/workbench/services/issue/electron-browser/workbenchIssueService.ts +++ b/src/vs/workbench/services/issue/electron-browser/workbenchIssueService.ts @@ -17,11 +17,11 @@ export class WorkbenchIssueService implements IWorkbenchIssueService { _serviceBrand: any; constructor( - @IIssueService private issueService: IIssueService, - @IThemeService private themeService: IThemeService, - @IExtensionManagementService private extensionManagementService: IExtensionManagementService, - @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService, - @IWindowService private windowService: IWindowService + @IIssueService private readonly issueService: IIssueService, + @IThemeService private readonly themeService: IThemeService, + @IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService, + @IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService, + @IWindowService private readonly windowService: IWindowService ) { } openReporter(dataOverrides: Partial = {}): Promise { diff --git a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts index d77fa82127c..354a3b44f43 100644 --- a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts +++ b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts @@ -47,11 +47,11 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding private resource: URI = URI.file(this.environmentService.appKeybindingsPath); constructor( - @ITextModelService private textModelResolverService: ITextModelService, - @ITextFileService private textFileService: ITextFileService, - @IFileService private fileService: IFileService, - @IConfigurationService private configurationService: IConfigurationService, - @IEnvironmentService private environmentService: IEnvironmentService + @ITextModelService private readonly textModelResolverService: ITextModelService, + @ITextFileService private readonly textFileService: ITextFileService, + @IFileService private readonly fileService: IFileService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { super(); this.queue = new Queue(); diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts index 6411011da03..57943ff811d 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts @@ -276,7 +276,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { @IEnvironmentService environmentService: IEnvironmentService, @IStatusbarService statusBarService: IStatusbarService, @IConfigurationService configurationService: IConfigurationService, - @IWindowService private windowService: IWindowService + @IWindowService private readonly windowService: IWindowService ) { super(contextKeyService, commandService, telemetryService, notificationService, statusBarService); diff --git a/src/vs/workbench/services/preferences/browser/preferencesService.ts b/src/vs/workbench/services/preferences/browser/preferencesService.ts index 397a3ecfe15..5c92d098acb 100644 --- a/src/vs/workbench/services/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/services/preferences/browser/preferencesService.ts @@ -55,21 +55,21 @@ export class PreferencesService extends Disposable implements IPreferencesServic private _defaultFolderSettingsContentModel: DefaultSettings; constructor( - @IEditorService private editorService: IEditorService, - @IEditorGroupsService private editorGroupService: IEditorGroupsService, - @IFileService private fileService: IFileService, - @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, - @INotificationService private notificationService: INotificationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IInstantiationService private instantiationService: IInstantiationService, - @IEnvironmentService private environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService, - @ITextModelService private textModelResolverService: ITextModelService, + @IEditorService private readonly editorService: IEditorService, + @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService, + @IFileService private readonly fileService: IFileService, + @IWorkspaceConfigurationService private readonly configurationService: IWorkspaceConfigurationService, + @INotificationService private readonly notificationService: INotificationService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @ITextModelService private readonly textModelResolverService: ITextModelService, @IKeybindingService keybindingService: IKeybindingService, - @IModelService private modelService: IModelService, - @IJSONEditingService private jsonEditingService: IJSONEditingService, - @IModeService private modeService: IModeService, - @ILabelService private labelService: ILabelService + @IModelService private readonly modelService: IModelService, + @IJSONEditingService private readonly jsonEditingService: IJSONEditingService, + @IModeService private readonly modeService: IModeService, + @ILabelService private readonly labelService: ILabelService ) { super(); // The default keybindings.json updates based on keyboard layouts, so here we make sure diff --git a/src/vs/workbench/services/preferences/common/keybindingsEditorModel.ts b/src/vs/workbench/services/preferences/common/keybindingsEditorModel.ts index a207dcc22be..72922eba9f8 100644 --- a/src/vs/workbench/services/preferences/common/keybindingsEditorModel.ts +++ b/src/vs/workbench/services/preferences/common/keybindingsEditorModel.ts @@ -77,7 +77,7 @@ export class KeybindingsEditorModel extends EditorModel { constructor( os: OperatingSystem, - @IKeybindingService private keybindingsService: IKeybindingService + @IKeybindingService private readonly keybindingsService: IKeybindingService ) { super(); this.modifierLabels = { diff --git a/src/vs/workbench/services/preferences/common/preferencesModels.ts b/src/vs/workbench/services/preferences/common/preferencesModels.ts index 3af1075054e..498bbc64ddd 100644 --- a/src/vs/workbench/services/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/services/preferences/common/preferencesModels.ts @@ -1144,7 +1144,7 @@ export class DefaultKeybindingsEditorModel implements IKeybindingsEditorModel(); get onDidRemoveRepository(): Event { return this._onDidRemoveProvider.event; } - constructor(@ILogService private logService: ILogService) { } + constructor(@ILogService private readonly logService: ILogService) { } registerSCMProvider(provider: ISCMProvider): ISCMRepository { this.logService.trace('SCMService#registerSCMProvider'); diff --git a/src/vs/workbench/services/search/node/ripgrepSearchUtils.ts b/src/vs/workbench/services/search/node/ripgrepSearchUtils.ts index 6672243ab58..720e020f4a2 100644 --- a/src/vs/workbench/services/search/node/ripgrepSearchUtils.ts +++ b/src/vs/workbench/services/search/node/ripgrepSearchUtils.ts @@ -84,7 +84,7 @@ export interface IOutputChannel { } export class OutputChannel implements IOutputChannel { - constructor(@ILogService private logService: ILogService) { } + constructor(@ILogService private readonly logService: ILogService) { } appendLine(msg: string): void { this.logService.debug('RipgrepSearchEH#search', msg); diff --git a/src/vs/workbench/services/search/node/searchHistoryService.ts b/src/vs/workbench/services/search/node/searchHistoryService.ts index a4357ee9850..d3435bc34be 100644 --- a/src/vs/workbench/services/search/node/searchHistoryService.ts +++ b/src/vs/workbench/services/search/node/searchHistoryService.ts @@ -17,7 +17,7 @@ export class SearchHistoryService implements ISearchHistoryService { readonly onDidClearHistory: Event = this._onDidClearHistory.event; constructor( - @IStorageService private storageService: IStorageService + @IStorageService private readonly storageService: IStorageService ) { } clearHistory(): void { diff --git a/src/vs/workbench/services/search/node/searchService.ts b/src/vs/workbench/services/search/node/searchService.ts index 337e10daf82..8020ff5fd02 100644 --- a/src/vs/workbench/services/search/node/searchService.ts +++ b/src/vs/workbench/services/search/node/searchService.ts @@ -40,15 +40,15 @@ export class SearchService extends Disposable implements ISearchService { private readonly fileIndexProviders = new Map(); constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @IModelService private modelService: IModelService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IEditorService private editorService: IEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IModelService private readonly modelService: IModelService, + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, + @IEditorService private readonly editorService: IEditorService, @IEnvironmentService environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService, - @IConfigurationService private configurationService: IConfigurationService, - @ILogService private logService: ILogService, - @IExtensionService private extensionService: IExtensionService + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @ILogService private readonly logService: ILogService, + @IExtensionService private readonly extensionService: IExtensionService ) { super(); this.diskSearch = this.instantiationService.createInstance(DiskSearch, !environmentService.isBuilt || environmentService.verbose, /*timeout=*/undefined, environmentService.debugSearch); diff --git a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts index 866ccbc1954..594d0b56c9e 100644 --- a/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts +++ b/src/vs/workbench/services/textMate/electron-browser/TMSyntax.ts @@ -433,7 +433,7 @@ class TMTokenization implements ITokenizationSupport { private readonly _initialState: StackElement; private _tokenizationWarningAlreadyShown: boolean; - constructor(scopeRegistry: TMScopeRegistry, languageId: LanguageId, grammar: IGrammar, initialState: StackElement, containsEmbeddedLanguages: boolean, @INotificationService private notificationService: INotificationService) { + constructor(scopeRegistry: TMScopeRegistry, languageId: LanguageId, grammar: IGrammar, initialState: StackElement, containsEmbeddedLanguages: boolean, @INotificationService private readonly notificationService: INotificationService) { this._scopeRegistry = scopeRegistry; this._languageId = languageId; this._grammar = grammar; diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index 4aabd7d20cd..9537d48d1f2 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -78,18 +78,18 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil constructor( resource: URI, preferredEncoding: string, - @INotificationService private notificationService: INotificationService, + @INotificationService private readonly notificationService: INotificationService, @IModeService modeService: IModeService, @IModelService modelService: IModelService, - @IFileService private fileService: IFileService, - @IInstantiationService private instantiationService: IInstantiationService, - @ITelemetryService private telemetryService: ITelemetryService, - @ITextFileService private textFileService: ITextFileService, - @IBackupFileService private backupFileService: IBackupFileService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IHashService private hashService: IHashService, - @ILogService private logService: ILogService + @IFileService private readonly fileService: IFileService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @ITextFileService private readonly textFileService: ITextFileService, + @IBackupFileService private readonly backupFileService: IBackupFileService, + @IEnvironmentService private readonly environmentService: IEnvironmentService, + @IWorkspaceContextService private readonly contextService: IWorkspaceContextService, + @IHashService private readonly hashService: IHashService, + @ILogService private readonly logService: ILogService ) { super(modelService, modeService); @@ -1126,7 +1126,7 @@ export class SaveSequentializer { class DefaultSaveErrorHandler implements ISaveErrorHandler { - constructor(@INotificationService private notificationService: INotificationService) { } + constructor(@INotificationService private readonly notificationService: INotificationService) { } onSaveError(error: any, model: TextFileEditorModel): void { this.notificationService.error(nls.localize('genericSaveError', "Failed to save '{0}': {1}", path.basename(model.getResource().fsPath), toErrorMessage(error, false))); diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts index 0359fe991ff..b8f80e3f6b6 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts @@ -50,8 +50,8 @@ export class TextFileEditorModelManager extends Disposable implements ITextFileE private mapResourceToPendingModelLoaders: ResourceMap>; constructor( - @ILifecycleService private lifecycleService: ILifecycleService, - @IInstantiationService private instantiationService: IInstantiationService + @ILifecycleService private readonly lifecycleService: ILifecycleService, + @IInstantiationService private readonly instantiationService: IInstantiationService ) { super(); diff --git a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts index 8482e1bbdad..ad1f19a9500 100644 --- a/src/vs/workbench/services/textfile/electron-browser/textFileService.ts +++ b/src/vs/workbench/services/textfile/electron-browser/textFileService.ts @@ -39,7 +39,7 @@ export class TextFileService extends AbstractTextFileService { @ILifecycleService lifecycleService: ILifecycleService, @IInstantiationService instantiationService: IInstantiationService, @IConfigurationService configurationService: IConfigurationService, - @IModeService private modeService: IModeService, + @IModeService private readonly modeService: IModeService, @IModelService modelService: IModelService, @IWindowService windowService: IWindowService, @IEnvironmentService environmentService: IEnvironmentService, @@ -48,9 +48,9 @@ export class TextFileService extends AbstractTextFileService { @IWindowsService windowsService: IWindowsService, @IHistoryService historyService: IHistoryService, @IContextKeyService contextKeyService: IContextKeyService, - @IDialogService private dialogService: IDialogService, - @IFileDialogService private fileDialogService: IFileDialogService, - @IEditorService private editorService: IEditorService + @IDialogService private readonly dialogService: IDialogService, + @IFileDialogService private readonly fileDialogService: IFileDialogService, + @IEditorService private readonly editorService: IEditorService ) { super(lifecycleService, contextService, configurationService, fileService, untitledEditorService, instantiationService, notificationService, environmentService, backupFileService, windowsService, windowService, historyService, contextKeyService, modelService); } diff --git a/src/vs/workbench/services/textfile/electron-browser/textResourcePropertiesService.ts b/src/vs/workbench/services/textfile/electron-browser/textResourcePropertiesService.ts index 8147cc37941..86503bc02d5 100644 --- a/src/vs/workbench/services/textfile/electron-browser/textResourcePropertiesService.ts +++ b/src/vs/workbench/services/textfile/electron-browser/textResourcePropertiesService.ts @@ -19,10 +19,10 @@ export class TextResourcePropertiesService implements ITextResourcePropertiesSer private remoteEnvironment: IRemoteAgentEnvironment | null = null; constructor( - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IRemoteAgentService remoteAgentService: IRemoteAgentService, - @IWindowService private windowService: IWindowService, - @IStorageService private storageService: IStorageService + @IWindowService private readonly windowService: IWindowService, + @IStorageService private readonly storageService: IStorageService ) { const remoteAgentConnection = remoteAgentService.getConnection(); if (remoteAgentConnection) { diff --git a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts index 8d2ccf80881..e274fce62fa 100644 --- a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts +++ b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts @@ -23,9 +23,9 @@ class ResourceModelCollection extends ReferenceCollection(); constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @ITextFileService private textFileService: ITextFileService, - @IFileService private fileService: IFileService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @ITextFileService private readonly textFileService: ITextFileService, + @IFileService private readonly fileService: IFileService ) { super(); } @@ -122,9 +122,9 @@ export class TextModelResolverService implements ITextModelService { private resourceModelCollection: ResourceModelCollection; constructor( - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IInstantiationService private instantiationService: IInstantiationService, - @IModelService private modelService: IModelService + @IUntitledEditorService private readonly untitledEditorService: IUntitledEditorService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IModelService private readonly modelService: IModelService ) { this.resourceModelCollection = instantiationService.createInstance(ResourceModelCollection); } diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeStore.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeStore.ts index 5f93469dc1b..6e9386b91b9 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeStore.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeStore.ts @@ -52,7 +52,7 @@ export class ColorThemeStore { public get onDidChange(): Event { return this.onDidChangeEmitter.event; } - constructor(@IExtensionService private extensionService: IExtensionService, defaultTheme: ColorThemeData) { + constructor(@IExtensionService private readonly extensionService: IExtensionService, defaultTheme: ColorThemeData) { this.extensionsColorThemes = [defaultTheme]; this.onDidChangeEmitter = new Emitter(); this.initialize(); diff --git a/src/vs/workbench/services/themes/electron-browser/fileIconThemeStore.ts b/src/vs/workbench/services/themes/electron-browser/fileIconThemeStore.ts index 238a2644b24..2ec22cfc555 100644 --- a/src/vs/workbench/services/themes/electron-browser/fileIconThemeStore.ts +++ b/src/vs/workbench/services/themes/electron-browser/fileIconThemeStore.ts @@ -48,7 +48,7 @@ export class FileIconThemeStore { public get onDidChange(): Event { return this.onDidChangeEmitter.event; } - constructor(@IExtensionService private extensionService: IExtensionService) { + constructor(@IExtensionService private readonly extensionService: IExtensionService) { this.knownIconThemes = []; this.onDidChangeEmitter = new Emitter(); this.initialize(); diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 90c579d0d73..e13b8cc4056 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -91,12 +91,12 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { constructor( container: HTMLElement, @IExtensionService extensionService: IExtensionService, - @IStorageService private storageService: IStorageService, - @IConfigurationService private configurationService: IConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService, - @IWindowService private windowService: IWindowService, - @IInstantiationService private instantiationService: IInstantiationService, - @IEnvironmentService private environmentService: IEnvironmentService + @IStorageService private readonly storageService: IStorageService, + @IConfigurationService private readonly configurationService: IConfigurationService, + @ITelemetryService private readonly telemetryService: ITelemetryService, + @IWindowService private readonly windowService: IWindowService, + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IEnvironmentService private readonly environmentService: IEnvironmentService ) { this.container = container; @@ -493,7 +493,7 @@ colorThemeSchema.register(); fileIconThemeSchema.register(); class ConfigurationWriter { - constructor(@IConfigurationService private configurationService: IConfigurationService) { + constructor(@IConfigurationService private readonly configurationService: IConfigurationService) { } public writeConfiguration(key: string, value: any, settingsTarget: ConfigurationTarget): Promise { diff --git a/src/vs/workbench/services/untitled/common/untitledEditorService.ts b/src/vs/workbench/services/untitled/common/untitledEditorService.ts index 922df53de25..6c4c8b44f9d 100644 --- a/src/vs/workbench/services/untitled/common/untitledEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledEditorService.ts @@ -123,8 +123,8 @@ export class UntitledEditorService extends Disposable implements IUntitledEditor get onDidDisposeModel(): Event { return this._onDidDisposeModel.event; } constructor( - @IInstantiationService private instantiationService: IInstantiationService, - @IConfigurationService private configurationService: IConfigurationService + @IInstantiationService private readonly instantiationService: IInstantiationService, + @IConfigurationService private readonly configurationService: IConfigurationService ) { super(); } diff --git a/src/vs/workbench/services/workspace/node/workspaceEditingService.ts b/src/vs/workbench/services/workspace/node/workspaceEditingService.ts index 50839759ebd..38bc550917e 100644 --- a/src/vs/workbench/services/workspace/node/workspaceEditingService.ts +++ b/src/vs/workbench/services/workspace/node/workspaceEditingService.ts @@ -30,15 +30,15 @@ export class WorkspaceEditingService implements IWorkspaceEditingService { _serviceBrand: any; constructor( - @IJSONEditingService private jsonEditingService: IJSONEditingService, - @IWorkspaceContextService private contextService: WorkspaceService, - @IWindowService private windowService: IWindowService, - @IWorkspaceConfigurationService private workspaceConfigurationService: IWorkspaceConfigurationService, - @IStorageService private storageService: IStorageService, - @IExtensionService private extensionService: IExtensionService, - @IBackupFileService private backupFileService: IBackupFileService, - @INotificationService private notificationService: INotificationService, - @ICommandService private commandService: ICommandService + @IJSONEditingService private readonly jsonEditingService: IJSONEditingService, + @IWorkspaceContextService private readonly contextService: WorkspaceService, + @IWindowService private readonly windowService: IWindowService, + @IWorkspaceConfigurationService private readonly workspaceConfigurationService: IWorkspaceConfigurationService, + @IStorageService private readonly storageService: IStorageService, + @IExtensionService private readonly extensionService: IExtensionService, + @IBackupFileService private readonly backupFileService: IBackupFileService, + @INotificationService private readonly notificationService: INotificationService, + @ICommandService private readonly commandService: ICommandService ) { } diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index f51dfa896d9..84d531f52bd 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -1421,7 +1421,7 @@ export class TestTextResourcePropertiesService implements ITextResourcePropertie _serviceBrand: any; constructor( - @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationService private readonly configurationService: IConfigurationService, ) { }