Revert "Revert "Remove typings and replace missing methods with vscodes (#8217)"" (#8242)

* Revert "Revert "Remove typings and replace missing methods with vscodes (#8217)" (#8240)"

This reverts commit e801a04bcf.

* fix runtime error

* add tests for chartview
This commit is contained in:
Anthony Dresser
2019-11-06 15:00:34 -08:00
committed by GitHub
parent df6b6ded33
commit 564f78b6f6
185 changed files with 670 additions and 43395 deletions

View File

@@ -33,6 +33,7 @@ import { viewColumnToEditorGroup } from 'vs/workbench/api/common/shared/editor';
import { notebookModeId } from 'sql/workbench/browser/customInputConverter';
import { localize } from 'vs/nls';
import { IFileService } from 'vs/platform/files/common/files';
import { find } from 'vs/base/common/arrays';
class MainThreadNotebookEditor extends Disposable {
private _contentChangedEmitter = new Emitter<NotebookContentChange>();
@@ -372,7 +373,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
let cell: ICellModel;
if (cellUri) {
let uriString = URI.revive(cellUri).toString();
cell = editor.cells.find(c => c.cellUri.toString() === uriString);
cell = find(editor.cells, c => c.cellUri.toString() === uriString);
// If it's markdown what should we do? Show notification??
} else {
// Use the active cell in this case, or 1st cell if there's none active
@@ -394,11 +395,11 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
let endCell: ICellModel;
if (startCellUri) {
let uriString = URI.revive(startCellUri).toString();
startCell = editor.cells.find(c => c.cellUri.toString() === uriString);
startCell = find(editor.cells, c => c.cellUri.toString() === uriString);
}
if (endCellUri) {
let uriString = URI.revive(endCellUri).toString();
endCell = editor.cells.find(c => c.cellUri.toString() === uriString);
endCell = find(editor.cells, c => c.cellUri.toString() === uriString);
}
return editor.runAllCells(startCell, endCell);
}
@@ -412,7 +413,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
let cell: ICellModel;
if (cellUri) {
let uriString = URI.revive(cellUri).toString();
cell = editor.cells.find(c => c.cellUri.toString() === uriString);
cell = find(editor.cells, c => c.cellUri.toString() === uriString);
// If it's markdown what should we do? Show notification??
} else {
// Use the active cell in this case, or 1st cell if there's none active