Mark injected service properties as readonly

This commit is contained in:
Matt Bierner
2018-02-15 10:38:37 -08:00
parent 8602124979
commit ae15d09cbc
52 changed files with 147 additions and 147 deletions

View File

@@ -157,9 +157,9 @@ class MainThreadDocumentAndEditorStateComputer {
constructor(
private readonly _onDidChangeState: (delta: DocumentAndEditorStateDelta) => void,
@IModelService private _modelService: IModelService,
@ICodeEditorService private _codeEditorService: ICodeEditorService,
@IWorkbenchEditorService private _workbenchEditorService: IWorkbenchEditorService
@IModelService private readonly _modelService: IModelService,
@ICodeEditorService private readonly _codeEditorService: ICodeEditorService,
@IWorkbenchEditorService private readonly _workbenchEditorService: IWorkbenchEditorService
) {
this._modelService.onModelAdded(this._updateStateOnModelAdd, this, this._toDispose);
this._modelService.onModelRemoved(this._updateState, this, this._toDispose);
@@ -299,9 +299,9 @@ export class MainThreadDocumentsAndEditors {
constructor(
extHostContext: IExtHostContext,
@IModelService private _modelService: IModelService,
@ITextFileService private _textFileService: ITextFileService,
@IWorkbenchEditorService private _workbenchEditorService: IWorkbenchEditorService,
@IModelService private readonly _modelService: IModelService,
@ITextFileService private readonly _textFileService: ITextFileService,
@IWorkbenchEditorService private readonly _workbenchEditorService: IWorkbenchEditorService,
@ICodeEditorService codeEditorService: ICodeEditorService,
@IModeService modeService: IModeService,
@IFileService fileService: IFileService,

View File

@@ -41,7 +41,7 @@ export class MainThreadEditors implements MainThreadEditorsShape {
constructor(
documentsAndEditors: MainThreadDocumentsAndEditors,
extHostContext: IExtHostContext,
@ICodeEditorService private _codeEditorService: ICodeEditorService,
@ICodeEditorService private readonly _codeEditorService: ICodeEditorService,
@IWorkbenchEditorService workbenchEditorService: IWorkbenchEditorService,
@IEditorGroupService editorGroupService: IEditorGroupService,
@ITextModelService private readonly _textModelResolverService: ITextModelService,

View File

@@ -179,9 +179,9 @@ export class TrimFinalNewLinesParticipant implements ISaveParticipantParticipant
class FormatOnSaveParticipant implements ISaveParticipantParticipant {
constructor(
@ICodeEditorService private _editorService: ICodeEditorService,
@IEditorWorkerService private _editorWorkerService: IEditorWorkerService,
@IConfigurationService private _configurationService: IConfigurationService
@ICodeEditorService private readonly _editorService: ICodeEditorService,
@IEditorWorkerService private readonly _editorWorkerService: IEditorWorkerService,
@IConfigurationService private readonly _configurationService: IConfigurationService
) {
// Nothing
}
@@ -288,8 +288,8 @@ export class SaveParticipant implements ISaveParticipant {
constructor(
extHostContext: IExtHostContext,
@IInstantiationService instantiationService: IInstantiationService,
@IProgressService2 private _progressService: IProgressService2,
@ILogService private _logService: ILogService
@IProgressService2 private readonly _progressService: IProgressService2,
@ILogService private readonly _logService: ILogService
) {
this._saveParticipants = [
instantiationService.createInstance(TrimWhitespaceParticipant),

View File

@@ -23,8 +23,8 @@ export class MainThreadTask implements MainThreadTaskShape {
constructor(
extHostContext: IExtHostContext,
@ITaskService private _taskService: ITaskService,
@IWorkspaceContextService private _workspaceContextServer: IWorkspaceContextService
@ITaskService private readonly _taskService: ITaskService,
@IWorkspaceContextService private readonly _workspaceContextServer: IWorkspaceContextService
) {
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostTask);
this._activeHandles = Object.create(null);

View File

@@ -30,9 +30,9 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
@ISearchService private readonly _searchService: ISearchService,
@IWorkspaceContextService private readonly _contextService: IWorkspaceContextService,
@ITextFileService private readonly _textFileService: ITextFileService,
@IConfigurationService private _configurationService: IConfigurationService,
@IWorkspaceEditingService private _workspaceEditingService: IWorkspaceEditingService,
@IStatusbarService private _statusbarService: IStatusbarService
@IConfigurationService private readonly _configurationService: IConfigurationService,
@IWorkspaceEditingService private readonly _workspaceEditingService: IWorkspaceEditingService,
@IStatusbarService private readonly _statusbarService: IStatusbarService
) {
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostWorkspace);
this._contextService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspace, this, this._toDispose);