@theia/plugin-ext 1.40.1 → 1.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/collections.d.ts +4 -0
- package/lib/common/collections.d.ts.map +1 -1
- package/lib/common/collections.js +17 -1
- package/lib/common/collections.js.map +1 -1
- package/lib/common/errors.d.ts +14 -0
- package/lib/common/errors.d.ts.map +1 -1
- package/lib/common/errors.js +17 -1
- package/lib/common/errors.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +286 -6
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js +20 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +27 -5
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts +5 -2
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +21 -12
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.js +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
- package/lib/hosted/node/plugin-reader.d.ts +1 -1
- package/lib/hosted/node/plugin-reader.d.ts.map +1 -1
- package/lib/hosted/node/plugin-reader.js +1 -1
- package/lib/hosted/node/plugin-reader.js.map +1 -1
- package/lib/hosted/node/scanners/grammars-reader.d.ts +1 -1
- package/lib/hosted/node/scanners/grammars-reader.d.ts.map +1 -1
- package/lib/hosted/node/scanners/grammars-reader.js +5 -5
- package/lib/hosted/node/scanners/grammars-reader.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts +6 -6
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +54 -41
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
- package/lib/main/browser/editors-and-documents-main.js +1 -0
- package/lib/main/browser/editors-and-documents-main.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/languages-main.js +6 -4
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/main-context.d.ts.map +1 -1
- package/lib/main/browser/main-context.js +18 -0
- package/lib/main/browser/main-context.js.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.js +6 -3
- package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.d.ts +50 -0
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js +189 -0
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-documents-main.d.ts +22 -0
- package/lib/main/browser/notebooks/notebook-documents-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-documents-main.js +133 -0
- package/lib/main/browser/notebooks/notebook-documents-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-dto.d.ts +15 -0
- package/lib/main/browser/notebooks/notebook-dto.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-dto.js +138 -0
- package/lib/main/browser/notebooks/notebook-dto.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-editors-main.d.ts +20 -0
- package/lib/main/browser/notebooks/notebook-editors-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-editors-main.js +58 -0
- package/lib/main/browser/notebooks/notebook-editors-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-kernels-main.d.ts +42 -0
- package/lib/main/browser/notebooks/notebook-kernels-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-kernels-main.js +230 -0
- package/lib/main/browser/notebooks/notebook-kernels-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-renderers-main.d.ts +12 -0
- package/lib/main/browser/notebooks/notebook-renderers-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-renderers-main.js +39 -0
- package/lib/main/browser/notebooks/notebook-renderers-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebooks-main.d.ts +20 -0
- package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebooks-main.js +103 -0
- package/lib/main/browser/notebooks/notebooks-main.js.map +1 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +35 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.js +204 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts +13 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js +375 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -0
- package/lib/main/browser/notebooks/renderers/webview-communication.d.ts +52 -0
- package/lib/main/browser/notebooks/renderers/webview-communication.d.ts.map +1 -0
- package/{src/typings/index.d.ts → lib/main/browser/notebooks/renderers/webview-communication.js} +8 -11
- package/lib/main/browser/notebooks/renderers/webview-communication.js.map +1 -0
- package/lib/main/browser/plugin-contribution-handler.d.ts +3 -0
- package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.js +31 -3
- package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.js +3 -2
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.d.ts.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.js +6 -0
- package/lib/main/browser/plugin-icon-theme-service.js.map +1 -1
- package/lib/main/browser/plugin-shared-style.d.ts.map +1 -1
- package/lib/main/browser/plugin-shared-style.js +2 -1
- package/lib/main/browser/plugin-shared-style.js.map +1 -1
- package/lib/main/browser/tasks-main.js +2 -2
- package/lib/main/browser/tasks-main.js.map +1 -1
- package/lib/main/browser/terminal-main.d.ts +2 -2
- package/lib/main/browser/terminal-main.d.ts.map +1 -1
- package/lib/main/browser/terminal-main.js +4 -4
- package/lib/main/browser/terminal-main.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +3 -1
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +32 -1
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/browser/view/tree-views-main.d.ts +2 -1
- package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
- package/lib/main/browser/view/tree-views-main.js +10 -0
- package/lib/main/browser/view/tree-views-main.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +1 -0
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +5 -0
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/node/errors.spec.d.ts +2 -0
- package/lib/main/node/errors.spec.d.ts.map +1 -0
- package/lib/main/node/errors.spec.js +36 -0
- package/lib/main/node/errors.spec.js.map +1 -0
- package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts +5 -2
- package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts.map +1 -1
- package/lib/main/node/handlers/plugin-theia-directory-handler.js +14 -8
- package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.d.ts +2 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.d.ts.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.js +13 -5
- package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
- package/lib/main/node/paths/plugin-paths-service.d.ts.map +1 -1
- package/lib/main/node/paths/plugin-paths-service.js +4 -9
- package/lib/main/node/paths/plugin-paths-service.js.map +1 -1
- package/lib/main/node/plugin-deployer-directory-handler-context-impl.js +8 -8
- package/lib/main/node/plugin-deployer-directory-handler-context-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-entry-impl.d.ts +2 -2
- package/lib/main/node/plugin-deployer-entry-impl.d.ts.map +1 -1
- package/lib/main/node/plugin-deployer-entry-impl.js +9 -7
- package/lib/main/node/plugin-deployer-entry-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-impl.d.ts +2 -2
- package/lib/main/node/plugin-deployer-impl.d.ts.map +1 -1
- package/lib/main/node/plugin-deployer-impl.js +16 -24
- package/lib/main/node/plugin-deployer-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-proxy-entry-impl.d.ts +2 -2
- package/lib/main/node/plugin-deployer-proxy-entry-impl.d.ts.map +1 -1
- package/lib/main/node/plugin-github-resolver.d.ts.map +1 -1
- package/lib/main/node/plugin-github-resolver.js +14 -6
- package/lib/main/node/plugin-github-resolver.js.map +1 -1
- package/lib/main/node/plugin-http-resolver.d.ts.map +1 -1
- package/lib/main/node/plugin-http-resolver.js +14 -6
- package/lib/main/node/plugin-http-resolver.js.map +1 -1
- package/lib/main/node/temp-dir-util.d.ts +1 -0
- package/lib/main/node/temp-dir-util.d.ts.map +1 -1
- package/lib/main/node/temp-dir-util.js +12 -3
- package/lib/main/node/temp-dir-util.js.map +1 -1
- package/lib/plugin/editors-and-documents.d.ts +1 -1
- package/lib/plugin/editors-and-documents.d.ts.map +1 -1
- package/lib/plugin/editors-and-documents.js +1 -1
- package/lib/plugin/editors-and-documents.js.map +1 -1
- package/lib/plugin/notebook/notebook-document.d.ts +62 -0
- package/lib/plugin/notebook/notebook-document.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-document.js +373 -0
- package/lib/plugin/notebook/notebook-document.js.map +1 -0
- package/lib/plugin/notebook/notebook-documents.d.ts +17 -0
- package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-documents.js +48 -0
- package/lib/plugin/notebook/notebook-documents.js.map +1 -0
- package/lib/plugin/notebook/notebook-editor.d.ts +21 -0
- package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-editor.js +99 -0
- package/lib/plugin/notebook/notebook-editor.js.map +1 -0
- package/lib/plugin/notebook/notebook-editors.d.ts +14 -0
- package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-editors.js +65 -0
- package/lib/plugin/notebook/notebook-editors.js.map +1 -0
- package/lib/plugin/notebook/notebook-kernels.d.ts +37 -0
- package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-kernels.js +516 -0
- package/lib/plugin/notebook/notebook-kernels.js.map +1 -0
- package/lib/plugin/notebook/notebook-renderers.d.ts +14 -0
- package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-renderers.js +63 -0
- package/lib/plugin/notebook/notebook-renderers.js.map +1 -0
- package/lib/plugin/notebook/notebooks.d.ts +57 -0
- package/lib/plugin/notebook/notebooks.d.ts.map +1 -0
- package/lib/plugin/notebook/notebooks.js +295 -0
- package/lib/plugin/notebook/notebooks.js.map +1 -0
- package/lib/plugin/plugin-context.d.ts +2 -2
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +79 -59
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts +2 -0
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-manager.js +9 -1
- package/lib/plugin/plugin-manager.js.map +1 -1
- package/lib/plugin/tasks/task-provider.d.ts +2 -2
- package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
- package/lib/plugin/tasks/task-provider.js +7 -10
- package/lib/plugin/tasks/task-provider.js.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +3 -2
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.js +18 -13
- package/lib/plugin/tasks/tasks.js.map +1 -1
- package/lib/plugin/terminal-ext.d.ts +3 -0
- package/lib/plugin/terminal-ext.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.js +11 -1
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts +15 -5
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.js +52 -3
- package/lib/plugin/tree/tree-views.js.map +1 -1
- package/lib/plugin/type-converters.d.ts +60 -0
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +372 -13
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +68 -29
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +123 -44
- package/lib/plugin/types-impl.js.map +1 -1
- package/package.json +31 -29
- package/src/common/collections.ts +17 -0
- package/src/common/errors.ts +26 -0
- package/src/common/plugin-api-rpc.ts +340 -5
- package/src/common/plugin-protocol.ts +23 -5
- package/src/hosted/browser/hosted-plugin.ts +21 -14
- package/src/hosted/node/hosted-plugin-deployer-handler.ts +1 -1
- package/src/hosted/node/plugin-reader.ts +1 -1
- package/src/hosted/node/scanners/grammars-reader.ts +6 -5
- package/src/hosted/node/scanners/scanner-theia.ts +55 -41
- package/src/main/browser/custom-editors/custom-editor-widget.ts +1 -1
- package/src/main/browser/custom-editors/custom-editors-main.ts +1 -1
- package/src/main/browser/editors-and-documents-main.ts +1 -0
- package/src/main/browser/languages-main.ts +7 -4
- package/src/main/browser/main-context.ts +19 -0
- package/src/main/browser/menus/menus-contribution-handler.ts +7 -4
- package/src/main/browser/notebooks/notebook-documents-and-editors-main.ts +238 -0
- package/src/main/browser/notebooks/notebook-documents-main.ts +166 -0
- package/src/main/browser/notebooks/notebook-dto.ts +141 -0
- package/src/main/browser/notebooks/notebook-editors-main.ts +70 -0
- package/src/main/browser/notebooks/notebook-kernels-main.ts +291 -0
- package/src/main/browser/notebooks/notebook-renderers-main.ts +47 -0
- package/src/main/browser/notebooks/notebooks-main.ts +124 -0
- package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +198 -0
- package/src/main/browser/notebooks/renderers/output-webview-internal.ts +476 -0
- package/src/main/browser/notebooks/renderers/webview-communication.ts +79 -0
- package/src/main/browser/plugin-contribution-handler.ts +36 -3
- package/src/main/browser/plugin-ext-frontend-module.ts +7 -3
- package/src/main/browser/plugin-icon-theme-service.ts +6 -0
- package/src/main/browser/plugin-shared-style.ts +2 -1
- package/src/main/browser/tasks-main.ts +4 -4
- package/src/main/browser/terminal-main.ts +5 -5
- package/src/main/browser/view/tree-view-widget.tsx +36 -2
- package/src/main/browser/view/tree-views-main.ts +8 -0
- package/src/main/browser/webview/webview.ts +6 -0
- package/src/main/node/errors.spec.ts +37 -0
- package/src/main/node/handlers/plugin-theia-directory-handler.ts +18 -8
- package/src/main/node/handlers/plugin-theia-file-handler.ts +18 -6
- package/src/main/node/paths/plugin-paths-service.ts +5 -10
- package/src/main/node/plugin-deployer-directory-handler-context-impl.ts +8 -8
- package/src/main/node/plugin-deployer-entry-impl.ts +9 -7
- package/src/main/node/plugin-deployer-impl.ts +20 -28
- package/src/main/node/plugin-deployer-proxy-entry-impl.ts +2 -2
- package/src/main/node/plugin-github-resolver.ts +15 -8
- package/src/main/node/plugin-http-resolver.ts +15 -8
- package/src/main/node/temp-dir-util.ts +11 -2
- package/src/plugin/editors-and-documents.ts +1 -1
- package/src/plugin/notebook/notebook-document.ts +438 -0
- package/src/plugin/notebook/notebook-documents.ts +58 -0
- package/src/plugin/notebook/notebook-editor.ts +116 -0
- package/src/plugin/notebook/notebook-editors.ts +71 -0
- package/src/plugin/notebook/notebook-kernels.ts +616 -0
- package/src/plugin/notebook/notebook-renderers.ts +72 -0
- package/src/plugin/notebook/notebooks.ts +385 -0
- package/src/plugin/plugin-context.ts +77 -70
- package/src/plugin/plugin-manager.ts +9 -1
- package/src/plugin/tasks/task-provider.ts +9 -12
- package/src/plugin/tasks/tasks.ts +18 -13
- package/src/plugin/terminal-ext.ts +13 -1
- package/src/plugin/tree/tree-views.ts +57 -7
- package/src/plugin/type-converters.ts +370 -12
- package/src/plugin/types-impl.ts +162 -58
- package/lib/main/browser/custom-editors/undo-redo-service.d.ts +0 -24
- package/lib/main/browser/custom-editors/undo-redo-service.d.ts.map +0 -1
- package/lib/main/browser/custom-editors/undo-redo-service.js +0 -111
- package/lib/main/browser/custom-editors/undo-redo-service.js.map +0 -1
- package/src/main/browser/custom-editors/undo-redo-service.ts +0 -120
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2023 TypeFox and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
/*---------------------------------------------------------------------------------------------
|
|
18
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.NotebookEditorsExtImpl = void 0;
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
24
|
+
const typeConverters = require("../type-converters");
|
|
25
|
+
class NotebookEditorsExtImpl {
|
|
26
|
+
constructor(notebooksAndEditors) {
|
|
27
|
+
this.notebooksAndEditors = notebooksAndEditors;
|
|
28
|
+
this.DidChangeNotebookEditorSelectionEmitter = new core_1.Emitter();
|
|
29
|
+
this.DidChangeNotebookEditorVisibleRangesEmitter = new core_1.Emitter();
|
|
30
|
+
this.onDidChangeNotebookEditorSelection = this.DidChangeNotebookEditorSelectionEmitter.event;
|
|
31
|
+
this.onDidChangeNotebookEditorVisibleRanges = this.DidChangeNotebookEditorVisibleRangesEmitter.event;
|
|
32
|
+
}
|
|
33
|
+
$acceptEditorPropertiesChanged(id, data) {
|
|
34
|
+
const editor = this.notebooksAndEditors.getEditorById(id);
|
|
35
|
+
// ONE: make all state updates
|
|
36
|
+
if (data.visibleRanges) {
|
|
37
|
+
editor.acceptVisibleRanges(data.visibleRanges.ranges.map(typeConverters.NotebookRange.to));
|
|
38
|
+
}
|
|
39
|
+
if (data.selections) {
|
|
40
|
+
editor.acceptSelections(data.selections.selections.map(typeConverters.NotebookRange.to));
|
|
41
|
+
}
|
|
42
|
+
// TWO: send all events after states have been updated
|
|
43
|
+
if (data.visibleRanges) {
|
|
44
|
+
this.DidChangeNotebookEditorVisibleRangesEmitter.fire({
|
|
45
|
+
notebookEditor: editor.apiEditor,
|
|
46
|
+
visibleRanges: editor.apiEditor.visibleRanges
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (data.selections) {
|
|
50
|
+
this.DidChangeNotebookEditorSelectionEmitter.fire(Object.freeze({
|
|
51
|
+
notebookEditor: editor.apiEditor,
|
|
52
|
+
selections: editor.apiEditor.selections
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
$acceptEditorViewColumns(data) {
|
|
57
|
+
// eslint-disable-next-line guard-for-in
|
|
58
|
+
for (const id in data) {
|
|
59
|
+
const editor = this.notebooksAndEditors.getEditorById(id);
|
|
60
|
+
editor.acceptViewColumn(typeConverters.ViewColumn.to(data[id]));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.NotebookEditorsExtImpl = NotebookEditorsExtImpl;
|
|
65
|
+
//# sourceMappingURL=notebook-editors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-editors.js","sourceRoot":"","sources":["../../../src/plugin/notebook/notebook-editors.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF;;;gGAGgG;;;AAEhG,sCAAsC;AAEtC,qDAAqD;AAIrD,MAAa,sBAAsB;IAQ/B,YACqB,mBAAqC;QAArC,wBAAmB,GAAnB,mBAAmB,CAAkB;QAPzC,4CAAuC,GAAG,IAAI,cAAO,EAA4C,CAAC;QAClG,gDAA2C,GAAG,IAAI,cAAO,EAAgD,CAAC;QAElH,uCAAkC,GAAG,IAAI,CAAC,uCAAuC,CAAC,KAAK,CAAC;QACxF,2CAAsC,GAAG,IAAI,CAAC,2CAA2C,CAAC,KAAK,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;AA5CD,wDA4CC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CancellationToken } from '@theia/plugin';
|
|
2
|
+
import { NotebookKernelsExt, NotebookKernelSourceActionDto } from '../../common';
|
|
3
|
+
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
4
|
+
import { UriComponents } from '../../common/uri-components';
|
|
5
|
+
import * as theia from '@theia/plugin';
|
|
6
|
+
import { Disposable } from '@theia/core';
|
|
7
|
+
import { NotebooksExtImpl } from './notebooks';
|
|
8
|
+
import { NotebookCellExecutionState } from '@theia/notebook/lib/common';
|
|
9
|
+
import { CommandRegistryImpl } from '../command-registry';
|
|
10
|
+
import { NotebookRendererScript } from '../types-impl';
|
|
11
|
+
export declare class NotebookKernelsExtImpl implements NotebookKernelsExt {
|
|
12
|
+
private readonly notebooks;
|
|
13
|
+
private readonly commands;
|
|
14
|
+
private readonly activeExecutions;
|
|
15
|
+
private readonly kernelData;
|
|
16
|
+
private readonly proxy;
|
|
17
|
+
private kernelDetectionTasks;
|
|
18
|
+
private currentKernelDetectionTaskHandle;
|
|
19
|
+
private kernelSourceActionProviders;
|
|
20
|
+
private currentSourceActionProviderHandle;
|
|
21
|
+
private readonly onDidChangeCellExecutionStateEmitter;
|
|
22
|
+
readonly onDidChangeNotebookCellExecutionState: import("@theia/core").Event<theia.NotebookCellExecutionStateChangeEvent>;
|
|
23
|
+
constructor(rpc: RPCProtocol, notebooks: NotebooksExtImpl, commands: CommandRegistryImpl);
|
|
24
|
+
private currentHandle;
|
|
25
|
+
createNotebookController(extensionId: string, id: string, viewType: string, label: string, handler?: (cells: theia.NotebookCell[], notebook: theia.NotebookDocument, controller: theia.NotebookController) => void | Thenable<void>, rendererScripts?: NotebookRendererScript[]): theia.NotebookController;
|
|
26
|
+
createNotebookCellExecution(cell: theia.NotebookCell, controllerId: string): theia.NotebookCellExecution;
|
|
27
|
+
createNotebookControllerDetectionTask(viewType: string): theia.NotebookControllerDetectionTask;
|
|
28
|
+
registerKernelSourceActionProvider(viewType: string, provider: theia.NotebookKernelSourceActionProvider): Disposable;
|
|
29
|
+
$acceptNotebookAssociation(handle: number, uri: UriComponents, value: boolean): void;
|
|
30
|
+
$executeCells(handle: number, uri: UriComponents, handles: number[]): Promise<void>;
|
|
31
|
+
$cancelCells(handle: number, uri: UriComponents, handles: number[]): Promise<void>;
|
|
32
|
+
$acceptKernelMessageFromRenderer(handle: number, editorId: string, message: unknown): void;
|
|
33
|
+
$cellExecutionChanged(uri: UriComponents, cellHandle: number, state: NotebookCellExecutionState | undefined): void;
|
|
34
|
+
$provideKernelSourceActions(handle: number, token: CancellationToken): Promise<NotebookKernelSourceActionDto[]>;
|
|
35
|
+
}
|
|
36
|
+
export declare function createKernelId(extensionIdentifier: string, id: string): string;
|
|
37
|
+
//# sourceMappingURL=notebook-kernels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-kernels.d.ts","sourceRoot":"","sources":["../../../src/plugin/notebook/notebook-kernels.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACsC,kBAAkB,EAAuB,6BAA6B,EAClH,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,EAA2B,UAAU,EAAiC,MAAM,aAAa,CAAC;AAEjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,EAA2B,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAsB,sBAAsB,EAAO,MAAM,eAAe,CAAC;AAUhF,qBAAa,sBAAuB,YAAW,kBAAkB;IAmBzD,OAAO,CAAC,QAAQ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K,EAAE,OAAO,GAAG,IAAI;IAoB9E,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBnF,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBxF,gCAAgC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAW1F,qBAAqB,CAAC,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,0BAA0B,GAAG,SAAS,GAAG,IAAI;IAI5G,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,6BAA6B,EAAE,CAAC;CAWxH;AA+ND,wBAAgB,cAAc,CAAC,mBAAmB,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE9E"}
|
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2023 TypeFox and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
/*---------------------------------------------------------------------------------------------
|
|
18
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
19
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
20
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.createKernelId = exports.NotebookKernelsExtImpl = void 0;
|
|
23
|
+
const common_1 = require("../../common");
|
|
24
|
+
const core_1 = require("@theia/core");
|
|
25
|
+
const type_converters_1 = require("../type-converters");
|
|
26
|
+
const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
27
|
+
const common_2 = require("@theia/notebook/lib/common");
|
|
28
|
+
const types_impl_1 = require("../types-impl");
|
|
29
|
+
class NotebookKernelsExtImpl {
|
|
30
|
+
constructor(rpc, notebooks, commands) {
|
|
31
|
+
this.notebooks = notebooks;
|
|
32
|
+
this.commands = commands;
|
|
33
|
+
this.activeExecutions = new Map();
|
|
34
|
+
this.kernelData = new Map();
|
|
35
|
+
this.kernelDetectionTasks = new Map();
|
|
36
|
+
this.currentKernelDetectionTaskHandle = 0;
|
|
37
|
+
this.kernelSourceActionProviders = new Map();
|
|
38
|
+
this.currentSourceActionProviderHandle = 0;
|
|
39
|
+
this.onDidChangeCellExecutionStateEmitter = new core_1.Emitter();
|
|
40
|
+
this.onDidChangeNotebookCellExecutionState = this.onDidChangeCellExecutionStateEmitter.event;
|
|
41
|
+
this.currentHandle = 0;
|
|
42
|
+
this.proxy = rpc.getProxy(common_1.PLUGIN_RPC_CONTEXT.NOTEBOOK_KERNELS_MAIN);
|
|
43
|
+
}
|
|
44
|
+
createNotebookController(extensionId, id, viewType, label, handler, rendererScripts) {
|
|
45
|
+
for (const kernelData of this.kernelData.values()) {
|
|
46
|
+
if (kernelData.controller.id === id && extensionId === kernelData.extensionId) {
|
|
47
|
+
throw new Error(`notebook controller with id '${id}' ALREADY exist`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const handle = this.currentHandle++;
|
|
51
|
+
const that = this;
|
|
52
|
+
console.debug(`NotebookController[${handle}], CREATED by ${extensionId}, ${id}`);
|
|
53
|
+
const defaultExecuteHandler = () => console.warn(`NO execute handler from notebook controller '${data.id}' of extension: '${extensionId}'`);
|
|
54
|
+
let isDisposed = false;
|
|
55
|
+
const commandDisposables = new core_1.DisposableCollection();
|
|
56
|
+
const onDidChangeSelection = new core_1.Emitter();
|
|
57
|
+
const onDidReceiveMessage = new core_1.Emitter();
|
|
58
|
+
const data = {
|
|
59
|
+
id: createKernelId(extensionId, id),
|
|
60
|
+
notebookType: viewType,
|
|
61
|
+
extensionId: extensionId,
|
|
62
|
+
label: label || extensionId,
|
|
63
|
+
};
|
|
64
|
+
//
|
|
65
|
+
let executeHandler = handler !== null && handler !== void 0 ? handler : defaultExecuteHandler;
|
|
66
|
+
let interruptHandler;
|
|
67
|
+
this.proxy.$addKernel(handle, data).catch(err => {
|
|
68
|
+
// this can happen when a kernel with that ID is already registered
|
|
69
|
+
console.log(err);
|
|
70
|
+
isDisposed = true;
|
|
71
|
+
});
|
|
72
|
+
// update: all setters write directly into the dto object
|
|
73
|
+
// and trigger an update. the actual update will only happen
|
|
74
|
+
// once per event loop execution
|
|
75
|
+
let tokenPool = 0;
|
|
76
|
+
const update = () => {
|
|
77
|
+
if (isDisposed) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const myToken = ++tokenPool;
|
|
81
|
+
Promise.resolve().then(() => {
|
|
82
|
+
if (myToken === tokenPool) {
|
|
83
|
+
this.proxy.$updateKernel(handle, data);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
// notebook documents that are associated to this controller
|
|
88
|
+
const associatedNotebooks = new Map();
|
|
89
|
+
const controller = {
|
|
90
|
+
get id() { return id; },
|
|
91
|
+
get notebookType() { return data.notebookType; },
|
|
92
|
+
onDidChangeSelectedNotebooks: onDidChangeSelection.event,
|
|
93
|
+
onDidReceiveMessage: onDidReceiveMessage.event,
|
|
94
|
+
get label() {
|
|
95
|
+
return data.label;
|
|
96
|
+
},
|
|
97
|
+
set label(value) {
|
|
98
|
+
data.label = value !== null && value !== void 0 ? value : extensionId;
|
|
99
|
+
update();
|
|
100
|
+
},
|
|
101
|
+
get detail() {
|
|
102
|
+
var _a;
|
|
103
|
+
return (_a = data.detail) !== null && _a !== void 0 ? _a : '';
|
|
104
|
+
},
|
|
105
|
+
set detail(value) {
|
|
106
|
+
data.detail = value;
|
|
107
|
+
update();
|
|
108
|
+
},
|
|
109
|
+
get description() {
|
|
110
|
+
var _a;
|
|
111
|
+
return (_a = data.description) !== null && _a !== void 0 ? _a : '';
|
|
112
|
+
},
|
|
113
|
+
set description(value) {
|
|
114
|
+
data.description = value;
|
|
115
|
+
update();
|
|
116
|
+
},
|
|
117
|
+
get supportedLanguages() {
|
|
118
|
+
return data.supportedLanguages;
|
|
119
|
+
},
|
|
120
|
+
set supportedLanguages(value) {
|
|
121
|
+
data.supportedLanguages = value;
|
|
122
|
+
update();
|
|
123
|
+
},
|
|
124
|
+
get supportsExecutionOrder() {
|
|
125
|
+
var _a;
|
|
126
|
+
return (_a = data.supportsExecutionOrder) !== null && _a !== void 0 ? _a : false;
|
|
127
|
+
},
|
|
128
|
+
set supportsExecutionOrder(value) {
|
|
129
|
+
data.supportsExecutionOrder = value;
|
|
130
|
+
update();
|
|
131
|
+
},
|
|
132
|
+
get rendererScripts() {
|
|
133
|
+
var _a;
|
|
134
|
+
return (_a = data.rendererScripts) !== null && _a !== void 0 ? _a : [];
|
|
135
|
+
},
|
|
136
|
+
set rendererScripts(value) {
|
|
137
|
+
data.rendererScripts = value;
|
|
138
|
+
update();
|
|
139
|
+
},
|
|
140
|
+
get executeHandler() {
|
|
141
|
+
return executeHandler;
|
|
142
|
+
},
|
|
143
|
+
set executeHandler(value) {
|
|
144
|
+
executeHandler = value !== null && value !== void 0 ? value : defaultExecuteHandler;
|
|
145
|
+
},
|
|
146
|
+
get interruptHandler() {
|
|
147
|
+
return interruptHandler;
|
|
148
|
+
},
|
|
149
|
+
set interruptHandler(value) {
|
|
150
|
+
interruptHandler = value;
|
|
151
|
+
data.supportsInterrupt = Boolean(value);
|
|
152
|
+
update();
|
|
153
|
+
},
|
|
154
|
+
createNotebookCellExecution(cell) {
|
|
155
|
+
if (isDisposed) {
|
|
156
|
+
throw new Error('notebook controller is DISPOSED');
|
|
157
|
+
}
|
|
158
|
+
if (!associatedNotebooks.has(cell.notebook.uri.toString())) {
|
|
159
|
+
console.debug(`NotebookController[${handle}] NOT associated to notebook, associated to THESE notebooks:`, Array.from(associatedNotebooks.keys()).map(u => u.toString()));
|
|
160
|
+
throw new Error(`notebook controller is NOT associated to notebook: ${cell.notebook.uri.toString()}`);
|
|
161
|
+
}
|
|
162
|
+
return that.createNotebookCellExecution(cell, createKernelId(extensionId, this.id));
|
|
163
|
+
},
|
|
164
|
+
dispose: () => {
|
|
165
|
+
if (!isDisposed) {
|
|
166
|
+
console.debug(`NotebookController[${handle}], DISPOSED`);
|
|
167
|
+
isDisposed = true;
|
|
168
|
+
this.kernelData.delete(handle);
|
|
169
|
+
commandDisposables.dispose();
|
|
170
|
+
onDidChangeSelection.dispose();
|
|
171
|
+
onDidReceiveMessage.dispose();
|
|
172
|
+
this.proxy.$removeKernel(handle);
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
updateNotebookAffinity(notebook, priority) {
|
|
176
|
+
that.proxy.$updateNotebookPriority(handle, notebook.uri, priority);
|
|
177
|
+
},
|
|
178
|
+
async postMessage(message, editor) {
|
|
179
|
+
return Promise.resolve(true); // TODO needs implementation
|
|
180
|
+
},
|
|
181
|
+
asWebviewUri(localResource) {
|
|
182
|
+
throw new Error('Method not implemented.');
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
this.kernelData.set(handle, {
|
|
186
|
+
extensionId: extensionId,
|
|
187
|
+
controller,
|
|
188
|
+
onDidReceiveMessage,
|
|
189
|
+
onDidChangeSelection,
|
|
190
|
+
associatedNotebooks
|
|
191
|
+
});
|
|
192
|
+
return controller;
|
|
193
|
+
}
|
|
194
|
+
createNotebookCellExecution(cell, controllerId) {
|
|
195
|
+
if (cell.index < 0) {
|
|
196
|
+
throw new Error('CANNOT execute cell that has been REMOVED from notebook');
|
|
197
|
+
}
|
|
198
|
+
const notebook = this.notebooks.getNotebookDocument(types_impl_1.URI.from(cell.notebook.uri));
|
|
199
|
+
const cellObj = notebook.getCellFromApiCell(cell);
|
|
200
|
+
if (!cellObj) {
|
|
201
|
+
throw new Error('invalid cell');
|
|
202
|
+
}
|
|
203
|
+
if (this.activeExecutions.has(cellObj.uri.toString())) {
|
|
204
|
+
throw new Error(`duplicate execution for ${cellObj.uri}`);
|
|
205
|
+
}
|
|
206
|
+
const execution = new NotebookCellExecutionTask(controllerId, cellObj, this.proxy);
|
|
207
|
+
this.activeExecutions.set(cellObj.uri.toString(), execution);
|
|
208
|
+
const listener = execution.onDidChangeState(() => {
|
|
209
|
+
if (execution.state === NotebookCellExecutionTaskState.Resolved) {
|
|
210
|
+
execution.dispose();
|
|
211
|
+
listener.dispose();
|
|
212
|
+
this.activeExecutions.delete(cellObj.uri.toString());
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
return execution.asApiObject();
|
|
216
|
+
}
|
|
217
|
+
createNotebookControllerDetectionTask(viewType) {
|
|
218
|
+
const handle = this.currentKernelDetectionTaskHandle++;
|
|
219
|
+
const that = this;
|
|
220
|
+
this.proxy.$addKernelDetectionTask(handle, viewType);
|
|
221
|
+
const detectionTask = {
|
|
222
|
+
dispose: () => {
|
|
223
|
+
this.kernelDetectionTasks.delete(handle);
|
|
224
|
+
that.proxy.$removeKernelDetectionTask(handle);
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
this.kernelDetectionTasks.set(handle, detectionTask);
|
|
228
|
+
return detectionTask;
|
|
229
|
+
}
|
|
230
|
+
registerKernelSourceActionProvider(viewType, provider) {
|
|
231
|
+
const handle = this.currentSourceActionProviderHandle++;
|
|
232
|
+
const eventHandle = typeof provider.onDidChangeNotebookKernelSourceActions === 'function' ? handle : undefined;
|
|
233
|
+
const that = this;
|
|
234
|
+
this.kernelSourceActionProviders.set(handle, provider);
|
|
235
|
+
this.proxy.$addKernelSourceActionProvider(handle, handle, viewType);
|
|
236
|
+
let subscription;
|
|
237
|
+
if (eventHandle !== undefined) {
|
|
238
|
+
subscription = provider.onDidChangeNotebookKernelSourceActions(_ => this.proxy.$emitNotebookKernelSourceActionsChangeEvent(eventHandle));
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
dispose: () => {
|
|
242
|
+
this.kernelSourceActionProviders.delete(handle);
|
|
243
|
+
that.proxy.$removeKernelSourceActionProvider(handle, handle);
|
|
244
|
+
subscription === null || subscription === void 0 ? void 0 : subscription.dispose();
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
$acceptNotebookAssociation(handle, uri, value) {
|
|
249
|
+
const obj = this.kernelData.get(handle);
|
|
250
|
+
if (obj) {
|
|
251
|
+
// update data structure
|
|
252
|
+
const notebook = this.notebooks.getNotebookDocument(types_impl_1.URI.from(uri));
|
|
253
|
+
if (value) {
|
|
254
|
+
obj.associatedNotebooks.set(notebook.uri.toString(), true);
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
obj.associatedNotebooks.delete(notebook.uri.toString());
|
|
258
|
+
}
|
|
259
|
+
console.debug(`NotebookController[${handle}] ASSOCIATE notebook`, notebook.uri.toString(), value);
|
|
260
|
+
// send event
|
|
261
|
+
obj.onDidChangeSelection.fire({
|
|
262
|
+
selected: value,
|
|
263
|
+
notebook: notebook.apiNotebook
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
async $executeCells(handle, uri, handles) {
|
|
268
|
+
const obj = this.kernelData.get(handle);
|
|
269
|
+
if (!obj) {
|
|
270
|
+
// extension can dispose kernels in the meantime
|
|
271
|
+
return Promise.resolve();
|
|
272
|
+
}
|
|
273
|
+
const document = this.notebooks.getNotebookDocument(types_impl_1.URI.from(uri));
|
|
274
|
+
const cells = [];
|
|
275
|
+
for (const cellHandle of handles) {
|
|
276
|
+
const cell = document.getCell(cellHandle);
|
|
277
|
+
if (cell) {
|
|
278
|
+
cells.push(cell.apiCell);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
try {
|
|
282
|
+
console.debug(`NotebookController[${handle}] EXECUTE cells`, document.uri.toString(), cells.length);
|
|
283
|
+
await obj.controller.executeHandler.call(obj.controller, cells, document.apiNotebook, obj.controller);
|
|
284
|
+
}
|
|
285
|
+
catch (err) {
|
|
286
|
+
console.error(`NotebookController[${handle}] execute cells FAILED`, err);
|
|
287
|
+
console.error(err);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
async $cancelCells(handle, uri, handles) {
|
|
291
|
+
var _a;
|
|
292
|
+
const obj = this.kernelData.get(handle);
|
|
293
|
+
if (!obj) {
|
|
294
|
+
// extension can dispose kernels in the meantime
|
|
295
|
+
return Promise.resolve();
|
|
296
|
+
}
|
|
297
|
+
// cancel or interrupt depends on the controller. When an interrupt handler is used we
|
|
298
|
+
// don't trigger the cancelation token of executions.N
|
|
299
|
+
const document = this.notebooks.getNotebookDocument(types_impl_1.URI.from(uri));
|
|
300
|
+
if (obj.controller.interruptHandler) {
|
|
301
|
+
await obj.controller.interruptHandler.call(obj.controller, document.apiNotebook);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
for (const cellHandle of handles) {
|
|
305
|
+
const cell = document.getCell(cellHandle);
|
|
306
|
+
if (cell) {
|
|
307
|
+
(_a = this.activeExecutions.get(cell.uri.toString())) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
$acceptKernelMessageFromRenderer(handle, editorId, message) {
|
|
313
|
+
const obj = this.kernelData.get(handle);
|
|
314
|
+
if (!obj) {
|
|
315
|
+
// extension can dispose kernels in the meantime
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
const editor = this.notebooks.getEditorById(editorId);
|
|
319
|
+
obj.onDidReceiveMessage.fire(Object.freeze({ editor: editor.apiEditor, message }));
|
|
320
|
+
}
|
|
321
|
+
$cellExecutionChanged(uri, cellHandle, state) {
|
|
322
|
+
// Proposed Api though seems needed by jupyter for telemetry
|
|
323
|
+
}
|
|
324
|
+
async $provideKernelSourceActions(handle, token) {
|
|
325
|
+
const provider = this.kernelSourceActionProviders.get(handle);
|
|
326
|
+
if (provider) {
|
|
327
|
+
const disposables = new core_1.DisposableCollection();
|
|
328
|
+
const ret = await provider.provideNotebookKernelSourceActions(token);
|
|
329
|
+
return (ret !== null && ret !== void 0 ? ret : []).map(item => type_converters_1.NotebookKernelSourceAction.from(item, this.commands.converter, disposables));
|
|
330
|
+
}
|
|
331
|
+
return [];
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
exports.NotebookKernelsExtImpl = NotebookKernelsExtImpl;
|
|
335
|
+
var NotebookCellExecutionTaskState;
|
|
336
|
+
(function (NotebookCellExecutionTaskState) {
|
|
337
|
+
NotebookCellExecutionTaskState[NotebookCellExecutionTaskState["Init"] = 0] = "Init";
|
|
338
|
+
NotebookCellExecutionTaskState[NotebookCellExecutionTaskState["Started"] = 1] = "Started";
|
|
339
|
+
NotebookCellExecutionTaskState[NotebookCellExecutionTaskState["Resolved"] = 2] = "Resolved";
|
|
340
|
+
})(NotebookCellExecutionTaskState || (NotebookCellExecutionTaskState = {}));
|
|
341
|
+
class NotebookCellExecutionTask {
|
|
342
|
+
constructor(controllerId, cell, proxy) {
|
|
343
|
+
this.cell = cell;
|
|
344
|
+
this.proxy = proxy;
|
|
345
|
+
this._handle = NotebookCellExecutionTask.HANDLE++;
|
|
346
|
+
this._onDidChangeState = new core_1.Emitter();
|
|
347
|
+
this.onDidChangeState = this._onDidChangeState.event;
|
|
348
|
+
this._state = NotebookCellExecutionTaskState.Init;
|
|
349
|
+
this.tokenSource = new core_1.CancellationTokenSource();
|
|
350
|
+
this.collector = new TimeoutBasedCollector(10, updates => this.update(updates));
|
|
351
|
+
this.executionOrder = cell.internalMetadata.executionOrder;
|
|
352
|
+
this.proxy.$createExecution(this._handle, controllerId, this.cell.notebookDocument.uri, this.cell.handle);
|
|
353
|
+
}
|
|
354
|
+
get state() { return this._state; }
|
|
355
|
+
cancel() {
|
|
356
|
+
this.tokenSource.cancel();
|
|
357
|
+
}
|
|
358
|
+
async updateSoon(update) {
|
|
359
|
+
await this.collector.addItem(update);
|
|
360
|
+
}
|
|
361
|
+
async update(update) {
|
|
362
|
+
const updates = Array.isArray(update) ? update : [update];
|
|
363
|
+
return this.proxy.$updateExecution(this._handle, updates);
|
|
364
|
+
}
|
|
365
|
+
verifyStateForOutput() {
|
|
366
|
+
if (this._state === NotebookCellExecutionTaskState.Init) {
|
|
367
|
+
throw new Error('Must call start before modifying cell output');
|
|
368
|
+
}
|
|
369
|
+
if (this._state === NotebookCellExecutionTaskState.Resolved) {
|
|
370
|
+
throw new Error('Cannot modify cell output after calling resolve');
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
cellIndexToHandle(cellOrCellIndex) {
|
|
374
|
+
let cell = this.cell;
|
|
375
|
+
if (cellOrCellIndex) {
|
|
376
|
+
cell = this.cell.notebookDocument.getCellFromApiCell(cellOrCellIndex);
|
|
377
|
+
}
|
|
378
|
+
if (!cell) {
|
|
379
|
+
throw new Error('INVALID cell');
|
|
380
|
+
}
|
|
381
|
+
return cell.handle;
|
|
382
|
+
}
|
|
383
|
+
validateAndConvertOutputs(items) {
|
|
384
|
+
return items.map(output => {
|
|
385
|
+
const newOutput = type_converters_1.NotebookCellOutputConverter.ensureUniqueMimeTypes(output.items, true);
|
|
386
|
+
if (newOutput === output.items) {
|
|
387
|
+
return type_converters_1.NotebookCellOutputConverter.from(output);
|
|
388
|
+
}
|
|
389
|
+
return type_converters_1.NotebookCellOutputConverter.from({
|
|
390
|
+
items: newOutput,
|
|
391
|
+
outputId: output.outputId,
|
|
392
|
+
metadata: output.metadata
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
async updateOutputs(outputs, cell, append) {
|
|
397
|
+
const handle = this.cellIndexToHandle(cell);
|
|
398
|
+
const outputDtos = this.validateAndConvertOutputs(Array.isArray(outputs) ? outputs : [outputs]);
|
|
399
|
+
return this.updateSoon({
|
|
400
|
+
editType: common_2.CellExecutionUpdateType.Output,
|
|
401
|
+
cellHandle: handle,
|
|
402
|
+
append,
|
|
403
|
+
outputs: outputDtos
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
async updateOutputItems(items, output, append) {
|
|
407
|
+
items = type_converters_1.NotebookCellOutputConverter.ensureUniqueMimeTypes(Array.isArray(items) ? items : [items], true);
|
|
408
|
+
return this.updateSoon({
|
|
409
|
+
editType: common_2.CellExecutionUpdateType.OutputItems,
|
|
410
|
+
items: items.map(type_converters_1.NotebookCellOutputItem.from),
|
|
411
|
+
append
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
asApiObject() {
|
|
415
|
+
const that = this;
|
|
416
|
+
const result = {
|
|
417
|
+
get token() { return that.tokenSource.token; },
|
|
418
|
+
get cell() { return that.cell.apiCell; },
|
|
419
|
+
get executionOrder() { return that.executionOrder; },
|
|
420
|
+
set executionOrder(v) {
|
|
421
|
+
that.executionOrder = v;
|
|
422
|
+
that.update([{
|
|
423
|
+
editType: common_2.CellExecutionUpdateType.ExecutionState,
|
|
424
|
+
executionOrder: that.executionOrder
|
|
425
|
+
}]);
|
|
426
|
+
},
|
|
427
|
+
start(startTime) {
|
|
428
|
+
if (that._state === NotebookCellExecutionTaskState.Resolved || that._state === NotebookCellExecutionTaskState.Started) {
|
|
429
|
+
throw new Error('Cannot call start again');
|
|
430
|
+
}
|
|
431
|
+
that._state = NotebookCellExecutionTaskState.Started;
|
|
432
|
+
that._onDidChangeState.fire();
|
|
433
|
+
that.update({
|
|
434
|
+
editType: common_2.CellExecutionUpdateType.ExecutionState,
|
|
435
|
+
runStartTime: startTime
|
|
436
|
+
});
|
|
437
|
+
},
|
|
438
|
+
end(success, endTime) {
|
|
439
|
+
if (that._state === NotebookCellExecutionTaskState.Resolved) {
|
|
440
|
+
throw new Error('Cannot call resolve twice');
|
|
441
|
+
}
|
|
442
|
+
that._state = NotebookCellExecutionTaskState.Resolved;
|
|
443
|
+
that._onDidChangeState.fire();
|
|
444
|
+
// The last update needs to be ordered correctly and applied immediately,
|
|
445
|
+
// so we use updateSoon and immediately flush.
|
|
446
|
+
that.collector.flush();
|
|
447
|
+
that.proxy.$completeExecution(that._handle, {
|
|
448
|
+
runEndTime: endTime,
|
|
449
|
+
lastRunSuccess: success
|
|
450
|
+
});
|
|
451
|
+
},
|
|
452
|
+
clearOutput(cell) {
|
|
453
|
+
that.verifyStateForOutput();
|
|
454
|
+
return that.updateOutputs([], cell, false);
|
|
455
|
+
},
|
|
456
|
+
appendOutput(outputs, cell) {
|
|
457
|
+
that.verifyStateForOutput();
|
|
458
|
+
return that.updateOutputs(outputs, cell, true);
|
|
459
|
+
},
|
|
460
|
+
replaceOutput(outputs, cell) {
|
|
461
|
+
that.verifyStateForOutput();
|
|
462
|
+
return that.updateOutputs(outputs, cell, false);
|
|
463
|
+
},
|
|
464
|
+
appendOutputItems(items, output) {
|
|
465
|
+
that.verifyStateForOutput();
|
|
466
|
+
return that.updateOutputItems(items, output, true);
|
|
467
|
+
},
|
|
468
|
+
replaceOutputItems(items, output) {
|
|
469
|
+
that.verifyStateForOutput();
|
|
470
|
+
return that.updateOutputItems(items, output, false);
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
return Object.freeze(result);
|
|
474
|
+
}
|
|
475
|
+
dispose() {
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
NotebookCellExecutionTask.HANDLE = 0;
|
|
479
|
+
class TimeoutBasedCollector {
|
|
480
|
+
constructor(delay, callback) {
|
|
481
|
+
this.delay = delay;
|
|
482
|
+
this.callback = callback;
|
|
483
|
+
this.batch = [];
|
|
484
|
+
this.startedTimer = Date.now();
|
|
485
|
+
}
|
|
486
|
+
addItem(item) {
|
|
487
|
+
this.batch.push(item);
|
|
488
|
+
if (!this.currentDeferred) {
|
|
489
|
+
this.currentDeferred = new promise_util_1.Deferred();
|
|
490
|
+
this.startedTimer = Date.now();
|
|
491
|
+
(0, promise_util_1.timeout)(this.delay).then(() => this.flush());
|
|
492
|
+
}
|
|
493
|
+
// This can be called by the extension repeatedly for a long time before the timeout is able to run.
|
|
494
|
+
// Force a flush after the delay.
|
|
495
|
+
if (Date.now() - this.startedTimer > this.delay) {
|
|
496
|
+
return this.flush();
|
|
497
|
+
}
|
|
498
|
+
return this.currentDeferred.promise;
|
|
499
|
+
}
|
|
500
|
+
flush() {
|
|
501
|
+
if (this.batch.length === 0 || !this.currentDeferred) {
|
|
502
|
+
return Promise.resolve();
|
|
503
|
+
}
|
|
504
|
+
const deferred = this.currentDeferred;
|
|
505
|
+
this.currentDeferred = undefined;
|
|
506
|
+
const batch = this.batch;
|
|
507
|
+
this.batch = [];
|
|
508
|
+
return this.callback(batch)
|
|
509
|
+
.finally(() => deferred.resolve());
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
function createKernelId(extensionIdentifier, id) {
|
|
513
|
+
return `${extensionIdentifier}/${id}`;
|
|
514
|
+
}
|
|
515
|
+
exports.createKernelId = createKernelId;
|
|
516
|
+
//# sourceMappingURL=notebook-kernels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-kernels.js","sourceRoot":"","sources":["../../../src/plugin/notebook/notebook-kernels.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDA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