Add back Notebook Completion List IntelliSense (#3520)

* Static notebook intellisense working

* Intellisense dynamic cells working

* Remove launch.json erroneous change

* PR comments #1

* PR feedback to change a minor condition
This commit is contained in:
Chris LaFreniere
2018-12-07 18:04:32 -08:00
committed by GitHub
parent e3bce7172c
commit 5adcabc8de
13 changed files with 189 additions and 56 deletions

View File

@@ -16,6 +16,7 @@ import { ModelFactory } from 'sql/parts/notebook/models/modelFactory';
import { IConnectionProfile } from 'sql/parts/connection/common/interfaces';
import { NotebookInput } from 'sql/parts/notebook/notebookInput';
import { ISingleNotebookEditOperation } from 'sql/workbench/api/common/sqlExtHostTypes';
import { ICellModel, INotebookModel } from 'sql/parts/notebook/models/modelInterfaces';
export const SERVICE_ID = 'notebookService';
export const INotebookService = createDecorator<INotebookService>(SERVICE_ID);
@@ -93,6 +94,8 @@ export interface INotebookParams extends IBootstrapParams {
export interface INotebookEditor {
readonly notebookParams: INotebookParams;
readonly id: string;
readonly cells?: ICellModel[];
readonly modelReady: Promise<INotebookModel>;
isDirty(): boolean;
isActive(): boolean;
isVisible(): boolean;

View File

@@ -73,6 +73,7 @@ export class NotebookService extends Disposable implements INotebookService {
private _managers: Map<string, INotebookManager> = new Map();
private _onNotebookEditorAdd = new Emitter<INotebookEditor>();
private _onNotebookEditorRemove = new Emitter<INotebookEditor>();
private _onCellChanged = new Emitter<INotebookEditor>();
private _onNotebookEditorRename = new Emitter<INotebookEditor>();
private _editors = new Map<string, INotebookEditor>();
private _fileToProviders = new Map<string, NotebookProviderRegistration>();
@@ -184,6 +185,9 @@ export class NotebookService extends Disposable implements INotebookService {
get onNotebookEditorRemove(): Event<INotebookEditor> {
return this._onNotebookEditorRemove.event;
}
get onCellChanged(): Event<INotebookEditor> {
return this._onCellChanged.event;
}
get onNotebookEditorRename(): Event<INotebookEditor> {
return this._onNotebookEditorRename.event;