@theia/plugin-ext 1.40.0 → 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,14 @@
|
|
|
1
|
+
import { NotebookRenderersExt } from '../../common';
|
|
2
|
+
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
3
|
+
import { NotebooksExtImpl } from './notebooks';
|
|
4
|
+
import * as theia from '@theia/plugin';
|
|
5
|
+
export declare class NotebookRenderersExtImpl implements NotebookRenderersExt {
|
|
6
|
+
private readonly notebooksExt;
|
|
7
|
+
private readonly rendererMessageEmitters;
|
|
8
|
+
private readonly proxy;
|
|
9
|
+
constructor(rpc: RPCProtocol, notebooksExt: NotebooksExtImpl);
|
|
10
|
+
$postRendererMessage(editorId: string, rendererId: string, message: unknown): void;
|
|
11
|
+
createRendererMessaging(rendererId: string): theia.NotebookRendererMessaging;
|
|
12
|
+
private getOrCreateEmitterFor;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=notebook-renderers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-renderers.d.ts","sourceRoot":"","sources":["../../../src/plugin/notebook/notebook-renderers.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,oBAAoB,EAA6C,MAAM,cAAc,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAIvC,qBAAa,wBAAyB,YAAW,oBAAoB;IAInC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAH3D,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAmG;IAC3I,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;gBAElC,GAAG,EAAE,WAAW,EAAmB,YAAY,EAAE,gBAAgB;IAItE,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAKlF,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,KAAK,CAAC,yBAAyB;IAcnF,OAAO,CAAC,qBAAqB;CAiBhC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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.NotebookRenderersExtImpl = void 0;
|
|
23
|
+
const common_1 = require("../../common");
|
|
24
|
+
const notebook_editor_1 = require("./notebook-editor");
|
|
25
|
+
const core_1 = require("@theia/core");
|
|
26
|
+
class NotebookRenderersExtImpl {
|
|
27
|
+
constructor(rpc, notebooksExt) {
|
|
28
|
+
this.notebooksExt = notebooksExt;
|
|
29
|
+
this.rendererMessageEmitters = new Map();
|
|
30
|
+
this.proxy = rpc.getProxy(common_1.PLUGIN_RPC_CONTEXT.NOTEBOOK_RENDERERS_MAIN);
|
|
31
|
+
}
|
|
32
|
+
$postRendererMessage(editorId, rendererId, message) {
|
|
33
|
+
var _a;
|
|
34
|
+
const editor = this.notebooksExt.getEditorById(editorId);
|
|
35
|
+
(_a = this.rendererMessageEmitters.get(rendererId)) === null || _a === void 0 ? void 0 : _a.fire({ editor: editor.apiEditor, message });
|
|
36
|
+
}
|
|
37
|
+
createRendererMessaging(rendererId) {
|
|
38
|
+
const messaging = {
|
|
39
|
+
onDidReceiveMessage: (listener, thisArg, disposables) => this.getOrCreateEmitterFor(rendererId).event(listener, thisArg, disposables),
|
|
40
|
+
postMessage: (message, editorOrAlias) => {
|
|
41
|
+
const extHostEditor = editorOrAlias && notebook_editor_1.NotebookEditor.apiEditorsToExtHost.get(editorOrAlias);
|
|
42
|
+
return this.proxy.$postMessage(extHostEditor === null || extHostEditor === void 0 ? void 0 : extHostEditor.id, rendererId, message);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
return messaging;
|
|
46
|
+
}
|
|
47
|
+
getOrCreateEmitterFor(rendererId) {
|
|
48
|
+
let emitter = this.rendererMessageEmitters.get(rendererId);
|
|
49
|
+
if (emitter) {
|
|
50
|
+
return emitter;
|
|
51
|
+
}
|
|
52
|
+
emitter = new core_1.Emitter({
|
|
53
|
+
onLastListenerRemove: () => {
|
|
54
|
+
emitter === null || emitter === void 0 ? void 0 : emitter.dispose();
|
|
55
|
+
this.rendererMessageEmitters.delete(rendererId);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
this.rendererMessageEmitters.set(rendererId, emitter);
|
|
59
|
+
return emitter;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.NotebookRenderersExtImpl = NotebookRenderersExtImpl;
|
|
63
|
+
//# sourceMappingURL=notebook-renderers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebook-renderers.js","sourceRoot":"","sources":["../../../src/plugin/notebook/notebook-renderers.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,yCAA+F;AAI/F,uDAAmD;AACnD,sCAAsC;AAEtC,MAAa,wBAAwB;IAIjC,YAAY,GAAgB,EAAmB,YAA8B;QAA9B,iBAAY,GAAZ,YAAY,CAAkB;QAH5D,4BAAuB,GAAG,IAAI,GAAG,EAAwF,CAAC;QAIvI,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,2BAAkB,CAAC,uBAAuB,CAAC,CAAC;IAC1E,CAAC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C;SACJ,CAAC,CAAC;QAEH,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAEtD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AA5CD,4DA4CC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CancellationToken, Event } from '@theia/core';
|
|
2
|
+
import { URI as TheiaURI } from '../types-impl';
|
|
3
|
+
import * as theia from '@theia/plugin';
|
|
4
|
+
import { CommandRegistryExt, NotebookCellStatusBarListDto, NotebookDataDto, NotebookDocumentsAndEditorsDelta, NotebooksExt, Plugin } from '../../common';
|
|
5
|
+
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
6
|
+
import { UriComponents } from '../../common/uri-components';
|
|
7
|
+
import { BinaryBuffer } from '@theia/core/lib/common/buffer';
|
|
8
|
+
import { NotebookDocument } from './notebook-document';
|
|
9
|
+
import { NotebookEditor } from './notebook-editor';
|
|
10
|
+
import { EditorsAndDocumentsExtImpl } from '../editors-and-documents';
|
|
11
|
+
import { DocumentsExtImpl } from '../documents';
|
|
12
|
+
export declare class NotebooksExtImpl implements NotebooksExt {
|
|
13
|
+
private textDocumentsAndEditors;
|
|
14
|
+
private textDocuments;
|
|
15
|
+
private readonly notebookStatusBarItemProviders;
|
|
16
|
+
private readonly commandsConverter;
|
|
17
|
+
private readonly onDidChangeActiveNotebookEditorEmitter;
|
|
18
|
+
readonly onDidChangeActiveNotebookEditor: Event<theia.NotebookEditor | undefined>;
|
|
19
|
+
private readonly onDidOpenNotebookDocumentEmitter;
|
|
20
|
+
onDidOpenNotebookDocument: Event<theia.NotebookDocument>;
|
|
21
|
+
private readonly onDidCloseNotebookDocumentEmitter;
|
|
22
|
+
onDidCloseNotebookDocument: Event<theia.NotebookDocument>;
|
|
23
|
+
private readonly onDidChangeVisibleNotebookEditorsEmitter;
|
|
24
|
+
onDidChangeVisibleNotebookEditors: Event<theia.NotebookEditor[]>;
|
|
25
|
+
private activeNotebookEditor;
|
|
26
|
+
get activeApiNotebookEditor(): theia.NotebookEditor | undefined;
|
|
27
|
+
private visibleNotebookEditors;
|
|
28
|
+
get visibleApiNotebookEditors(): theia.NotebookEditor[];
|
|
29
|
+
private readonly documents;
|
|
30
|
+
private readonly editors;
|
|
31
|
+
private statusBarRegistry;
|
|
32
|
+
private notebookProxy;
|
|
33
|
+
private notebookDocumentsProxy;
|
|
34
|
+
private notebookEditors;
|
|
35
|
+
constructor(rpc: RPCProtocol, commands: CommandRegistryExt, textDocumentsAndEditors: EditorsAndDocumentsExtImpl, textDocuments: DocumentsExtImpl);
|
|
36
|
+
$provideNotebookCellStatusBarItems(handle: number, uri: UriComponents, index: number, token: CancellationToken): Promise<NotebookCellStatusBarListDto | undefined>;
|
|
37
|
+
$releaseNotebookCellStatusBarItems(cacheId: number): void;
|
|
38
|
+
private currentSerializerHandle;
|
|
39
|
+
private readonly notebookSerializer;
|
|
40
|
+
registerNotebookSerializer(plugin: Plugin, viewType: string, serializer: theia.NotebookSerializer, options?: theia.NotebookDocumentContentOptions): theia.Disposable;
|
|
41
|
+
$dataToNotebook(handle: number, bytes: BinaryBuffer, token: CancellationToken): Promise<NotebookDataDto>;
|
|
42
|
+
$notebookToData(handle: number, data: NotebookDataDto, token: CancellationToken): Promise<BinaryBuffer>;
|
|
43
|
+
registerNotebookCellStatusBarItemProvider(notebookType: string, provider: theia.NotebookCellStatusBarItemProvider): theia.Disposable;
|
|
44
|
+
getEditorById(editorId: string): NotebookEditor;
|
|
45
|
+
getAllApiDocuments(): theia.NotebookDocument[];
|
|
46
|
+
$acceptDocumentsAndEditorsDelta(delta: NotebookDocumentsAndEditorsDelta): Promise<void>;
|
|
47
|
+
getNotebookDocument(uri: TheiaURI, relaxed: true): NotebookDocument | undefined;
|
|
48
|
+
getNotebookDocument(uri: TheiaURI): NotebookDocument;
|
|
49
|
+
private createExtHostEditor;
|
|
50
|
+
createNotebookDocument(options: {
|
|
51
|
+
viewType: string;
|
|
52
|
+
content?: theia.NotebookData;
|
|
53
|
+
}): Promise<TheiaURI>;
|
|
54
|
+
openNotebookDocument(uri: TheiaURI): Promise<theia.NotebookDocument>;
|
|
55
|
+
showNotebookDocument(notebookOrUri: theia.NotebookDocument | TheiaURI, options?: theia.NotebookDocumentShowOptions): Promise<theia.NotebookEditor>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=notebooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/notebook/notebooks.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,iBAAiB,EAA6C,KAAK,EAAO,MAAM,aAAa,CAAC;AACvG,OAAO,EAAE,GAAG,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,EACH,kBAAkB,EAAE,4BAA4B,EAAE,eAAe,EACjE,gCAAgC,EAAkG,YAAY,EAAiB,MAAM,EAExK,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,qBAAa,gBAAiB,YAAW,YAAY;IAqC7C,OAAO,CAAC,uBAAuB;IAC/B,OAAO,CAAC,aAAa;IApCzB,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAA8D;IAC7G,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IAEtD,OAAO,CAAC,QAAQ,CAAC,sC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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.NotebooksExtImpl = void 0;
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
24
|
+
const types_impl_1 = require("../types-impl");
|
|
25
|
+
const common_1 = require("../../common");
|
|
26
|
+
const cache_1 = require("../../common/cache");
|
|
27
|
+
const typeConverters = require("../type-converters");
|
|
28
|
+
const buffer_1 = require("@theia/core/lib/common/buffer");
|
|
29
|
+
const notebook_document_1 = require("./notebook-document");
|
|
30
|
+
const notebook_editor_1 = require("./notebook-editor");
|
|
31
|
+
class NotebooksExtImpl {
|
|
32
|
+
constructor(rpc, commands, textDocumentsAndEditors, textDocuments) {
|
|
33
|
+
this.textDocumentsAndEditors = textDocumentsAndEditors;
|
|
34
|
+
this.textDocuments = textDocuments;
|
|
35
|
+
this.notebookStatusBarItemProviders = new Map();
|
|
36
|
+
this.onDidChangeActiveNotebookEditorEmitter = new core_1.Emitter();
|
|
37
|
+
this.onDidChangeActiveNotebookEditor = this.onDidChangeActiveNotebookEditorEmitter.event;
|
|
38
|
+
this.onDidOpenNotebookDocumentEmitter = new core_1.Emitter();
|
|
39
|
+
this.onDidOpenNotebookDocument = this.onDidOpenNotebookDocumentEmitter.event;
|
|
40
|
+
this.onDidCloseNotebookDocumentEmitter = new core_1.Emitter();
|
|
41
|
+
this.onDidCloseNotebookDocument = this.onDidCloseNotebookDocumentEmitter.event;
|
|
42
|
+
this.onDidChangeVisibleNotebookEditorsEmitter = new core_1.Emitter();
|
|
43
|
+
this.onDidChangeVisibleNotebookEditors = this.onDidChangeVisibleNotebookEditorsEmitter.event;
|
|
44
|
+
this.visibleNotebookEditors = [];
|
|
45
|
+
this.documents = new Map();
|
|
46
|
+
this.editors = new Map();
|
|
47
|
+
this.statusBarRegistry = new cache_1.Cache('NotebookCellStatusBarCache');
|
|
48
|
+
// --- serialize/deserialize
|
|
49
|
+
this.currentSerializerHandle = 0;
|
|
50
|
+
this.notebookSerializer = new Map();
|
|
51
|
+
this.notebookProxy = rpc.getProxy(common_1.PLUGIN_RPC_CONTEXT.NOTEBOOKS_MAIN);
|
|
52
|
+
this.notebookDocumentsProxy = rpc.getProxy(common_1.PLUGIN_RPC_CONTEXT.NOTEBOOK_DOCUMENTS_MAIN);
|
|
53
|
+
this.notebookEditors = rpc.getProxy(common_1.PLUGIN_RPC_CONTEXT.NOTEBOOK_EDITORS_MAIN);
|
|
54
|
+
commands.registerArgumentProcessor({
|
|
55
|
+
processArgument: (arg) => {
|
|
56
|
+
var _a;
|
|
57
|
+
if (arg && arg.uri && this.documents.has(arg.uri.toString())) {
|
|
58
|
+
return (_a = this.documents.get(arg.uri.toString())) === null || _a === void 0 ? void 0 : _a.apiNotebook;
|
|
59
|
+
}
|
|
60
|
+
return arg;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
get activeApiNotebookEditor() {
|
|
65
|
+
var _a;
|
|
66
|
+
return (_a = this.activeNotebookEditor) === null || _a === void 0 ? void 0 : _a.apiEditor;
|
|
67
|
+
}
|
|
68
|
+
get visibleApiNotebookEditors() {
|
|
69
|
+
return this.visibleNotebookEditors.map(editor => editor.apiEditor);
|
|
70
|
+
}
|
|
71
|
+
async $provideNotebookCellStatusBarItems(handle, uri, index, token) {
|
|
72
|
+
const provider = this.notebookStatusBarItemProviders.get(handle);
|
|
73
|
+
const revivedUri = core_1.URI.fromComponents(uri);
|
|
74
|
+
const document = this.documents.get(revivedUri.toString());
|
|
75
|
+
if (!document || !provider) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const cell = document.getCellFromIndex(index);
|
|
79
|
+
if (!cell) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const result = await provider.provideCellStatusBarItems(cell.apiCell, token);
|
|
83
|
+
if (!result) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
const disposables = new core_1.DisposableCollection();
|
|
87
|
+
const cacheId = this.statusBarRegistry.add([disposables]);
|
|
88
|
+
const resultArr = Array.isArray(result) ? result : [result];
|
|
89
|
+
const items = resultArr.map(item => typeConverters.NotebookStatusBarItem.from(item, this.commandsConverter, disposables));
|
|
90
|
+
return {
|
|
91
|
+
cacheId,
|
|
92
|
+
items
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
$releaseNotebookCellStatusBarItems(cacheId) {
|
|
96
|
+
this.statusBarRegistry.delete(cacheId);
|
|
97
|
+
}
|
|
98
|
+
registerNotebookSerializer(plugin, viewType, serializer, options) {
|
|
99
|
+
if (!viewType || !viewType.trim()) {
|
|
100
|
+
throw new Error('viewType cannot be empty or just whitespace');
|
|
101
|
+
}
|
|
102
|
+
const handle = this.currentSerializerHandle++;
|
|
103
|
+
this.notebookSerializer.set(handle, serializer);
|
|
104
|
+
this.notebookProxy.$registerNotebookSerializer(handle, { id: plugin.model.id, location: plugin.pluginUri }, viewType, typeConverters.NotebookDocumentContentOptions.from(options));
|
|
105
|
+
return core_1.Disposable.create(() => {
|
|
106
|
+
this.notebookProxy.$unregisterNotebookSerializer(handle);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
async $dataToNotebook(handle, bytes, token) {
|
|
110
|
+
const serializer = this.notebookSerializer.get(handle);
|
|
111
|
+
if (!serializer) {
|
|
112
|
+
throw new Error('No serializer found');
|
|
113
|
+
}
|
|
114
|
+
const data = await serializer.deserializeNotebook(bytes.buffer, token);
|
|
115
|
+
return typeConverters.NotebookData.from(data);
|
|
116
|
+
}
|
|
117
|
+
async $notebookToData(handle, data, token) {
|
|
118
|
+
const serializer = this.notebookSerializer.get(handle);
|
|
119
|
+
if (!serializer) {
|
|
120
|
+
throw new Error('No serializer found');
|
|
121
|
+
}
|
|
122
|
+
const bytes = await serializer.serializeNotebook(typeConverters.NotebookData.to(data), token);
|
|
123
|
+
return buffer_1.BinaryBuffer.wrap(bytes);
|
|
124
|
+
}
|
|
125
|
+
registerNotebookCellStatusBarItemProvider(notebookType, provider) {
|
|
126
|
+
const handle = this.currentSerializerHandle++;
|
|
127
|
+
const eventHandle = typeof provider.onDidChangeCellStatusBarItems === 'function' ? this.currentSerializerHandle++ : undefined;
|
|
128
|
+
this.notebookStatusBarItemProviders.set(handle, provider);
|
|
129
|
+
this.notebookProxy.$registerNotebookCellStatusBarItemProvider(handle, eventHandle, notebookType);
|
|
130
|
+
let subscription;
|
|
131
|
+
if (eventHandle !== undefined) {
|
|
132
|
+
subscription = provider.onDidChangeCellStatusBarItems(_ => this.notebookProxy.$emitCellStatusBarEvent(eventHandle));
|
|
133
|
+
}
|
|
134
|
+
return core_1.Disposable.create(() => {
|
|
135
|
+
this.notebookStatusBarItemProviders.delete(handle);
|
|
136
|
+
this.notebookProxy.$unregisterNotebookCellStatusBarItemProvider(handle, eventHandle);
|
|
137
|
+
subscription === null || subscription === void 0 ? void 0 : subscription.dispose();
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
getEditorById(editorId) {
|
|
141
|
+
const editor = this.editors.get(editorId);
|
|
142
|
+
if (!editor) {
|
|
143
|
+
throw new Error(`unknown text editor: ${editorId}. known editors: ${[...this.editors.keys()]} `);
|
|
144
|
+
}
|
|
145
|
+
return editor;
|
|
146
|
+
}
|
|
147
|
+
getAllApiDocuments() {
|
|
148
|
+
return [...this.documents.values()].map(doc => doc.apiNotebook);
|
|
149
|
+
}
|
|
150
|
+
async $acceptDocumentsAndEditorsDelta(delta) {
|
|
151
|
+
var _a, _b, _c;
|
|
152
|
+
if (delta.removedDocuments) {
|
|
153
|
+
for (const uri of delta.removedDocuments) {
|
|
154
|
+
const revivedUri = core_1.URI.fromComponents(uri);
|
|
155
|
+
const document = this.documents.get(revivedUri.toString());
|
|
156
|
+
if (document) {
|
|
157
|
+
document.dispose();
|
|
158
|
+
this.documents.delete(revivedUri.toString());
|
|
159
|
+
this.onDidCloseNotebookDocumentEmitter.fire(document.apiNotebook);
|
|
160
|
+
}
|
|
161
|
+
for (const editor of this.editors.values()) {
|
|
162
|
+
if (editor.notebookData.uri.toString() === revivedUri.toString()) {
|
|
163
|
+
this.editors.delete(editor.id);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (delta.addedDocuments) {
|
|
169
|
+
for (const modelData of delta.addedDocuments) {
|
|
170
|
+
const uri = types_impl_1.URI.from(modelData.uri);
|
|
171
|
+
if (this.documents.has(uri.toString())) {
|
|
172
|
+
throw new Error(`adding EXISTING notebook ${uri} `);
|
|
173
|
+
}
|
|
174
|
+
const document = new notebook_document_1.NotebookDocument(this.notebookDocumentsProxy, this.textDocumentsAndEditors, this.textDocuments, uri, modelData);
|
|
175
|
+
(_a = this.documents.get(uri.toString())) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
176
|
+
this.documents.set(uri.toString(), document);
|
|
177
|
+
this.onDidOpenNotebookDocumentEmitter.fire(document.apiNotebook);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (delta.addedEditors) {
|
|
181
|
+
for (const editorModelData of delta.addedEditors) {
|
|
182
|
+
if (this.editors.has(editorModelData.id)) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const revivedUri = core_1.URI.fromComponents(editorModelData.documentUri);
|
|
186
|
+
const document = this.documents.get(revivedUri.toString());
|
|
187
|
+
if (document) {
|
|
188
|
+
this.createExtHostEditor(document, editorModelData.id, editorModelData);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const removedEditors = [];
|
|
193
|
+
if (delta.removedEditors) {
|
|
194
|
+
for (const editorId of delta.removedEditors) {
|
|
195
|
+
const editor = this.editors.get(editorId);
|
|
196
|
+
if (editor) {
|
|
197
|
+
this.editors.delete(editorId);
|
|
198
|
+
if (((_b = this.activeNotebookEditor) === null || _b === void 0 ? void 0 : _b.id) === editor.id) {
|
|
199
|
+
this.activeNotebookEditor = undefined;
|
|
200
|
+
}
|
|
201
|
+
removedEditors.push(editor);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (delta.visibleEditors) {
|
|
206
|
+
this.visibleNotebookEditors = delta.visibleEditors.map(id => this.editors.get(id)).filter(editor => !!editor);
|
|
207
|
+
const visibleEditorsSet = new Set();
|
|
208
|
+
this.visibleNotebookEditors.forEach(editor => visibleEditorsSet.add(editor.id));
|
|
209
|
+
for (const editor of this.editors.values()) {
|
|
210
|
+
const newValue = visibleEditorsSet.has(editor.id);
|
|
211
|
+
editor.acceptVisibility(newValue);
|
|
212
|
+
}
|
|
213
|
+
this.visibleNotebookEditors = [...this.editors.values()].map(e => e).filter(e => e.visible);
|
|
214
|
+
this.onDidChangeVisibleNotebookEditorsEmitter.fire(this.visibleApiNotebookEditors);
|
|
215
|
+
}
|
|
216
|
+
if (delta.newActiveEditor === null) {
|
|
217
|
+
// clear active notebook as current active editor is non-notebook editor
|
|
218
|
+
this.activeNotebookEditor = undefined;
|
|
219
|
+
}
|
|
220
|
+
else if (delta.newActiveEditor) {
|
|
221
|
+
const activeEditor = this.editors.get(delta.newActiveEditor);
|
|
222
|
+
if (!activeEditor) {
|
|
223
|
+
console.error(`FAILED to find active notebook editor ${delta.newActiveEditor}`);
|
|
224
|
+
}
|
|
225
|
+
this.activeNotebookEditor = this.editors.get(delta.newActiveEditor);
|
|
226
|
+
}
|
|
227
|
+
if (delta.newActiveEditor !== undefined) {
|
|
228
|
+
this.onDidChangeActiveNotebookEditorEmitter.fire((_c = this.activeNotebookEditor) === null || _c === void 0 ? void 0 : _c.apiEditor);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
getNotebookDocument(uri, relaxed) {
|
|
232
|
+
const result = this.documents.get(uri.toString());
|
|
233
|
+
if (!result && !relaxed) {
|
|
234
|
+
throw new Error(`NO notebook document for '${uri}'`);
|
|
235
|
+
}
|
|
236
|
+
return result;
|
|
237
|
+
}
|
|
238
|
+
createExtHostEditor(document, editorId, data) {
|
|
239
|
+
if (this.editors.has(editorId)) {
|
|
240
|
+
throw new Error(`editor with id ALREADY EXISTS: ${editorId}`);
|
|
241
|
+
}
|
|
242
|
+
const editor = new notebook_editor_1.NotebookEditor(editorId, document, data.visibleRanges.map(typeConverters.NotebookRange.to), data.selections.map(typeConverters.NotebookRange.to), typeof data.viewColumn === 'number' ? typeConverters.ViewColumn.to(data.viewColumn) : undefined);
|
|
243
|
+
this.editors.set(editorId, editor);
|
|
244
|
+
}
|
|
245
|
+
async createNotebookDocument(options) {
|
|
246
|
+
const canonicalUri = await this.notebookDocumentsProxy.$tryCreateNotebook({
|
|
247
|
+
viewType: options.viewType,
|
|
248
|
+
content: options.content && typeConverters.NotebookData.from(options.content)
|
|
249
|
+
});
|
|
250
|
+
return types_impl_1.URI.from(canonicalUri);
|
|
251
|
+
}
|
|
252
|
+
async openNotebookDocument(uri) {
|
|
253
|
+
const cached = this.documents.get(uri.toString());
|
|
254
|
+
if (cached) {
|
|
255
|
+
return cached.apiNotebook;
|
|
256
|
+
}
|
|
257
|
+
const canonicalUri = await this.notebookDocumentsProxy.$tryOpenNotebook(uri);
|
|
258
|
+
const document = this.documents.get(core_1.URI.fromComponents(canonicalUri).toString());
|
|
259
|
+
return document === null || document === void 0 ? void 0 : document.apiNotebook;
|
|
260
|
+
}
|
|
261
|
+
async showNotebookDocument(notebookOrUri, options) {
|
|
262
|
+
var _a;
|
|
263
|
+
if (core_1.URI.isUri(notebookOrUri)) {
|
|
264
|
+
notebookOrUri = await this.openNotebookDocument(notebookOrUri);
|
|
265
|
+
}
|
|
266
|
+
const notebook = notebookOrUri;
|
|
267
|
+
let resolvedOptions;
|
|
268
|
+
if (typeof options === 'object') {
|
|
269
|
+
resolvedOptions = {
|
|
270
|
+
position: typeConverters.ViewColumn.from(options.viewColumn),
|
|
271
|
+
preserveFocus: options.preserveFocus,
|
|
272
|
+
selections: options.selections && options.selections.map(typeConverters.NotebookRange.from),
|
|
273
|
+
pinned: typeof options.preview === 'boolean' ? !options.preview : undefined
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
resolvedOptions = {
|
|
278
|
+
preserveFocus: false
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
const editorId = await this.notebookEditors.$tryShowNotebookDocument(notebook.uri, notebook.notebookType, resolvedOptions);
|
|
282
|
+
const editor = editorId && ((_a = this.editors.get(editorId)) === null || _a === void 0 ? void 0 : _a.apiEditor);
|
|
283
|
+
if (editor) {
|
|
284
|
+
return editor;
|
|
285
|
+
}
|
|
286
|
+
if (editorId) {
|
|
287
|
+
throw new Error(`Could NOT open editor for "${notebook.uri.toString()}" because another editor opened in the meantime.`);
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
throw new Error(`Could NOT open editor for "${notebook.uri.toString()}".`);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
exports.NotebooksExtImpl = NotebooksExtImpl;
|
|
295
|
+
//# sourceMappingURL=notebooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebooks.js","sourceRoot":"","sources":["../../../src/plugin/notebook/notebooks.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,sCAAuG;AACvG,8CAAgD;AAEhD,yCAIsB;AACtB,8CAA2C;AAI3C,qDAAqD;AACrD,0DAA6D;AAC7D,2DAAuD;AACvD,uDAAmD;AAInD,MAAa,gBAAgB;IAkCzB,YACI,GAAgB,EAChB,QAA4B,EACpB,uBAAmD,EACnD,aAA+B;QAD/B,4BAAuB,GAAvB,uBAAuB,CAA4B;QACnD,kBAAa,GAAb,aAAa,CAAkB;QApC1B,mCAA8B,GAAG,IAAI,GAAG,EAAmD,CAAC;QAG5F,2CAAsC,GAAG,IAAI,cAAO,EAAoC,CAAC;QACjG,oCAA+B,GAAG,IAAI,CAAC,sCAAsC,CAAC,KAAK,CAAC;QAE5E,qCAAgC,GAAG,IAAI,cAAO,EAA0B,CAAC;QAC1F,8BAAyB,GAAkC,IAAI,CAAC,gCAAgC,CAAC,KAAK,CAAC;QACtF,sCAAiC,GAAG,IAAI,cAAO,EAA0B,CAAC;QAC3F,+BAA0B,GAAkC,IAAI,CAAC,iCAAiC,CAAC,KAAK,CAAC;QAExF,6CAAwC,GAAG,IAAI,cAAO,EAA0B,CAAC;QAClG,sCAAiC,GAAG,IAAI,CAAC,wCAAwC,CAAC,KAAK,CAAC;QAOhF,2BAAsB,GAAqB,EAAE,CAAC;QAKrC,cAAS,GAAG,IAAI,GAAG,EAA4B,CAAC;QAChD,YAAO,GAAG,IAAI,GAAG,EAA0B,CAA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,EAAE,kDAAkD,CAAC,CAAC;SAC5H;aAAM;YACH,MAAM,IAAI,KAAK,CAAC,8BAA8B,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SAC9E;IACL,CAAC;CAEJ;AAzVD,4CAyVC"}
|
|
@@ -34,7 +34,7 @@ export interface ExtensionPlugin<T> extends theia.Plugin<T> {
|
|
|
34
34
|
extensionKind: theia.ExtensionKind;
|
|
35
35
|
}
|
|
36
36
|
export declare class Plugin<T> implements theia.Plugin<T> {
|
|
37
|
-
|
|
37
|
+
#private;
|
|
38
38
|
id: string;
|
|
39
39
|
pluginPath: string;
|
|
40
40
|
pluginUri: theia.Uri;
|
|
@@ -46,7 +46,7 @@ export declare class Plugin<T> implements theia.Plugin<T> {
|
|
|
46
46
|
activate(): PromiseLike<T>;
|
|
47
47
|
}
|
|
48
48
|
export declare class PluginExt<T> extends Plugin<T> implements ExtensionPlugin<T> {
|
|
49
|
-
|
|
49
|
+
#private;
|
|
50
50
|
extensionPath: string;
|
|
51
51
|
extensionUri: theia.Uri;
|
|
52
52
|
extensionKind: ExtensionKind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-context.d.ts","sourceRoot":"","sources":["../../src/plugin/plugin-context.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,KAAK,MAAM,eAAe,CAAC;AAK5C,OAAO,EAEH,MAAM,IAAI,cAAc,EACxB,aAAa,EACb,gBAAgB,EAInB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,
|
|
1
|
+
{"version":3,"file":"plugin-context.d.ts","sourceRoot":"","sources":["../../src/plugin/plugin-context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