Integrate notebook service with notebook UI (#3143)

Port notebookView code over to notebook.component.ts.
Integrate loading of notebook contents into the UI
This commit is contained in:
Kevin Cunnane
2018-11-06 16:31:37 -08:00
committed by GitHub
parent 5da89ac05b
commit ecd40de7ec
13 changed files with 168 additions and 43 deletions

View File

@@ -17,7 +17,7 @@ export class NotebookInputModel extends EditorModel {
private dirty: boolean;
private readonly _onDidChangeDirty: Emitter<void> = this._register(new Emitter<void>());
private _providerId: string;
constructor(public readonly notebookUri: URI, private readonly handle: number, private saveHandler?: ModeViewSaveHandler) {
constructor(public readonly notebookUri: URI, private readonly handle: number, private _isTrusted: boolean = false, private saveHandler?: ModeViewSaveHandler) {
super();
this.dirty = false;
}
@@ -30,6 +30,10 @@ export class NotebookInputModel extends EditorModel {
this._providerId = value;
}
get isTrusted(): boolean {
return this._isTrusted;
}
get onDidChangeDirty(): Event<void> {
return this._onDidChangeDirty.event;
}
@@ -93,6 +97,10 @@ export class NotebookInput extends EditorInput {
return this._title;
}
public get isTrusted(): boolean {
return this._model.isTrusted;
}
public dispose(): void {
this._disposeContainer();
super.dispose();