mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-28 09:35:38 -05:00
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { IPanelView } from 'sql/base/browser/ui/panel/panel';
|
|
import { Disposable } from 'vs/base/common/lifecycle';
|
|
import * as DOM from 'vs/base/browser/dom';
|
|
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
|
import { DesignerScriptEditor } from 'sql/workbench/browser/designer/designerScriptEditor';
|
|
|
|
export class DesignerScriptEditorTabPanelView extends Disposable implements IPanelView {
|
|
private _textEditor: DesignerScriptEditor;
|
|
|
|
constructor(private _instantiationService: IInstantiationService) {
|
|
super();
|
|
}
|
|
|
|
render(container: HTMLElement): void {
|
|
this._textEditor = this._instantiationService.createInstance(DesignerScriptEditor, container);
|
|
}
|
|
|
|
layout(dimension: DOM.Dimension): void {
|
|
this._textEditor.layout(dimension);
|
|
}
|
|
|
|
set content(content: string) {
|
|
if (this._textEditor) {
|
|
this._textEditor.content = content;
|
|
}
|
|
}
|
|
}
|