Support editor content change notification, URI property and correctly align toolbar items (#2327)

* Support editor content change notification, URI property and correctly align toolbar items

* Better fix for toolbar orientation, plus minor editor fixes
This commit is contained in:
Kevin Cunnane
2018-08-27 10:04:31 -07:00
committed by GitHub
parent 45cf626230
commit f5e2a67924
4 changed files with 50 additions and 6 deletions

View File

@@ -764,10 +764,10 @@ class WebViewWrapper extends ComponentWrapper implements sqlops.WebViewComponent
}
class EditorWrapper extends ComponentWrapper implements sqlops.EditorComponent {
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
super(proxy, handle, ModelComponentTypes.Editor, id);
this.properties = {};
this._emitterMap.set(ComponentEventType.onDidChange, new Emitter<any>());
}
public get content(): string {
@@ -783,6 +783,15 @@ class EditorWrapper extends ComponentWrapper implements sqlops.EditorComponent {
public set languageMode(v: string) {
this.setProperty('languageMode', v);
}
public get editorUri(): string {
return this.properties['editorUri'];
}
public get onContentChanged(): vscode.Event<any> {
let emitter = this._emitterMap.get(ComponentEventType.onDidChange);
return emitter && emitter.event;
}
}
class RadioButtonWrapper extends ComponentWrapper implements sqlops.RadioButtonComponent {