mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Mark private service properties declarated in ctors as readonly
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user