Skip to content

Commit c1793c0

Browse files
author
Benjamin Pasero
committed
output - fix broken instantiation
1 parent 2832fc3 commit c1793c0

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

src/vs/workbench/browser/parts/editor/textEditor.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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,

src/vs/workbench/contrib/output/browser/outputPanel.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)