@theia/plugin-ext 1.51.0 → 1.53.0-next.18
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/plugin-api-rpc-model.d.ts +14 -2
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +27 -19
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/rpc-protocol.d.ts +14 -13
- package/lib/common/rpc-protocol.d.ts.map +1 -1
- package/lib/common/rpc-protocol.js +56 -53
- package/lib/common/rpc-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +8 -2
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/browser/worker/worker-main.js +2 -2
- package/lib/hosted/browser/worker/worker-main.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.d.ts +1 -1
- package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.js +2 -2
- package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
- package/lib/hosted/node/hosted-plugin.d.ts +1 -1
- package/lib/hosted/node/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin.js +2 -2
- package/lib/hosted/node/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/plugin-service.d.ts +1 -0
- package/lib/hosted/node/plugin-service.d.ts.map +1 -1
- package/lib/hosted/node/plugin-service.js +4 -1
- package/lib/hosted/node/plugin-service.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +13 -0
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/authentication-main.d.ts +5 -2
- package/lib/main/browser/authentication-main.d.ts.map +1 -1
- package/lib/main/browser/command-registry-main.d.ts +5 -2
- package/lib/main/browser/command-registry-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +5 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js +107 -31
- package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-undo-redo-handler.d.ts +10 -0
- package/lib/main/browser/custom-editors/custom-editor-undo-redo-handler.d.ts.map +1 -0
- package/lib/main/browser/custom-editors/{custom-editor-contribution.js → custom-editor-undo-redo-handler.js} +23 -17
- package/lib/main/browser/custom-editors/custom-editor-undo-redo-handler.js.map +1 -0
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts +7 -6
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js +21 -12
- package/lib/main/browser/custom-editors/custom-editor-widget.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts +14 -8
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +11 -55
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts +3 -3
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js +19 -15
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js.map +1 -1
- package/lib/main/browser/debug/debug-main.d.ts +3 -0
- package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
- package/lib/main/browser/debug/debug-main.js +20 -2
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts +5 -2
- package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +7 -4
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.js +6 -5
- package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts +5 -2
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/notebooks/notebook-documents-main.d.ts.map +1 -1
- package/lib/main/browser/notebooks/notebook-documents-main.js +1 -0
- package/lib/main/browser/notebooks/notebook-documents-main.js.map +1 -1
- package/lib/main/browser/notebooks/notebooks-main.d.ts +5 -2
- package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +1 -1
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
- package/lib/main/browser/notebooks/renderers/cell-output-webview.js +75 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -1
- package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js +38 -19
- package/lib/main/browser/notebooks/renderers/output-webview-internal.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 +21 -3
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +8 -3
- package/lib/main/browser/quick-open-main.d.ts.map +1 -1
- package/lib/main/browser/quick-open-main.js +21 -38
- package/lib/main/browser/quick-open-main.js.map +1 -1
- package/lib/main/browser/terminal-main.d.ts +10 -4
- package/lib/main/browser/terminal-main.d.ts.map +1 -1
- package/lib/main/browser/terminal-main.js +21 -2
- package/lib/main/browser/terminal-main.js.map +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.d.ts +5 -2
- package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +5 -2
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-views-main.d.ts +5 -2
- package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +6 -5
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +5 -4
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/browser/webview-views/webview-views-main.d.ts +5 -2
- package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
- package/lib/main/browser/webviews-main.d.ts +5 -2
- package/lib/main/browser/webviews-main.d.ts.map +1 -1
- package/lib/main/browser/webviews-main.js +6 -1
- package/lib/main/browser/webviews-main.js.map +1 -1
- package/lib/main/browser/workspace-main.d.ts +5 -2
- package/lib/main/browser/workspace-main.d.ts.map +1 -1
- package/lib/plugin/authentication-ext.d.ts +5 -2
- package/lib/plugin/authentication-ext.d.ts.map +1 -1
- package/lib/plugin/clipboard-ext.d.ts +5 -2
- package/lib/plugin/clipboard-ext.d.ts.map +1 -1
- package/lib/plugin/command-registry.d.ts +5 -2
- package/lib/plugin/command-registry.d.ts.map +1 -1
- package/lib/plugin/comments.d.ts +5 -2
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/custom-editors.d.ts +7 -6
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/custom-editors.js +5 -7
- package/lib/plugin/custom-editors.js.map +1 -1
- package/lib/plugin/debug/debug-ext.d.ts +13 -3
- package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
- package/lib/plugin/debug/debug-ext.js +46 -3
- package/lib/plugin/debug/debug-ext.js.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +5 -2
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +5 -2
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +5 -2
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
- package/lib/plugin/decorations.d.ts +5 -2
- package/lib/plugin/decorations.d.ts.map +1 -1
- package/lib/plugin/dialogs.d.ts +5 -2
- package/lib/plugin/dialogs.d.ts.map +1 -1
- package/lib/plugin/document-data.d.ts +5 -2
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/documents.d.ts +5 -2
- package/lib/plugin/documents.d.ts.map +1 -1
- package/lib/plugin/env.d.ts +5 -2
- package/lib/plugin/env.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts +5 -2
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts +5 -2
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/label-service.d.ts +5 -2
- package/lib/plugin/label-service.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +5 -2
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/code-action.d.ts +5 -2
- package/lib/plugin/languages/code-action.d.ts.map +1 -1
- package/lib/plugin/languages/color.d.ts +5 -2
- package/lib/plugin/languages/color.d.ts.map +1 -1
- package/lib/plugin/languages/completion.d.ts +5 -2
- package/lib/plugin/languages/completion.d.ts.map +1 -1
- package/lib/plugin/languages/declaration.d.ts +5 -2
- package/lib/plugin/languages/declaration.d.ts.map +1 -1
- package/lib/plugin/languages/definition.d.ts +5 -2
- package/lib/plugin/languages/definition.d.ts.map +1 -1
- package/lib/plugin/languages/diagnostics.d.ts +5 -2
- package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
- package/lib/plugin/languages/document-drop-edit.d.ts +5 -2
- package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
- package/lib/plugin/languages/document-formatting.d.ts +5 -2
- package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/document-highlight.d.ts +5 -2
- package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
- package/lib/plugin/languages/evaluatable-expression.d.ts +5 -2
- package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
- package/lib/plugin/languages/folding.d.ts +5 -2
- package/lib/plugin/languages/folding.d.ts.map +1 -1
- package/lib/plugin/languages/hover.d.ts +5 -2
- package/lib/plugin/languages/hover.d.ts.map +1 -1
- package/lib/plugin/languages/implementation.d.ts +5 -2
- package/lib/plugin/languages/implementation.d.ts.map +1 -1
- package/lib/plugin/languages/inlay-hints.d.ts +5 -2
- package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
- package/lib/plugin/languages/inline-completion.d.ts +5 -2
- package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
- package/lib/plugin/languages/inline-values.d.ts +5 -2
- package/lib/plugin/languages/inline-values.d.ts.map +1 -1
- package/lib/plugin/languages/lens.d.ts +5 -2
- package/lib/plugin/languages/lens.d.ts.map +1 -1
- package/lib/plugin/languages/link-provider.d.ts +5 -2
- package/lib/plugin/languages/link-provider.d.ts.map +1 -1
- package/lib/plugin/languages/linked-editing-range.d.ts +5 -2
- package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
- package/lib/plugin/languages/on-type-formatting.d.ts +5 -2
- package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/outline.d.ts +5 -2
- package/lib/plugin/languages/outline.d.ts.map +1 -1
- package/lib/plugin/languages/range-formatting.d.ts +5 -2
- package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/reference.d.ts +5 -2
- package/lib/plugin/languages/reference.d.ts.map +1 -1
- package/lib/plugin/languages/rename.d.ts +5 -2
- package/lib/plugin/languages/rename.d.ts.map +1 -1
- package/lib/plugin/languages/selection-range.d.ts +5 -2
- package/lib/plugin/languages/selection-range.d.ts.map +1 -1
- package/lib/plugin/languages/semantic-highlighting.d.ts +5 -2
- package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
- package/lib/plugin/languages/signature.d.ts +5 -2
- package/lib/plugin/languages/signature.d.ts.map +1 -1
- package/lib/plugin/languages/type-definition.d.ts +5 -2
- package/lib/plugin/languages/type-definition.d.ts.map +1 -1
- package/lib/plugin/languages/type-hierarchy.d.ts +5 -2
- package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/util.d.ts +5 -2
- package/lib/plugin/languages/util.d.ts.map +1 -1
- package/lib/plugin/languages/workspace-symbol.d.ts +5 -2
- package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
- package/lib/plugin/languages-utils.d.ts +5 -2
- package/lib/plugin/languages-utils.d.ts.map +1 -1
- package/lib/plugin/languages.d.ts +5 -2
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/markdown-string.d.ts +5 -2
- package/lib/plugin/markdown-string.d.ts.map +1 -1
- package/lib/plugin/message-registry.d.ts +5 -2
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +5 -2
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-document.d.ts +5 -2
- package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-documents.d.ts +5 -2
- package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editor.d.ts +5 -2
- package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editors.d.ts +5 -2
- package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-kernels.d.ts +5 -2
- package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-renderers.d.ts +5 -2
- package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
- package/lib/plugin/notebook/notebooks.d.ts +5 -2
- package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
- package/lib/plugin/notification.d.ts +5 -2
- package/lib/plugin/notification.d.ts.map +1 -1
- package/lib/plugin/output-channel/log-output-channel.d.ts +5 -2
- package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
- package/lib/plugin/output-channel/output-channel-item.d.ts +5 -2
- package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
- package/lib/plugin/output-channel-registry.d.ts +5 -2
- package/lib/plugin/output-channel-registry.d.ts.map +1 -1
- package/lib/plugin/plugin-context.d.ts +5 -2
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +30 -12
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-icon-path.d.ts +2 -1
- package/lib/plugin/plugin-icon-path.d.ts.map +1 -1
- package/lib/plugin/plugin-icon-path.js +5 -1
- package/lib/plugin/plugin-icon-path.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts +5 -2
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-storage.d.ts +5 -2
- package/lib/plugin/plugin-storage.d.ts.map +1 -1
- package/lib/plugin/preference-registry.d.ts +5 -2
- package/lib/plugin/preference-registry.d.ts.map +1 -1
- package/lib/plugin/quick-open.d.ts +8 -19
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +22 -39
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/scm.d.ts +5 -2
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/secrets-ext.d.ts +5 -2
- package/lib/plugin/secrets-ext.d.ts.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts +5 -2
- package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
- package/lib/plugin/status-bar-message-registry.d.ts +5 -2
- package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
- package/lib/plugin/tabs.d.ts +5 -2
- package/lib/plugin/tabs.d.ts.map +1 -1
- package/lib/plugin/tasks/task-provider.d.ts +5 -2
- package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +5 -2
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.d.ts +15 -16
- package/lib/plugin/terminal-ext.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.js +15 -21
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/test-item.d.ts +5 -2
- package/lib/plugin/test-item.d.ts.map +1 -1
- package/lib/plugin/tests.d.ts +10 -6
- package/lib/plugin/tests.d.ts.map +1 -1
- package/lib/plugin/tests.js +22 -16
- package/lib/plugin/tests.js.map +1 -1
- package/lib/plugin/text-editor.d.ts +5 -2
- package/lib/plugin/text-editor.d.ts.map +1 -1
- package/lib/plugin/text-editors.d.ts +5 -2
- package/lib/plugin/text-editors.d.ts.map +1 -1
- package/lib/plugin/timeline.d.ts +5 -2
- package/lib/plugin/timeline.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts +5 -2
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.js.map +1 -1
- package/lib/plugin/type-converters.d.ts +8 -6
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +9 -7
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +37 -6
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +37 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/webview-views.d.ts +5 -2
- package/lib/plugin/webview-views.d.ts.map +1 -1
- package/lib/plugin/webviews.d.ts +5 -2
- package/lib/plugin/webviews.d.ts.map +1 -1
- package/lib/plugin/webviews.js +1 -1
- package/lib/plugin/webviews.js.map +1 -1
- package/lib/plugin/window-state.d.ts +5 -2
- package/lib/plugin/window-state.d.ts.map +1 -1
- package/lib/plugin/workspace.d.ts +5 -2
- package/lib/plugin/workspace.d.ts.map +1 -1
- package/package.json +29 -29
- package/src/common/plugin-api-rpc-model.ts +10 -0
- package/src/common/plugin-api-rpc.ts +18 -13
- package/src/common/rpc-protocol.ts +62 -66
- package/src/hosted/browser/hosted-plugin.ts +10 -4
- package/src/hosted/browser/worker/worker-main.ts +2 -2
- package/src/hosted/node/hosted-plugin-process.ts +2 -2
- package/src/hosted/node/hosted-plugin.ts +2 -2
- package/src/hosted/node/plugin-service.ts +6 -1
- package/src/hosted/node/scanners/scanner-theia.ts +12 -0
- package/src/main/browser/custom-editors/custom-editor-opener.tsx +110 -25
- package/src/main/browser/custom-editors/custom-editor-undo-redo-handler.ts +41 -0
- package/src/main/browser/custom-editors/custom-editor-widget.ts +20 -15
- package/src/main/browser/custom-editors/custom-editors-main.ts +24 -72
- package/src/main/browser/custom-editors/plugin-custom-editor-registry.ts +15 -13
- package/src/main/browser/debug/debug-main.ts +26 -2
- package/src/main/browser/debug/plugin-debug-session-factory.ts +13 -3
- package/src/main/browser/notebooks/notebook-documents-main.ts +1 -0
- package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +77 -0
- package/src/main/browser/notebooks/renderers/output-webview-internal.ts +42 -19
- package/src/main/browser/plugin-ext-frontend-module.ts +25 -6
- package/src/main/browser/quick-open-main.ts +23 -45
- package/src/main/browser/terminal-main.ts +26 -6
- package/src/main/browser/webview/pre/service-worker.js +2 -1
- package/src/main/browser/webview/webview.ts +5 -6
- package/src/main/browser/webviews-main.ts +6 -1
- package/src/plugin/custom-editors.ts +8 -10
- package/src/plugin/debug/debug-ext.ts +56 -6
- package/src/plugin/plugin-context.ts +37 -16
- package/src/plugin/plugin-icon-path.ts +5 -2
- package/src/plugin/quick-open.ts +9 -32
- package/src/plugin/terminal-ext.ts +29 -33
- package/src/plugin/tests.ts +27 -22
- package/src/plugin/tree/tree-views.ts +1 -1
- package/src/plugin/type-converters.ts +8 -8
- package/src/plugin/types-impl.ts +48 -6
- package/src/plugin/webviews.ts +1 -1
- package/lib/common/proxy-handler.d.ts +0 -73
- package/lib/common/proxy-handler.d.ts.map +0 -1
- package/lib/common/proxy-handler.js +0 -106
- package/lib/common/proxy-handler.js.map +0 -1
- package/lib/main/browser/custom-editors/custom-editor-contribution.d.ts +0 -7
- package/lib/main/browser/custom-editors/custom-editor-contribution.d.ts.map +0 -1
- package/lib/main/browser/custom-editors/custom-editor-contribution.js.map +0 -1
- package/src/common/proxy-handler.ts +0 -143
- package/src/main/browser/custom-editors/custom-editor-contribution.ts +0 -38
|
@@ -25,11 +25,11 @@ import { RPCProtocol } from '../common/rpc-protocol';
|
|
|
25
25
|
import { Disposable, URI } from './types-impl';
|
|
26
26
|
import { UriComponents } from '../common/uri-components';
|
|
27
27
|
import { DocumentsExtImpl } from './documents';
|
|
28
|
-
import {
|
|
28
|
+
import { WebviewsExtImpl } from './webviews';
|
|
29
29
|
import { CancellationToken, CancellationTokenSource } from '@theia/core/lib/common/cancellation';
|
|
30
30
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
31
|
-
import { WorkspaceExtImpl } from './workspace';
|
|
32
31
|
import { Cache } from '../common/cache';
|
|
32
|
+
import * as Converters from './type-converters';
|
|
33
33
|
|
|
34
34
|
export class CustomEditorsExtImpl implements CustomEditorsExt {
|
|
35
35
|
private readonly proxy: CustomEditorsMain;
|
|
@@ -38,8 +38,7 @@ export class CustomEditorsExtImpl implements CustomEditorsExt {
|
|
|
38
38
|
|
|
39
39
|
constructor(rpc: RPCProtocol,
|
|
40
40
|
private readonly documentExt: DocumentsExtImpl,
|
|
41
|
-
private readonly webviewExt: WebviewsExtImpl
|
|
42
|
-
private readonly workspace: WorkspaceExtImpl) {
|
|
41
|
+
private readonly webviewExt: WebviewsExtImpl) {
|
|
43
42
|
this.proxy = rpc.getProxy(PLUGIN_RPC_CONTEXT.CUSTOM_EDITORS_MAIN);
|
|
44
43
|
}
|
|
45
44
|
|
|
@@ -116,22 +115,21 @@ export class CustomEditorsExtImpl implements CustomEditorsExt {
|
|
|
116
115
|
document.dispose();
|
|
117
116
|
}
|
|
118
117
|
|
|
119
|
-
async $resolveWebviewEditor
|
|
118
|
+
async $resolveWebviewEditor(
|
|
120
119
|
resource: UriComponents,
|
|
121
120
|
handler: string,
|
|
122
121
|
viewType: string,
|
|
123
122
|
title: string,
|
|
124
|
-
|
|
125
|
-
options: theia.WebviewPanelOptions
|
|
123
|
+
position: number,
|
|
124
|
+
options: theia.WebviewPanelOptions,
|
|
126
125
|
cancellation: CancellationToken
|
|
127
126
|
): Promise<void> {
|
|
128
127
|
const entry = this.editorProviders.get(viewType);
|
|
129
128
|
if (!entry) {
|
|
130
129
|
throw new Error(`No provider found for '${viewType}'`);
|
|
131
130
|
}
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
await this.proxy.$createCustomEditorPanel(handler, title, widgetOpenerOptions, webviewOptions);
|
|
131
|
+
const viewColumn = Converters.toViewColumn(position);
|
|
132
|
+
const panel = this.webviewExt.createWebviewPanel(viewType, title, { viewColumn }, options, entry.plugin, handler, false);
|
|
135
133
|
|
|
136
134
|
const revivedResource = URI.revive(resource);
|
|
137
135
|
|
|
@@ -18,14 +18,14 @@ import { Emitter } from '@theia/core/lib/common/event';
|
|
|
18
18
|
import { Path } from '@theia/core/lib/common/path';
|
|
19
19
|
import * as theia from '@theia/plugin';
|
|
20
20
|
import { URI } from '@theia/core/shared/vscode-uri';
|
|
21
|
-
import { Breakpoint } from '../../common/plugin-api-rpc-model';
|
|
21
|
+
import { Breakpoint, DebugStackFrameDTO, DebugThreadDTO } from '../../common/plugin-api-rpc-model';
|
|
22
22
|
import { DebugConfigurationProviderTriggerKind, DebugExt, DebugMain, PLUGIN_RPC_CONTEXT as Ext, TerminalOptionsExt } from '../../common/plugin-api-rpc';
|
|
23
23
|
import { PluginPackageDebuggersContribution } from '../../common/plugin-protocol';
|
|
24
24
|
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
25
25
|
import { CommandRegistryImpl } from '../command-registry';
|
|
26
26
|
import { ConnectionImpl } from '../../common/connection';
|
|
27
27
|
import { DEBUG_SCHEME, SCHEME_PATTERN } from '@theia/debug/lib/common/debug-uri-utils';
|
|
28
|
-
import { Disposable, Breakpoint as BreakpointExt, SourceBreakpoint, FunctionBreakpoint, Location, Range, URI as URIImpl } from '../types-impl';
|
|
28
|
+
import { Disposable, Breakpoint as BreakpointExt, SourceBreakpoint, FunctionBreakpoint, Location, Range, URI as URIImpl, DebugStackFrame, DebugThread } from '../types-impl';
|
|
29
29
|
import { PluginDebugAdapterSession } from './plugin-debug-adapter-session';
|
|
30
30
|
import { PluginDebugAdapterTracker } from './plugin-debug-adapter-tracker';
|
|
31
31
|
import { generateUuid } from '@theia/core/lib/common/uuid';
|
|
@@ -33,7 +33,8 @@ import { DebugAdapter } from '@theia/debug/lib/common/debug-model';
|
|
|
33
33
|
import { PluginDebugAdapterCreator } from './plugin-debug-adapter-creator';
|
|
34
34
|
import { NodeDebugAdapterCreator } from '../node/debug/plugin-node-debug-adapter-creator';
|
|
35
35
|
import { DebugProtocol } from '@vscode/debugprotocol';
|
|
36
|
-
import { DebugConfiguration } from '@theia/debug/lib/common/debug-configuration';
|
|
36
|
+
import { DebugConfiguration, DebugSessionOptions } from '@theia/debug/lib/common/debug-configuration';
|
|
37
|
+
import { checkTestRunInstance } from '../tests';
|
|
37
38
|
|
|
38
39
|
interface ConfigurationProviderRecord {
|
|
39
40
|
handle: number;
|
|
@@ -79,6 +80,9 @@ export class DebugExtImpl implements DebugExt {
|
|
|
79
80
|
activeDebugSession: theia.DebugSession | undefined;
|
|
80
81
|
activeDebugConsole: theia.DebugConsole;
|
|
81
82
|
|
|
83
|
+
_activeStackItem: theia.DebugStackFrame | theia.DebugThread | undefined;
|
|
84
|
+
private readonly onDidChangeActiveStackItemEmitter = new Emitter<theia.DebugStackFrame | theia.DebugThread | undefined>();
|
|
85
|
+
|
|
82
86
|
private readonly _breakpoints = new Map<string, theia.Breakpoint>();
|
|
83
87
|
|
|
84
88
|
private frontendAdapterCreator = new PluginDebugAdapterCreator();
|
|
@@ -149,6 +153,10 @@ export class DebugExtImpl implements DebugExt {
|
|
|
149
153
|
return this.onDidStartDebugSessionEmitter.event;
|
|
150
154
|
}
|
|
151
155
|
|
|
156
|
+
get onDidChangeActiveStackItem(): theia.Event<theia.DebugStackFrame | theia.DebugThread | undefined> {
|
|
157
|
+
return this.onDidChangeActiveStackItemEmitter.event;
|
|
158
|
+
}
|
|
159
|
+
|
|
152
160
|
get onDidChangeBreakpoints(): theia.Event<theia.BreakpointsChangeEvent> {
|
|
153
161
|
return this.onDidChangeBreakpointsEmitter.event;
|
|
154
162
|
}
|
|
@@ -186,7 +194,7 @@ export class DebugExtImpl implements DebugExt {
|
|
|
186
194
|
}
|
|
187
195
|
|
|
188
196
|
startDebugging(folder: theia.WorkspaceFolder | undefined, nameOrConfiguration: string | theia.DebugConfiguration, options: theia.DebugSessionOptions): PromiseLike<boolean> {
|
|
189
|
-
|
|
197
|
+
const optionsDto: DebugSessionOptions = {
|
|
190
198
|
parentSessionId: options.parentSession?.id,
|
|
191
199
|
compact: options.compact,
|
|
192
200
|
consoleMode: options.consoleMode,
|
|
@@ -194,8 +202,16 @@ export class DebugExtImpl implements DebugExt {
|
|
|
194
202
|
suppressDebugStatusbar: options.suppressDebugStatusbar,
|
|
195
203
|
suppressDebugView: options.suppressDebugView,
|
|
196
204
|
lifecycleManagedByParent: options.lifecycleManagedByParent,
|
|
197
|
-
noDebug: options.noDebug
|
|
198
|
-
}
|
|
205
|
+
noDebug: options.noDebug,
|
|
206
|
+
};
|
|
207
|
+
if (options.testRun) {
|
|
208
|
+
const run = checkTestRunInstance(options.testRun);
|
|
209
|
+
optionsDto.testRun = {
|
|
210
|
+
controllerId: run.controller.id,
|
|
211
|
+
runId: run.id
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
return this.proxy.$startDebugging(folder, nameOrConfiguration, optionsDto);
|
|
199
215
|
}
|
|
200
216
|
|
|
201
217
|
stopDebugging(session?: theia.DebugSession): PromiseLike<void> {
|
|
@@ -262,6 +278,40 @@ export class DebugExtImpl implements DebugExt {
|
|
|
262
278
|
});
|
|
263
279
|
}
|
|
264
280
|
|
|
281
|
+
set activeStackItem(stackItem: theia.DebugStackFrame | theia.DebugThread | undefined) {
|
|
282
|
+
if (this._activeStackItem === stackItem) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
this._activeStackItem = stackItem;
|
|
286
|
+
this.onDidChangeActiveStackItemEmitter.fire(this.activeStackItem);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
get activeStackItem(): theia.DebugStackFrame | theia.DebugThread | undefined {
|
|
290
|
+
return this._activeStackItem;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
async $onDidChangeActiveThread(debugThread: DebugThreadDTO | undefined): Promise<void> {
|
|
294
|
+
if (!debugThread) {
|
|
295
|
+
this.activeStackItem = undefined;
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
const session = this.sessions.get(debugThread.sessionId);
|
|
299
|
+
if (session) {
|
|
300
|
+
this.activeStackItem = new DebugThread(session, debugThread.threadId);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
async $onDidChangeActiveFrame(debugFrame: DebugStackFrameDTO | undefined): Promise<void> {
|
|
305
|
+
if (!debugFrame) {
|
|
306
|
+
this.activeStackItem = undefined;
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
const session = this.sessions.get(debugFrame!.sessionId);
|
|
310
|
+
if (session) {
|
|
311
|
+
this.activeStackItem = new DebugStackFrame(session, debugFrame.threadId, debugFrame.frameId);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
265
315
|
async $onSessionCustomEvent(sessionId: string, event: string, body?: any): Promise<void> {
|
|
266
316
|
const session = this.sessions.get(sessionId);
|
|
267
317
|
if (session) {
|
|
@@ -225,7 +225,11 @@ import {
|
|
|
225
225
|
ChatResultFeedbackKind,
|
|
226
226
|
LanguageModelChatMessage,
|
|
227
227
|
LanguageModelChatMessageRole,
|
|
228
|
-
LanguageModelError
|
|
228
|
+
LanguageModelError,
|
|
229
|
+
PortAutoForwardAction,
|
|
230
|
+
PortAttributes,
|
|
231
|
+
DebugVisualization,
|
|
232
|
+
TerminalShellExecutionCommandLineConfidence
|
|
229
233
|
} from './types-impl';
|
|
230
234
|
import { AuthenticationExtImpl } from './authentication-ext';
|
|
231
235
|
import { SymbolKind } from '../common/plugin-api-rpc-model';
|
|
@@ -316,7 +320,7 @@ export function createAPIFactory(
|
|
|
316
320
|
const themingExt = rpc.set(MAIN_RPC_CONTEXT.THEMING_EXT, new ThemingExtImpl(rpc));
|
|
317
321
|
const commentsExt = rpc.set(MAIN_RPC_CONTEXT.COMMENTS_EXT, new CommentsExtImpl(rpc, commandRegistry, documents));
|
|
318
322
|
const tabsExt = rpc.set(MAIN_RPC_CONTEXT.TABS_EXT, new TabsExtImpl(rpc));
|
|
319
|
-
const customEditorExt = rpc.set(MAIN_RPC_CONTEXT.CUSTOM_EDITORS_EXT, new CustomEditorsExtImpl(rpc, documents, webviewExt
|
|
323
|
+
const customEditorExt = rpc.set(MAIN_RPC_CONTEXT.CUSTOM_EDITORS_EXT, new CustomEditorsExtImpl(rpc, documents, webviewExt));
|
|
320
324
|
const webviewViewsExt = rpc.set(MAIN_RPC_CONTEXT.WEBVIEW_VIEWS_EXT, new WebviewViewsExtImpl(rpc, webviewExt));
|
|
321
325
|
const telemetryExt = rpc.set(MAIN_RPC_CONTEXT.TELEMETRY_EXT, new TelemetryExtImpl());
|
|
322
326
|
const testingExt = rpc.set(MAIN_RPC_CONTEXT.TESTING_EXT, new TestingExtImpl(rpc, commandRegistry));
|
|
@@ -483,7 +487,7 @@ export function createAPIFactory(
|
|
|
483
487
|
},
|
|
484
488
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
485
489
|
showQuickPick(items: any, options?: theia.QuickPickOptions, token?: theia.CancellationToken): any {
|
|
486
|
-
return quickOpenExt.showQuickPick(items, options, token);
|
|
490
|
+
return quickOpenExt.showQuickPick(plugin, items, options, token);
|
|
487
491
|
},
|
|
488
492
|
createQuickPick<T extends theia.QuickPickItem>(): theia.QuickPick<T> {
|
|
489
493
|
return quickOpenExt.createQuickPick(plugin);
|
|
@@ -564,7 +568,7 @@ export function createAPIFactory(
|
|
|
564
568
|
createTerminal(nameOrOptions: theia.TerminalOptions | theia.ExtensionTerminalOptions | theia.ExtensionTerminalOptions | (string | undefined),
|
|
565
569
|
shellPath?: string,
|
|
566
570
|
shellArgs?: string[] | string): theia.Terminal {
|
|
567
|
-
return terminalExt.createTerminal(nameOrOptions, shellPath, shellArgs);
|
|
571
|
+
return terminalExt.createTerminal(plugin, nameOrOptions, shellPath, shellArgs);
|
|
568
572
|
},
|
|
569
573
|
onDidChangeTerminalState,
|
|
570
574
|
onDidCloseTerminal,
|
|
@@ -633,6 +637,12 @@ export function createAPIFactory(
|
|
|
633
637
|
|
|
634
638
|
/** @stubbed ShareProvider */
|
|
635
639
|
registerShareProvider: () => Disposable.NULL,
|
|
640
|
+
/** @stubbed Terminal Shell Ingration */
|
|
641
|
+
onDidChangeTerminalShellIntegration: Event.None,
|
|
642
|
+
/** @stubbed Terminal Shell Ingration */
|
|
643
|
+
onDidEndTerminalShellExecution: Event.None,
|
|
644
|
+
/** @stubbed Terminal Shell Ingration */
|
|
645
|
+
onDidStartTerminalShellExecution: Event.None
|
|
636
646
|
};
|
|
637
647
|
|
|
638
648
|
const workspace: typeof theia.workspace = {
|
|
@@ -737,9 +747,8 @@ export function createAPIFactory(
|
|
|
737
747
|
} else {
|
|
738
748
|
throw new Error('Invalid arguments');
|
|
739
749
|
}
|
|
740
|
-
|
|
741
|
-
return
|
|
742
|
-
|
|
750
|
+
// Notebook extension will create a document in openNotebookDocument() or create openNotebookDocument()
|
|
751
|
+
return notebooksExt.getNotebookDocument(uri).apiNotebook;
|
|
743
752
|
},
|
|
744
753
|
createFileSystemWatcher: (pattern, ignoreCreate, ignoreChange, ignoreDelete): theia.FileSystemWatcher =>
|
|
745
754
|
extHostFileSystemEvent.createFileSystemWatcher(fromGlobPattern(pattern), ignoreCreate, ignoreChange, ignoreDelete),
|
|
@@ -814,7 +823,13 @@ export function createAPIFactory(
|
|
|
814
823
|
},
|
|
815
824
|
getCanonicalUri(uri: theia.Uri, options: theia.CanonicalUriRequestOptions, token: CancellationToken): theia.ProviderResult<theia.Uri> {
|
|
816
825
|
return workspaceExt.getCanonicalUri(uri, options, token);
|
|
817
|
-
}
|
|
826
|
+
},
|
|
827
|
+
/**
|
|
828
|
+
* @stubbed
|
|
829
|
+
* This is a stub implementation, that should minimally satisfy vscode extensions
|
|
830
|
+
* that currently use this proposed API.
|
|
831
|
+
*/
|
|
832
|
+
registerPortAttributesProvider: () => Disposable.NULL
|
|
818
833
|
};
|
|
819
834
|
|
|
820
835
|
const onDidChangeLogLevel = new Emitter<theia.LogLevel>();
|
|
@@ -1092,13 +1107,11 @@ export function createAPIFactory(
|
|
|
1092
1107
|
get onDidChangeBreakpoints(): theia.Event<theia.BreakpointsChangeEvent> {
|
|
1093
1108
|
return debugExt.onDidChangeBreakpoints;
|
|
1094
1109
|
},
|
|
1095
|
-
/** @stubbed */
|
|
1096
1110
|
get activeStackItem(): DebugThread | DebugStackFrame | undefined {
|
|
1097
|
-
return
|
|
1111
|
+
return debugExt.activeStackItem;
|
|
1098
1112
|
},
|
|
1099
|
-
/** @stubbed */
|
|
1100
1113
|
get onDidChangeActiveStackItem(): theia.Event<DebugThread | DebugStackFrame | undefined> {
|
|
1101
|
-
return
|
|
1114
|
+
return debugExt.onDidChangeActiveStackItem;
|
|
1102
1115
|
},
|
|
1103
1116
|
registerDebugAdapterDescriptorFactory(debugType: string, factory: theia.DebugAdapterDescriptorFactory): Disposable {
|
|
1104
1117
|
return debugExt.registerDebugAdapterDescriptorFactory(debugType, factory);
|
|
@@ -1134,7 +1147,11 @@ export function createAPIFactory(
|
|
|
1134
1147
|
},
|
|
1135
1148
|
asDebugSourceUri(source: theia.DebugProtocolSource, session?: theia.DebugSession): theia.Uri {
|
|
1136
1149
|
return debugExt.asDebugSourceUri(source, session);
|
|
1137
|
-
}
|
|
1150
|
+
},
|
|
1151
|
+
/** @stubbed Due to proposed API */
|
|
1152
|
+
registerDebugVisualizationProvider: () => Disposable.NULL,
|
|
1153
|
+
/** @stubbed Due to proposed API */
|
|
1154
|
+
registerDebugVisualizationTreeProvider: () => Disposable.NULL
|
|
1138
1155
|
};
|
|
1139
1156
|
|
|
1140
1157
|
const tasks: typeof theia.tasks = {
|
|
@@ -1241,7 +1258,7 @@ export function createAPIFactory(
|
|
|
1241
1258
|
}
|
|
1242
1259
|
};
|
|
1243
1260
|
|
|
1244
|
-
const chat: typeof theia.chat
|
|
1261
|
+
const chat: typeof theia.chat = {
|
|
1245
1262
|
/** @stubbed MappedEditsProvider */
|
|
1246
1263
|
registerMappedEditsProvider(documentSelector: theia.DocumentSelector, provider: theia.MappedEditsProvider): Disposable {
|
|
1247
1264
|
return Disposable.NULL;
|
|
@@ -1251,7 +1268,7 @@ export function createAPIFactory(
|
|
|
1251
1268
|
return {
|
|
1252
1269
|
id,
|
|
1253
1270
|
requestHandler: handler,
|
|
1254
|
-
dispose() {},
|
|
1271
|
+
dispose() { },
|
|
1255
1272
|
onDidReceiveFeedback: (listener, thisArgs?, disposables?) => Event.None(listener, thisArgs, disposables)
|
|
1256
1273
|
};
|
|
1257
1274
|
}
|
|
@@ -1481,7 +1498,11 @@ export function createAPIFactory(
|
|
|
1481
1498
|
ChatResultFeedbackKind,
|
|
1482
1499
|
LanguageModelChatMessage,
|
|
1483
1500
|
LanguageModelChatMessageRole,
|
|
1484
|
-
LanguageModelError
|
|
1501
|
+
LanguageModelError,
|
|
1502
|
+
PortAutoForwardAction,
|
|
1503
|
+
PortAttributes,
|
|
1504
|
+
DebugVisualization,
|
|
1505
|
+
TerminalShellExecutionCommandLineConfidence
|
|
1485
1506
|
};
|
|
1486
1507
|
};
|
|
1487
1508
|
}
|
|
@@ -24,8 +24,8 @@ export type PluginIconPath = string | URI | {
|
|
|
24
24
|
dark: string | URI
|
|
25
25
|
};
|
|
26
26
|
export namespace PluginIconPath {
|
|
27
|
-
export function toUrl(iconPath:
|
|
28
|
-
if (!iconPath) {
|
|
27
|
+
export function toUrl(iconPath: unknown, plugin: Plugin): IconUrl | undefined {
|
|
28
|
+
if (!is(iconPath)) {
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
|
31
31
|
if (typeof iconPath === 'object' && 'light' in iconPath) {
|
|
@@ -36,6 +36,9 @@ export namespace PluginIconPath {
|
|
|
36
36
|
}
|
|
37
37
|
return asString(iconPath, plugin);
|
|
38
38
|
}
|
|
39
|
+
export function is(item: unknown): item is PluginIconPath {
|
|
40
|
+
return typeof item === 'string' || item instanceof URI || typeof item === 'object' && !!item && 'light' in item && 'dark' in item;
|
|
41
|
+
}
|
|
39
42
|
export function asString(arg: string | URI, plugin: Plugin): string {
|
|
40
43
|
arg = arg instanceof URI && arg.scheme === 'file' ? arg.fsPath : arg;
|
|
41
44
|
if (typeof arg !== 'string') {
|
package/src/plugin/quick-open.ts
CHANGED
|
@@ -30,8 +30,8 @@ import { convertToTransferQuickPickItems } from './type-converters';
|
|
|
30
30
|
import { PluginPackage } from '../common/plugin-protocol';
|
|
31
31
|
import { QuickInputButtonHandle } from '@theia/core/lib/browser';
|
|
32
32
|
import { MaybePromise } from '@theia/core/lib/common/types';
|
|
33
|
-
import { ThemeIcon as MonacoThemeIcon } from '@theia/monaco-editor-core/esm/vs/base/common/themables';
|
|
34
33
|
import { Severity } from '@theia/core/lib/common/severity';
|
|
34
|
+
import { PluginIconPath } from './plugin-icon-path';
|
|
35
35
|
|
|
36
36
|
const canceledName = 'Canceled';
|
|
37
37
|
/**
|
|
@@ -42,27 +42,6 @@ export function isPromiseCanceledError(error: any): boolean {
|
|
|
42
42
|
return error instanceof Error && error.name === canceledName && error.message === canceledName;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function getIconUris(iconPath: theia.QuickInputButton['iconPath']): { dark: URI, light: URI } | { id: string } {
|
|
46
|
-
if (ThemeIcon.is(iconPath)) {
|
|
47
|
-
return { id: iconPath.id };
|
|
48
|
-
}
|
|
49
|
-
const dark = getDarkIconUri(iconPath as URI | { light: URI; dark: URI; });
|
|
50
|
-
const light = getLightIconUri(iconPath as URI | { light: URI; dark: URI; });
|
|
51
|
-
// Tolerate strings: https://github.com/microsoft/vscode/issues/110432#issuecomment-726144556
|
|
52
|
-
return {
|
|
53
|
-
dark: typeof dark === 'string' ? URI.file(dark) : dark,
|
|
54
|
-
light: typeof light === 'string' ? URI.file(light) : light
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function getLightIconUri(iconPath: URI | { light: URI; dark: URI; }): URI {
|
|
59
|
-
return typeof iconPath === 'object' && 'light' in iconPath ? iconPath.light : iconPath;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function getDarkIconUri(iconPath: URI | { light: URI; dark: URI; }): URI {
|
|
63
|
-
return typeof iconPath === 'object' && 'dark' in iconPath ? iconPath.dark : iconPath;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
45
|
type Item = theia.QuickPickItem | string;
|
|
67
46
|
|
|
68
47
|
export class QuickOpenExtImpl implements QuickOpenExt {
|
|
@@ -77,10 +56,10 @@ export class QuickOpenExtImpl implements QuickOpenExt {
|
|
|
77
56
|
}
|
|
78
57
|
|
|
79
58
|
/* eslint-disable max-len */
|
|
80
|
-
showQuickPick(itemsOrItemsPromise: theia.QuickPickItem[] | Promise<theia.QuickPickItem[]>, options: theia.QuickPickOptions & { canPickMany: true; }, token?: theia.CancellationToken): Promise<Array<theia.QuickPickItem> | undefined>;
|
|
81
|
-
showQuickPick(itemsOrItemsPromise: string[] | Promise<string[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<string | undefined>;
|
|
82
|
-
showQuickPick(itemsOrItemsPromise: theia.QuickPickItem[] | Promise<theia.QuickPickItem[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<theia.QuickPickItem | undefined>;
|
|
83
|
-
showQuickPick(itemsOrItemsPromise: Item[] | Promise<Item[]>, options?: theia.QuickPickOptions, token: theia.CancellationToken = CancellationToken.None): Promise<Item | Item[] | undefined> {
|
|
59
|
+
showQuickPick(plugin: Plugin, itemsOrItemsPromise: theia.QuickPickItem[] | Promise<theia.QuickPickItem[]>, options: theia.QuickPickOptions & { canPickMany: true; }, token?: theia.CancellationToken): Promise<Array<theia.QuickPickItem> | undefined>;
|
|
60
|
+
showQuickPick(plugin: Plugin, itemsOrItemsPromise: string[] | Promise<string[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<string | undefined>;
|
|
61
|
+
showQuickPick(plugin: Plugin, itemsOrItemsPromise: theia.QuickPickItem[] | Promise<theia.QuickPickItem[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<theia.QuickPickItem | undefined>;
|
|
62
|
+
showQuickPick(plugin: Plugin, itemsOrItemsPromise: Item[] | Promise<Item[]>, options?: theia.QuickPickOptions, token: theia.CancellationToken = CancellationToken.None): Promise<Item | Item[] | undefined> {
|
|
84
63
|
this.onDidSelectItem = undefined;
|
|
85
64
|
|
|
86
65
|
const itemsPromise = Promise.resolve(itemsOrItemsPromise);
|
|
@@ -104,7 +83,7 @@ export class QuickOpenExtImpl implements QuickOpenExt {
|
|
|
104
83
|
return undefined;
|
|
105
84
|
}
|
|
106
85
|
return itemsPromise.then(async items => {
|
|
107
|
-
const pickItems = convertToTransferQuickPickItems(items);
|
|
86
|
+
const pickItems = convertToTransferQuickPickItems(plugin, items);
|
|
108
87
|
|
|
109
88
|
if (options && typeof options.onDidSelectItem === 'function') {
|
|
110
89
|
this.onDidSelectItem = handle => {
|
|
@@ -398,8 +377,7 @@ export class QuickInputExt implements theia.QuickInput {
|
|
|
398
377
|
});
|
|
399
378
|
this.update({
|
|
400
379
|
buttons: buttons.map<TransferQuickInputButton>((button, i) => ({
|
|
401
|
-
|
|
402
|
-
iconClass: ThemeIcon.is(button.iconPath) ? MonacoThemeIcon.asClassName(button.iconPath) : undefined,
|
|
380
|
+
iconUrl: PluginIconPath.toUrl(button.iconPath, this.plugin) ?? ThemeIcon.get(button.iconPath),
|
|
403
381
|
tooltip: button.tooltip,
|
|
404
382
|
handle: button === QuickInputButtons.Back ? -1 : i,
|
|
405
383
|
}))
|
|
@@ -640,15 +618,14 @@ export class QuickPickExt<T extends theia.QuickPickItem> extends QuickInputExt i
|
|
|
640
618
|
pickItems.push({
|
|
641
619
|
kind: 'item',
|
|
642
620
|
label: item.label,
|
|
643
|
-
|
|
621
|
+
iconUrl: PluginIconPath.toUrl(item.iconPath, this.plugin) ?? ThemeIcon.get(item.iconPath),
|
|
644
622
|
description: item.description,
|
|
645
623
|
handle,
|
|
646
624
|
detail: item.detail,
|
|
647
625
|
picked: item.picked,
|
|
648
626
|
alwaysShow: item.alwaysShow,
|
|
649
627
|
buttons: item.buttons?.map<TransferQuickInputButton>((button, index) => ({
|
|
650
|
-
|
|
651
|
-
iconClass: ThemeIcon.is(button.iconPath) ? MonacoThemeIcon.asClassName(button.iconPath) : undefined,
|
|
628
|
+
iconUrl: PluginIconPath.toUrl(button.iconPath, this.plugin) ?? ThemeIcon.get(button.iconPath),
|
|
652
629
|
tooltip: button.tooltip,
|
|
653
630
|
handle: button === QuickInputButtons.Back ? -1 : index,
|
|
654
631
|
}))
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
//
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
|
+
|
|
16
17
|
import { UUID } from '@theia/core/shared/@phosphor/coreutils';
|
|
17
18
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
|
-
import {
|
|
19
|
-
import { TerminalServiceExt, TerminalServiceMain, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
|
|
19
|
+
import { TerminalServiceExt, TerminalServiceMain, PLUGIN_RPC_CONTEXT, Plugin, TerminalOptions } from '../common/plugin-api-rpc';
|
|
20
20
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
21
21
|
import { Event, Emitter } from '@theia/core/lib/common/event';
|
|
22
22
|
import { MultiKeyMap } from '@theia/core/lib/common/collections';
|
|
@@ -26,28 +26,13 @@ import * as Converter from './type-converters';
|
|
|
26
26
|
import { Disposable, EnvironmentVariableMutatorType, TerminalExitReason, ThemeIcon } from './types-impl';
|
|
27
27
|
import { NO_ROOT_URI, SerializableEnvironmentVariableCollection } from '@theia/terminal/lib/common/shell-terminal-protocol';
|
|
28
28
|
import { ProvidedTerminalLink } from '../common/plugin-api-rpc-model';
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
export function getIconUris(iconPath: theia.TerminalOptions['iconPath']): { id: string } | undefined {
|
|
32
|
-
if (ThemeIcon.is(iconPath)) {
|
|
33
|
-
return { id: iconPath.id };
|
|
34
|
-
}
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function getIconClass(options: theia.TerminalOptions | theia.ExtensionTerminalOptions): string | undefined {
|
|
39
|
-
const iconClass = getIconUris(options.iconPath);
|
|
40
|
-
if (iconClass) {
|
|
41
|
-
return MonacoThemeIcon.asClassName(iconClass);
|
|
42
|
-
}
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
29
|
+
import { PluginIconPath } from './plugin-icon-path';
|
|
45
30
|
|
|
46
31
|
/**
|
|
47
32
|
* Provides high level terminal plugin api to use in the Theia plugins.
|
|
48
33
|
* This service allow(with help proxy) create and use terminal emulator.
|
|
49
34
|
*/
|
|
50
|
-
|
|
35
|
+
@injectable()
|
|
51
36
|
export class TerminalServiceExtImpl implements TerminalServiceExt {
|
|
52
37
|
private readonly proxy: TerminalServiceMain;
|
|
53
38
|
|
|
@@ -59,17 +44,17 @@ export class TerminalServiceExtImpl implements TerminalServiceExt {
|
|
|
59
44
|
private readonly terminalLinkProviders = new Map<string, theia.TerminalLinkProvider>();
|
|
60
45
|
private readonly terminalObservers = new Map<string, theia.TerminalObserver>();
|
|
61
46
|
private readonly terminalProfileProviders = new Map<string, theia.TerminalProfileProvider>();
|
|
62
|
-
private readonly onDidCloseTerminalEmitter = new Emitter<Terminal>();
|
|
63
|
-
readonly onDidCloseTerminal: theia.Event<Terminal> = this.onDidCloseTerminalEmitter.event;
|
|
47
|
+
private readonly onDidCloseTerminalEmitter = new Emitter<theia.Terminal>();
|
|
48
|
+
readonly onDidCloseTerminal: theia.Event<theia.Terminal> = this.onDidCloseTerminalEmitter.event;
|
|
64
49
|
|
|
65
|
-
private readonly onDidOpenTerminalEmitter = new Emitter<Terminal>();
|
|
66
|
-
readonly onDidOpenTerminal: theia.Event<Terminal> = this.onDidOpenTerminalEmitter.event;
|
|
50
|
+
private readonly onDidOpenTerminalEmitter = new Emitter<theia.Terminal>();
|
|
51
|
+
readonly onDidOpenTerminal: theia.Event<theia.Terminal> = this.onDidOpenTerminalEmitter.event;
|
|
67
52
|
|
|
68
|
-
private readonly onDidChangeActiveTerminalEmitter = new Emitter<Terminal | undefined>();
|
|
69
|
-
readonly onDidChangeActiveTerminal: theia.Event<Terminal | undefined> = this.onDidChangeActiveTerminalEmitter.event;
|
|
53
|
+
private readonly onDidChangeActiveTerminalEmitter = new Emitter<theia.Terminal | undefined>();
|
|
54
|
+
readonly onDidChangeActiveTerminal: theia.Event<theia.Terminal | undefined> = this.onDidChangeActiveTerminalEmitter.event;
|
|
70
55
|
|
|
71
|
-
private readonly onDidChangeTerminalStateEmitter = new Emitter<Terminal>();
|
|
72
|
-
readonly onDidChangeTerminalState: theia.Event<Terminal> = this.onDidChangeTerminalStateEmitter.event;
|
|
56
|
+
private readonly onDidChangeTerminalStateEmitter = new Emitter<theia.Terminal>();
|
|
57
|
+
readonly onDidChangeTerminalState: theia.Event<theia.Terminal> = this.onDidChangeTerminalStateEmitter.event;
|
|
73
58
|
|
|
74
59
|
protected environmentVariableCollections: MultiKeyMap<string, EnvironmentVariableCollectionImpl> = new MultiKeyMap(2);
|
|
75
60
|
|
|
@@ -97,9 +82,10 @@ export class TerminalServiceExtImpl implements TerminalServiceExt {
|
|
|
97
82
|
}
|
|
98
83
|
|
|
99
84
|
createTerminal(
|
|
100
|
-
|
|
85
|
+
plugin: Plugin,
|
|
86
|
+
nameOrOptions: theia.TerminalOptions | theia.PseudoTerminalOptions | theia.ExtensionTerminalOptions | string | undefined,
|
|
101
87
|
shellPath?: string, shellArgs?: string[] | string
|
|
102
|
-
): Terminal {
|
|
88
|
+
): theia.Terminal {
|
|
103
89
|
const id = `plugin-terminal-${UUID.uuid4()}`;
|
|
104
90
|
let options: TerminalOptions;
|
|
105
91
|
let pseudoTerminal: theia.Pseudoterminal | undefined = undefined;
|
|
@@ -122,7 +108,6 @@ export class TerminalServiceExtImpl implements TerminalServiceExt {
|
|
|
122
108
|
}
|
|
123
109
|
|
|
124
110
|
let parentId;
|
|
125
|
-
|
|
126
111
|
if (options.location && typeof options.location === 'object' && 'parentTerminal' in options.location) {
|
|
127
112
|
const parentTerminal = options.location.parentTerminal;
|
|
128
113
|
if (parentTerminal instanceof TerminalExtImpl) {
|
|
@@ -135,6 +120,15 @@ export class TerminalServiceExtImpl implements TerminalServiceExt {
|
|
|
135
120
|
}
|
|
136
121
|
}
|
|
137
122
|
|
|
123
|
+
if (typeof nameOrOptions === 'object' && 'iconPath' in nameOrOptions) {
|
|
124
|
+
const iconPath = nameOrOptions.iconPath;
|
|
125
|
+
options.iconUrl = PluginIconPath.toUrl(iconPath, plugin) ?? ThemeIcon.get(iconPath);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (typeof nameOrOptions === 'object' && 'color' in nameOrOptions) {
|
|
129
|
+
options.color = nameOrOptions.color;
|
|
130
|
+
}
|
|
131
|
+
|
|
138
132
|
this.proxy.$createTerminal(id, options, parentId, !!pseudoTerminal);
|
|
139
133
|
|
|
140
134
|
let creationOptions: theia.TerminalOptions | theia.ExtensionTerminalOptions = options;
|
|
@@ -462,7 +456,7 @@ export class EnvironmentVariableCollectionImpl implements theia.GlobalEnvironmen
|
|
|
462
456
|
}
|
|
463
457
|
}
|
|
464
458
|
|
|
465
|
-
export class TerminalExtImpl implements Terminal {
|
|
459
|
+
export class TerminalExtImpl implements theia.Terminal {
|
|
466
460
|
|
|
467
461
|
name: string;
|
|
468
462
|
|
|
@@ -476,14 +470,16 @@ export class TerminalExtImpl implements Terminal {
|
|
|
476
470
|
return this.deferredProcessId.promise;
|
|
477
471
|
}
|
|
478
472
|
|
|
479
|
-
readonly creationOptions: Readonly<TerminalOptions | ExtensionTerminalOptions>;
|
|
473
|
+
readonly creationOptions: Readonly<theia.TerminalOptions | theia.ExtensionTerminalOptions>;
|
|
480
474
|
|
|
481
|
-
state: TerminalState = { isInteractedWith: false };
|
|
475
|
+
state: theia.TerminalState = { isInteractedWith: false };
|
|
482
476
|
|
|
483
477
|
constructor(private readonly proxy: TerminalServiceMain, private readonly options: theia.TerminalOptions | theia.ExtensionTerminalOptions) {
|
|
484
478
|
this.creationOptions = this.options;
|
|
485
479
|
}
|
|
486
480
|
|
|
481
|
+
shellIntegration: theia.TerminalShellIntegration | undefined = undefined;
|
|
482
|
+
|
|
487
483
|
sendText(text: string, shouldExecute: boolean = true): void {
|
|
488
484
|
this.id.promise.then(id => this.proxy.$sendText(id, text, shouldExecute));
|
|
489
485
|
}
|
package/src/plugin/tests.ts
CHANGED
|
@@ -135,21 +135,7 @@ export class TestControllerImpl implements theia.TestController {
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
createTestRun(request: theia.TestRunRequest, name?: string, persist: boolean = true): theia.TestRun {
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
dispose() {
|
|
142
|
-
this.proxy.$unregisterTestController(this.id);
|
|
143
|
-
this.onDispose();
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
protected testRunStarted(request: theia.TestRunRequest, name: string, persist: boolean, isRunning: boolean): TestRun {
|
|
147
|
-
const existing = this.activeRuns.get(request);
|
|
148
|
-
if (existing) {
|
|
149
|
-
return existing;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
const run = new TestRun(this, this.proxy, name, persist, isRunning, request.preserveFocus);
|
|
138
|
+
const run = new TestRun(this, this.proxy, name || '', persist, true, request.preserveFocus);
|
|
153
139
|
const endListener = run.onWillFlush(() => {
|
|
154
140
|
// make sure we notify the front end of test item changes before test run state is sent
|
|
155
141
|
this.deltaBuilder.flush();
|
|
@@ -162,6 +148,11 @@ export class TestControllerImpl implements theia.TestController {
|
|
|
162
148
|
return run;
|
|
163
149
|
}
|
|
164
150
|
|
|
151
|
+
dispose() {
|
|
152
|
+
this.proxy.$unregisterTestController(this.id);
|
|
153
|
+
this.onDispose();
|
|
154
|
+
}
|
|
155
|
+
|
|
165
156
|
runTestsForUI(profileId: string, name: string, includedTests: string[][], excludedTests: string[][], preserveFocus: boolean): void {
|
|
166
157
|
const profile = this.getProfile(profileId);
|
|
167
158
|
if (!profile) {
|
|
@@ -200,8 +191,8 @@ export class TestControllerImpl implements theia.TestController {
|
|
|
200
191
|
includeTests, excludeTests, profile, false /* don't support continuous run yet */, preserveFocus
|
|
201
192
|
);
|
|
202
193
|
|
|
203
|
-
|
|
204
|
-
profile.runHandler(request,
|
|
194
|
+
// we do not cancel test runs via a cancellation token, but instead invoke "cancel" on the test runs
|
|
195
|
+
profile.runHandler(request, CancellationToken.None);
|
|
205
196
|
}
|
|
206
197
|
|
|
207
198
|
cancelRun(runId?: string): void {
|
|
@@ -235,7 +226,18 @@ function checkTestInstance(item?: theia.TestItem): TestItemImpl | undefined {
|
|
|
235
226
|
return undefined;
|
|
236
227
|
}
|
|
237
228
|
|
|
238
|
-
|
|
229
|
+
export function checkTestRunInstance(item: theia.TestRun): TestRun;
|
|
230
|
+
export function checkTestRunInstance(item?: theia.TestRun): TestRun | undefined;
|
|
231
|
+
export function checkTestRunInstance(item?: theia.TestRun): TestRun | undefined {
|
|
232
|
+
if (item instanceof TestRun) {
|
|
233
|
+
return <TestRun>item;
|
|
234
|
+
} else if (item) {
|
|
235
|
+
throw new Error('Not a TestRun instance');
|
|
236
|
+
}
|
|
237
|
+
return undefined;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export class TestRun implements theia.TestRun {
|
|
239
241
|
private onDidEndEmitter = new Emitter<void>();
|
|
240
242
|
onDidEnd: Event<void> = this.onDidEndEmitter.event;
|
|
241
243
|
private onWillFlushEmitter = new Emitter<void>();
|
|
@@ -251,10 +253,9 @@ class TestRun implements theia.TestRun {
|
|
|
251
253
|
}, 200);
|
|
252
254
|
private ended: boolean;
|
|
253
255
|
private tokenSource: CancellationTokenSource;
|
|
254
|
-
readonly token: CancellationToken;
|
|
255
256
|
|
|
256
257
|
constructor(
|
|
257
|
-
|
|
258
|
+
readonly controller: TestControllerImpl,
|
|
258
259
|
private readonly proxy: TestingMain,
|
|
259
260
|
readonly name: string,
|
|
260
261
|
readonly isPersisted: boolean,
|
|
@@ -263,10 +264,14 @@ class TestRun implements theia.TestRun {
|
|
|
263
264
|
this.id = generateUuid();
|
|
264
265
|
|
|
265
266
|
this.tokenSource = new CancellationTokenSource();
|
|
266
|
-
this.token = this.tokenSource.token;
|
|
267
267
|
|
|
268
268
|
this.proxy.$notifyTestRunCreated(this.controller.id, { id: this.id, name: this.name, isRunning }, preserveFocus);
|
|
269
269
|
}
|
|
270
|
+
|
|
271
|
+
get token(): CancellationToken {
|
|
272
|
+
return this.tokenSource.token;
|
|
273
|
+
}
|
|
274
|
+
|
|
270
275
|
enqueued(test: theia.TestItem): void {
|
|
271
276
|
this.updateTestState(test, { itemPath: checkTestInstance(test).path, state: TestExecutionState.Queued });
|
|
272
277
|
}
|
|
@@ -509,7 +514,7 @@ export class TestRunProfile implements theia.TestRunProfile {
|
|
|
509
514
|
}
|
|
510
515
|
|
|
511
516
|
doSetDefault(isDefault: boolean): boolean {
|
|
512
|
-
|
|
517
|
+
if (this._isDefault !== isDefault) {
|
|
513
518
|
this._isDefault = isDefault;
|
|
514
519
|
this.onDidChangeDefaultEmitter.fire(isDefault);
|
|
515
520
|
return true;
|
|
@@ -446,7 +446,7 @@ class TreeViewExtImpl<T> implements Disposable {
|
|
|
446
446
|
} else if (ThemeIcon.is(iconPath)) {
|
|
447
447
|
themeIcon = iconPath;
|
|
448
448
|
} else {
|
|
449
|
-
iconUrl = PluginIconPath.toUrl(
|
|
449
|
+
iconUrl = PluginIconPath.toUrl(iconPath, this.plugin);
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
let checkboxInfo;
|