Skip to content

Commit 0876297

Browse files
committed
Mark private service properties declarated in ctors as readonly
1 parent ad040a2 commit 0876297

289 files changed

Lines changed: 1641 additions & 1641 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
1212
export class LogsDataCleaner extends Disposable {
1313

1414
constructor(
15-
@IEnvironmentService private environmentService: IEnvironmentService
15+
@IEnvironmentService private readonly environmentService: IEnvironmentService
1616
) {
1717
super();
1818

src/vs/code/electron-browser/sharedProcess/contrib/storageDataCleaner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class StorageDataCleaner extends Disposable {
1616
private static NON_EMPTY_WORKSPACE_ID_LENGTH = 128 / 4;
1717

1818
constructor(
19-
@IEnvironmentService private environmentService: IEnvironmentService
19+
@IEnvironmentService private readonly environmentService: IEnvironmentService
2020
) {
2121
super();
2222

src/vs/code/electron-main/app.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ export class CodeApplication extends Disposable {
9595
constructor(
9696
private mainIpcServer: Server,
9797
private userEnv: IProcessEnvironment,
98-
@IInstantiationService private instantiationService: IInstantiationService,
99-
@ILogService private logService: ILogService,
100-
@IEnvironmentService private environmentService: IEnvironmentService,
101-
@ILifecycleService private lifecycleService: ILifecycleService,
102-
@IConfigurationService private configurationService: ConfigurationService,
103-
@IStateService private stateService: IStateService
98+
@IInstantiationService private readonly instantiationService: IInstantiationService,
99+
@ILogService private readonly logService: ILogService,
100+
@IEnvironmentService private readonly environmentService: IEnvironmentService,
101+
@ILifecycleService private readonly lifecycleService: ILifecycleService,
102+
@IConfigurationService private readonly configurationService: ConfigurationService,
103+
@IStateService private readonly stateService: IStateService
104104
) {
105105
super();
106106

src/vs/code/electron-main/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class ProxyAuthHandler {
3030
private disposables: IDisposable[] = [];
3131

3232
constructor(
33-
@IWindowsMainService private windowsMainService: IWindowsMainService
33+
@IWindowsMainService private readonly windowsMainService: IWindowsMainService
3434
) {
3535
const onLogin = Event.fromNodeEventEmitter<LoginEvent>(app, 'login', (event, webContents, req, authInfo, cb) => ({ event, webContents, req, authInfo, cb }));
3636
onLogin(this.onLogin, this, this.disposables);

src/vs/code/electron-main/window.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ export class CodeWindow extends Disposable implements ICodeWindow {
8080

8181
constructor(
8282
config: IWindowCreationOptions,
83-
@ILogService private logService: ILogService,
84-
@IEnvironmentService private environmentService: IEnvironmentService,
85-
@IConfigurationService private configurationService: IConfigurationService,
86-
@IStateService private stateService: IStateService,
87-
@IWorkspacesMainService private workspacesMainService: IWorkspacesMainService,
88-
@IBackupMainService private backupMainService: IBackupMainService,
89-
@IStorageMainService private storageMainService: IStorageMainService
83+
@ILogService private readonly logService: ILogService,
84+
@IEnvironmentService private readonly environmentService: IEnvironmentService,
85+
@IConfigurationService private readonly configurationService: IConfigurationService,
86+
@IStateService private readonly stateService: IStateService,
87+
@IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService,
88+
@IBackupMainService private readonly backupMainService: IBackupMainService,
89+
@IStorageMainService private readonly storageMainService: IStorageMainService
9090
) {
9191
super();
9292

src/vs/code/electron-main/windows.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,16 @@ export class WindowsManager implements IWindowsMainService {
156156

157157
constructor(
158158
private readonly machineId: string,
159-
@ILogService private logService: ILogService,
160-
@IStateService private stateService: IStateService,
161-
@IEnvironmentService private environmentService: IEnvironmentService,
162-
@ILifecycleService private lifecycleService: ILifecycleService,
163-
@IBackupMainService private backupMainService: IBackupMainService,
164-
@ITelemetryService private telemetryService: ITelemetryService,
165-
@IConfigurationService private configurationService: IConfigurationService,
166-
@IHistoryMainService private historyMainService: IHistoryMainService,
167-
@IWorkspacesMainService private workspacesMainService: IWorkspacesMainService,
168-
@IInstantiationService private instantiationService: IInstantiationService
159+
@ILogService private readonly logService: ILogService,
160+
@IStateService private readonly stateService: IStateService,
161+
@IEnvironmentService private readonly environmentService: IEnvironmentService,
162+
@ILifecycleService private readonly lifecycleService: ILifecycleService,
163+
@IBackupMainService private readonly backupMainService: IBackupMainService,
164+
@ITelemetryService private readonly telemetryService: ITelemetryService,
165+
@IConfigurationService private readonly configurationService: IConfigurationService,
166+
@IHistoryMainService private readonly historyMainService: IHistoryMainService,
167+
@IWorkspacesMainService private readonly workspacesMainService: IWorkspacesMainService,
168+
@IInstantiationService private readonly instantiationService: IInstantiationService
169169
) {
170170
this.windowsState = this.getWindowsState();
171171
if (!Array.isArray(this.windowsState.openedWindows)) {

src/vs/code/node/cliProcessMain.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ type Task = { (): Promise<void> };
6767
class Main {
6868

6969
constructor(
70-
@IEnvironmentService private environmentService: IEnvironmentService,
71-
@IExtensionManagementService private extensionManagementService: IExtensionManagementService,
72-
@IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService
70+
@IEnvironmentService private readonly environmentService: IEnvironmentService,
71+
@IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService,
72+
@IExtensionGalleryService private readonly extensionGalleryService: IExtensionGalleryService
7373
) { }
7474

7575
async run(argv: ParsedArgs): Promise<any> {

src/vs/editor/common/services/resourceConfigurationImpl.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export class TextResourceConfigurationService extends Disposable implements ITex
2020
public readonly onDidChangeConfiguration: Event<IConfigurationChangeEvent> = this._onDidChangeConfiguration.event;
2121

2222
constructor(
23-
@IConfigurationService private configurationService: IConfigurationService,
24-
@IModelService private modelService: IModelService,
25-
@IModeService private modeService: IModeService,
23+
@IConfigurationService private readonly configurationService: IConfigurationService,
24+
@IModelService private readonly modelService: IModelService,
25+
@IModeService private readonly modeService: IModeService,
2626
) {
2727
super();
2828
this._register(this.configurationService.onDidChangeConfiguration(e => this._onDidChangeConfiguration.fire(e)));

src/vs/editor/contrib/goToDefinition/goToDefinitionMouse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC
3939

4040
constructor(
4141
editor: ICodeEditor,
42-
@ITextModelService private textModelResolverService: ITextModelService,
43-
@IModeService private modeService: IModeService
42+
@ITextModelService private readonly textModelResolverService: ITextModelService,
43+
@IModeService private readonly modeService: IModeService
4444
) {
4545
this.toUnhook = [];
4646
this.decorations = [];

src/vs/editor/contrib/rename/renameInputField.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class RenameInputField implements IContentWidget, IDisposable {
2525
// Editor.IContentWidget.allowEditorOverflow
2626
public allowEditorOverflow: boolean = true;
2727

28-
constructor(editor: ICodeEditor, @IThemeService private themeService: IThemeService) {
28+
constructor(editor: ICodeEditor, @IThemeService private readonly themeService: IThemeService) {
2929
this._editor = editor;
3030
this._editor.addContentWidget(this);
3131

0 commit comments

Comments
 (0)