Mark private service properties declarated in ctors as readonly

This commit is contained in:
Matt Bierner
2019-01-04 10:57:55 -08:00
parent ad040a2f89
commit 087629786a
289 changed files with 1641 additions and 1641 deletions

View File

@@ -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<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry);
this.handleAndRegisterCustomViews();

View File

@@ -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);

View File

@@ -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 = [];

View File

@@ -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);

View File

@@ -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 = [];

View File

@@ -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);

View File

@@ -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
}

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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);