Fix #3420 Analyze in notebook doesn't include text (#3482)

- Add edit API that can be used in the extension
- Separated document and editor classes out since this is the point those get big. I can refactor back in if needed to ease code review
- Based this off text editing APIs but tweaked for the fact this is a cell/array based set of edits
This commit is contained in:
Kevin Cunnane
2018-12-06 10:33:32 -08:00
committed by GitHub
parent 4a7cf8d870
commit 71d3ec3616
13 changed files with 527 additions and 103 deletions

View File

@@ -11,6 +11,7 @@ import { Event, Emitter } from 'vs/base/common/event';
import { INotebookModel, ICellModel, IClientSession, IDefaultConnection } from 'sql/parts/notebook/models/modelInterfaces';
import { NotebookChangeType, CellType } from 'sql/parts/notebook/models/contracts';
import { INotebookManager } from 'sql/services/notebook/notebookService';
import { ISingleNotebookEditOperation } from 'sql/workbench/api/common/sqlExtHostTypes';
export class NotebookModelStub implements INotebookModel {
constructor(private _languageInfo?: nb.ILanguageInfo) {
@@ -67,6 +68,9 @@ export class NotebookModelStub implements INotebookModel {
saveModel(): Promise<boolean> {
throw new Error('Method not implemented.');
}
pushEditOperations(edits: ISingleNotebookEditOperation[]): void {
throw new Error('Method not implemented.');
}
}
export class NotebookManagerStub implements INotebookManager {