diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index e9feea81e13c7bdf8bfb1d5edf1026b83702c677..82b66dc7bf62361e460a38044236469fed08711d 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -41,7 +41,7 @@ import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService import { ICommandService } from 'vs/platform/commands/common/commands'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { IContentWidgetData, IOverlayWidgetData, View } from 'vs/editor/browser/view/viewImpl'; -import { IEditorContributionCtor, EditorAction, EditorExtensionsRegistry } from 'vs/editor/browser/editorExtensions'; +import { IEditorContributionCtor, EditorExtensionsRegistry } from 'vs/editor/browser/editorExtensions'; import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { InternalEditorAction } from 'vs/editor/common/editorAction'; import { ICommandDelegate } from 'vs/editor/browser/view/viewController'; @@ -52,6 +52,26 @@ import { ClassName } from 'vs/editor/common/model/intervalTree'; let EDITOR_ID = 0; +export interface ICodeEditorWidgetOptions { + /** + * Is this a simple widget (not a real code editor) ? + * Defaults to false. + */ + isSimpleWidget?: boolean; + + /** + * Contributions to instantiate. + * Defaults to EditorExtensionsRegistry.getEditorContributions(). + */ + contributions?: IEditorContributionCtor[]; + + /** + * Telemetry data associated with this CodeEditorWidget. + * Defaults to null. + */ + telemetryData?: object; +} + export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeEditor { //#region Eventing @@ -143,6 +163,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE //#endregion public readonly isSimpleWidget: boolean; + private readonly _telemetryData: object; private readonly domElement: HTMLElement; private readonly id: number; @@ -182,7 +203,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE constructor( domElement: HTMLElement, options: editorOptions.IEditorOptions, - isSimpleWidget: boolean, + codeEditorWidgetOptions: ICodeEditorWidgetOptions, @IInstantiationService instantiationService: IInstantiationService, @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, @@ -195,7 +216,8 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE this.id = (++EDITOR_ID); this._decorationTypeKeysToIds = {}; this._decorationTypeSubtypes = {}; - this.isSimpleWidget = isSimpleWidget; + this.isSimpleWidget = codeEditorWidgetOptions.isSimpleWidget || false; + this._telemetryData = codeEditorWidgetOptions.telemetryData || null; options = options || {}; this._configuration = this._register(this._createConfiguration(options)); @@ -230,7 +252,10 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE this.contentWidgets = {}; this.overlayWidgets = {}; - let contributions = this._getContributions(); + let contributions: IEditorContributionCtor[] = codeEditorWidgetOptions.contributions; + if (!Array.isArray(contributions)) { + contributions = EditorExtensionsRegistry.getEditorContributions(); + } for (let i = 0, len = contributions.length; i < len; i++) { let ctor = contributions[i]; try { @@ -241,7 +266,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE } } - this._getActions().forEach((action) => { + EditorExtensionsRegistry.getEditorActions().forEach((action) => { const internalAction = new InternalEditorAction( action.id, action.label, @@ -264,14 +289,6 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE return new Configuration(options, this.domElement); } - protected _getContributions(): IEditorContributionCtor[] { - return EditorExtensionsRegistry.getEditorContributions(); - } - - protected _getActions(): EditorAction[] { - return EditorExtensionsRegistry.getEditorActions(); - } - public getId(): string { return this.getEditorType() + ':' + this.id; } @@ -1478,7 +1495,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE "EditorTelemetryData" : {} */ public getTelemetryData(): { [key: string]: any; } { - return null; + return this._telemetryData; } } diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index e766e3da62e590729004b5d6c3551250daa80706..12212dd75c2f864ff103fed15a61549938369188 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -469,7 +469,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE } protected _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: editorOptions.IEditorOptions): CodeEditorWidget { - return instantiationService.createInstance(CodeEditorWidget, container, options, false); + return instantiationService.createInstance(CodeEditorWidget, container, options, {}); } public dispose(): void { diff --git a/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts b/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts index d459bb2087e6ce2f335061c30569f6425b962fb7..9f5b473d29b8e2703a8f8e1998aba7ef7c079566 100644 --- a/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts +++ b/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts @@ -33,7 +33,7 @@ export class EmbeddedCodeEditorWidget extends CodeEditorWidget { @IThemeService themeService: IThemeService, @INotificationService notificationService: INotificationService ) { - super(domElement, parentEditor.getRawConfiguration(), false, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService); + super(domElement, parentEditor.getRawConfiguration(), {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService); this._parentEditor = parentEditor; this._overwriteOptions = options; diff --git a/src/vs/editor/standalone/browser/standaloneCodeEditor.ts b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts index dd0969f9f16e958038d00cc637686e140bd2d14b..22b23704de272377a8937d44e787a396402451ee 100644 --- a/src/vs/editor/standalone/browser/standaloneCodeEditor.ts +++ b/src/vs/editor/standalone/browser/standaloneCodeEditor.ts @@ -175,7 +175,7 @@ export class StandaloneCodeEditor extends CodeEditorWidget implements IStandalon ? nls.localize('accessibilityHelpMessageIE', "Press Ctrl+F1 for Accessibility Options.") : nls.localize('accessibilityHelpMessage', "Press Alt+F1 for Accessibility Options.") ); - super(domElement, options, false, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService); + super(domElement, options, {}, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService); if (keybindingService instanceof StandaloneKeybindingService) { this._standaloneKeybindingService = keybindingService; diff --git a/src/vs/editor/test/browser/testCodeEditor.ts b/src/vs/editor/test/browser/testCodeEditor.ts index 86dda0c7543977d608bdb965dade02f3cd783a3e..79ae7e5d01751fbe5916cd6bff370c9237aa6ef6 100644 --- a/src/vs/editor/test/browser/testCodeEditor.ts +++ b/src/vs/editor/test/browser/testCodeEditor.ts @@ -14,12 +14,11 @@ import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { TextModel } from 'vs/editor/common/model/textModel'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; -import { EditorAction } from 'vs/editor/browser/editorExtensions'; import { ITextModel } from 'vs/editor/common/model'; import { TestNotificationService } from 'vs/platform/notification/test/common/testNotificationService'; import { INotificationService } from 'vs/platform/notification/common/notification'; -import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget'; -import { IConstructorSignature1 } from 'vs/platform/instantiation/common/instantiation'; +import { CodeEditorWidget, ICodeEditorWidgetOptions, } from 'vs/editor/browser/widget/codeEditorWidget'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { TestCodeEditorService, TestCommandService } from 'vs/editor/test/browser/editorTestServices'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; import { ICommandService } from 'vs/platform/commands/common/commands'; @@ -28,13 +27,6 @@ import { IThemeService } from 'vs/platform/theme/common/themeService'; export class TestCodeEditor extends CodeEditorWidget implements editorBrowser.ICodeEditor { - protected _getContributions(): IConstructorSignature1[] { - return []; - } - protected _getActions(): EditorAction[] { - return []; - } - //#region testing overrides protected _createConfiguration(options: editorOptions.IEditorOptions): editorCommon.IConfiguration { return new TestConfiguration(options); @@ -95,7 +87,7 @@ export function withTestCodeEditor(text: string[], options: TestCodeEditorCreati export function createTestCodeEditor(options: TestCodeEditorCreationOptions): TestCodeEditor { const services: ServiceCollection = options.serviceCollection || new ServiceCollection(); - const instantiationService = new InstantiationService(services); + const instantiationService: IInstantiationService = new InstantiationService(services); if (!services.has(ICodeEditorService)) { services.set(ICodeEditorService, new TestCodeEditorService()); @@ -113,7 +105,15 @@ export function createTestCodeEditor(options: TestCodeEditorCreationOptions): Te services.set(IThemeService, new TestThemeService()); } - const editor = instantiationService.createInstance(TestCodeEditor, new TestEditorDomElement(), options, false); + const codeEditorWidgetOptions: ICodeEditorWidgetOptions = { + contributions: [] + }; + const editor = instantiationService.createInstance( + TestCodeEditor, + new TestEditorDomElement(), + options, + codeEditorWidgetOptions + ); editor.setModel(options.model); return editor; } diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index 0c0c2f2fa1d1cb8498548eb259fe9aac11d0ac91..5e78e04749948ceb9e7c168e6ecb61640576a228 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -182,7 +182,7 @@ export abstract class BaseTextEditor extends BaseEditor { protected createEditorControl(parent: HTMLElement, configuration: IEditorOptions): IEditor { // Use a getter for the instantiation service since some subclasses might use scoped instantiation services - return this.instantiationService.createInstance(CodeEditorWidget, parent, configuration, false); + return this.instantiationService.createInstance(CodeEditorWidget, parent, configuration, {}); } public setInput(input: EditorInput, options?: EditorOptions): TPromise { diff --git a/src/vs/workbench/parts/debug/electron-browser/breakpointWidget.ts b/src/vs/workbench/parts/debug/electron-browser/breakpointWidget.ts index 7104aa7254f524e901845b2fe5f5390699d4d455..99a710bbbd403357e8ae012dfc63b7aea7cee40e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/breakpointWidget.ts +++ b/src/vs/workbench/parts/debug/electron-browser/breakpointWidget.ts @@ -34,6 +34,7 @@ import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService import { transparent, editorForeground } from 'vs/platform/theme/common/colorRegistry'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IDecorationOptions } from 'vs/editor/common/editorCommon'; +import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget'; const $ = dom.$; const IPrivateBreakopintWidgetService = createDecorator('privateBreakopintWidgetService'); @@ -47,7 +48,7 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakopintWi public _serviceBrand: any; private selectContainer: HTMLElement; - private input: SimpleDebugEditor; + private input: CodeEditorWidget; private toDispose: lifecycle.IDisposable[]; private conditionInput = ''; private hitCountInput = ''; @@ -202,7 +203,8 @@ export class BreakpointWidget extends ZoneWidget implements IPrivateBreakopintWi [IContextKeyService, scopedContextKeyService], [IPrivateBreakopintWidgetService, this])); const options = SimpleDebugEditor.getEditorOptions(); - this.input = scopedInstatiationService.createInstance(SimpleDebugEditor, container, options); + const codeEditorWidgetOptions = SimpleDebugEditor.getCodeEditorWidgetOptions(); + this.input = scopedInstatiationService.createInstance(CodeEditorWidget, container, options, codeEditorWidgetOptions); CONTEXT_IN_BREAKPOINT_WIDGET.bindTo(scopedContextKeyService).set(true); const model = this.modelService.createModel('', null, uri.parse(`${DEBUG_SCHEME}:breakpointinput`), true); this.input.setModel(model); diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index f11e1016db687f3a02460465795d80544c2829a8..0a30add4f143f6abd14b3627bfc4882d8826c5ec 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -43,6 +43,7 @@ import { memoize } from 'vs/base/common/decorators'; import { dispose } from 'vs/base/common/lifecycle'; import { OpenMode, ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget'; const $ = dom.$; @@ -75,7 +76,7 @@ export class Repl extends Panel implements IPrivateReplService { private renderer: ReplExpressionsRenderer; private container: HTMLElement; private treeContainer: HTMLElement; - private replInput: SimpleDebugEditor; + private replInput: CodeEditorWidget; private replInputContainer: HTMLElement; private refreshTimeoutHandle: number; private actions: IAction[]; @@ -174,7 +175,7 @@ export class Repl extends Panel implements IPrivateReplService { const scopedInstantiationService = this.instantiationService.createChild(new ServiceCollection( [IContextKeyService, scopedContextKeyService], [IPrivateReplService, this])); - this.replInput = scopedInstantiationService.createInstance(SimpleDebugEditor, this.replInputContainer, SimpleDebugEditor.getEditorOptions()); + this.replInput = scopedInstantiationService.createInstance(CodeEditorWidget, this.replInputContainer, SimpleDebugEditor.getEditorOptions(), SimpleDebugEditor.getCodeEditorWidgetOptions()); modes.SuggestRegistry.register({ scheme: debug.DEBUG_SCHEME, hasAccessToAllModels: true }, { triggerCharacters: ['.'], diff --git a/src/vs/workbench/parts/debug/electron-browser/simpleDebugEditor.ts b/src/vs/workbench/parts/debug/electron-browser/simpleDebugEditor.ts index fd1e6e04bf5843b5f982cea9d399fd7a285038ca..720b75f1cad2d84908a4093568e48d3bc924ca5b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/simpleDebugEditor.ts +++ b/src/vs/workbench/parts/debug/electron-browser/simpleDebugEditor.ts @@ -4,12 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; -import { EditorAction, EditorExtensionsRegistry, IEditorContributionCtor } from 'vs/editor/browser/editorExtensions'; -import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; -import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget'; -import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { ICommandService } from 'vs/platform/commands/common/commands'; +import { ICodeEditorWidgetOptions } from 'vs/editor/browser/widget/codeEditorWidget'; // Allowed Editor Contributions: import { MenuPreventer } from 'vs/workbench/parts/codeEditor/electron-browser/menuPreventer'; @@ -18,36 +13,21 @@ import { ContextMenuController } from 'vs/editor/contrib/contextmenu/contextmenu import { SuggestController } from 'vs/editor/contrib/suggest/suggestController'; import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2'; import { TabCompletionController } from 'vs/workbench/parts/snippets/electron-browser/tabCompletion'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { INotificationService } from 'vs/platform/notification/common/notification'; -export class SimpleDebugEditor extends CodeEditorWidget { - constructor( - domElement: HTMLElement, - options: IEditorOptions, - @IInstantiationService instantiationService: IInstantiationService, - @ICodeEditorService codeEditorService: ICodeEditorService, - @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService, - @IThemeService themeService: IThemeService, - @INotificationService notificationService: INotificationService, - ) { - super(domElement, options, true, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService); - } - - protected _getContributions(): IEditorContributionCtor[] { - return [ - MenuPreventer, - SelectionClipboard, - ContextMenuController, - SuggestController, - SnippetController2, - TabCompletionController, - ]; - } +export class SimpleDebugEditor { - protected _getActions(): EditorAction[] { - return EditorExtensionsRegistry.getEditorActions(); + public static getCodeEditorWidgetOptions(): ICodeEditorWidgetOptions { + return { + isSimpleWidget: true, + contributions: [ + MenuPreventer, + SelectionClipboard, + ContextMenuController, + SuggestController, + SnippetController2, + TabCompletionController, + ] + }; } public static getEditorOptions(): IEditorOptions { diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index d3247d4fdc50617c28e9bde08ce3b8f0e9ec715e..70fd701d488b6e95285d679d696a2aa546f45677 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -33,7 +33,7 @@ import { SettingsEditorModel, DefaultSettingsEditorModel } from 'vs/workbench/se import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { SearchWidget, SettingsTargetsWidget, SettingsTarget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets'; import { ContextKeyExpr, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { registerEditorContribution, Command, IEditorContributionCtor } from 'vs/editor/browser/editorExtensions'; +import { registerEditorContribution, Command, IEditorContributionCtor, EditorExtensionsRegistry } from 'vs/editor/browser/editorExtensions'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IStorageService } from 'vs/platform/storage/common/storage'; @@ -965,8 +965,15 @@ export class DefaultPreferencesEditor extends BaseTextEditor { super(DefaultPreferencesEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, textFileService, editorGroupService); } + private static _getContributions(): IEditorContributionCtor[] { + let skipContributions = [FoldingController.prototype, SelectionHighlighter.prototype, FindController.prototype]; + let contributions = EditorExtensionsRegistry.getEditorContributions().filter(c => skipContributions.indexOf(c.prototype) === -1); + contributions.push(DefaultSettingsEditorContribution); + return contributions; + } + public createEditorControl(parent: HTMLElement, configuration: IEditorOptions): editorCommon.IEditor { - const editor = this.instantiationService.createInstance(DefaultPreferencesCodeEditor, parent, configuration, false); + const editor = this.instantiationService.createInstance(CodeEditorWidget, parent, configuration, { contributions: DefaultPreferencesEditor._getContributions() }); // Inform user about editor being readonly if user starts type this.toUnbind.push(editor.onDidType(() => this.showReadonlyHint(editor))); @@ -1030,18 +1037,6 @@ export class DefaultPreferencesEditor extends BaseTextEditor { } } -class DefaultPreferencesCodeEditor extends CodeEditorWidget { - - protected _getContributions(): IEditorContributionCtor[] { - let contributions = super._getContributions(); - let skipContributions = [FoldingController.prototype, SelectionHighlighter.prototype, FindController.prototype]; - contributions = contributions.filter(c => skipContributions.indexOf(c.prototype) === -1); - contributions.push(DefaultSettingsEditorContribution); - return contributions; - } - -} - interface ISettingsEditorContribution extends editorCommon.IEditorContribution { updatePreferencesRenderer(associatedPreferencesModelUri: URI): TPromise>; diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 3f4b727db77d551ed9c4c157592c8c9c89303e1a..4e75d60bd26e102c8ceaf797bb6368f059cd7b4d 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -29,8 +29,7 @@ import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/cont import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { once } from 'vs/base/common/event'; import { isObject } from 'vs/base/common/types'; -import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; -import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; +import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { registerColor, focusBorder, textLinkForeground, textLinkActiveForeground, textPreformatForeground, contrastBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry'; @@ -55,27 +54,6 @@ interface IWalkThroughEditorViewState { viewState: IViewState; } -class WalkThroughCodeEditor extends CodeEditorWidget { - - constructor( - domElement: HTMLElement, - options: IEditorOptions, - private telemetryData: Object, - @IInstantiationService instantiationService: IInstantiationService, - @ICodeEditorService codeEditorService: ICodeEditorService, - @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService, - @IThemeService themeService: IThemeService, - @INotificationService notificationService: INotificationService, - ) { - super(domElement, options, false, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService); - } - - getTelemetryData() { - return this.telemetryData; - } -} - export class WalkThroughPart extends BaseEditor { static readonly ID: string = 'workbench.editor.walkThroughPart'; @@ -330,7 +308,9 @@ export class WalkThroughPart extends BaseEditor { target: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined, snippet: i }; - const editor = this.instantiationService.createInstance(WalkThroughCodeEditor, div, options, telemetryData); + const editor = this.instantiationService.createInstance(CodeEditorWidget, div, options, { + telemetryData: telemetryData + }); editor.setModel(model); this.contentDisposables.push(editor);