File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,10 +44,16 @@ export abstract class BaseTextEditor extends BaseEditor implements ITextEditor {
4444 private editorMemento : IEditorMemento < IEditorViewState > ;
4545 private inputDisposable : IDisposable | undefined ;
4646
47+ // Allow subclasses to provide a different (e.g. scoped)
48+ // instantiation service for this abstract text editor
49+ protected get instantiationService ( ) : IInstantiationService {
50+ return this . _instantiationService ;
51+ }
52+
4753 constructor (
4854 id : string ,
4955 @ITelemetryService telemetryService : ITelemetryService ,
50- @IInstantiationService protected readonly instantiationService : IInstantiationService ,
56+ @IInstantiationService private readonly _instantiationService : IInstantiationService ,
5157 @IStorageService storageService : IStorageService ,
5258 @ITextResourceConfigurationService protected readonly configurationService : ITextResourceConfigurationService ,
5359 @IThemeService protected themeService : IThemeService ,
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ export class OutputPanel extends AbstractTextResourceEditor {
4747 this . scopedInstantiationService = instantiationService ;
4848 }
4949
50+ protected get instantiationService ( ) : IInstantiationService {
51+ // Override instantiation service with our scoped service
52+ return this . scopedInstantiationService ;
53+ }
54+
5055 getId ( ) : string {
5156 return OUTPUT_PANEL_ID ;
5257 }
@@ -158,8 +163,4 @@ export class OutputPanel extends AbstractTextResourceEditor {
158163 }
159164 } ) ;
160165 }
161-
162- get instantiationService ( ) : IInstantiationService {
163- return this . scopedInstantiationService ;
164- }
165166}
You can’t perform that action at this time.
0 commit comments