@theia/plugin-ext 1.77.0-next.49 → 1.77.0-next.56
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/character-classifier.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +2 -0
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +4 -2
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.spec.d.ts +2 -0
- package/lib/hosted/browser/hosted-plugin.spec.d.ts.map +1 -0
- package/lib/hosted/browser/hosted-plugin.spec.js +59 -0
- package/lib/hosted/browser/hosted-plugin.spec.js.map +1 -0
- package/lib/hosted/browser/worker/worker-main.js +2 -1
- package/lib/hosted/browser/worker/worker-main.js.map +1 -1
- package/lib/hosted/browser-only/browser-only-plugin-paths-service.js +1 -1
- package/lib/hosted/browser-only/browser-only-plugin-paths-service.js.map +1 -1
- package/lib/hosted/browser-only/browser-only-plugin-paths-service.spec.js +2 -1
- package/lib/hosted/browser-only/browser-only-plugin-paths-service.spec.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.js +2 -2
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.js +1 -1
- package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
- package/lib/hosted/node/plugin-deployer-handler-impl.js +1 -1
- package/lib/hosted/node/plugin-deployer-handler-impl.js.map +1 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js +2 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
- package/lib/hosted/node/plugin-host-proxy.d.ts.map +1 -1
- package/lib/hosted/node/plugin-host-proxy.js +10 -6
- package/lib/hosted/node/plugin-host-proxy.js.map +1 -1
- package/lib/hosted/node/plugin-host-rpc.js +1 -1
- package/lib/hosted/node/plugin-host-rpc.js.map +1 -1
- package/lib/hosted/node/plugin-host.js +2 -1
- package/lib/hosted/node/plugin-host.js.map +1 -1
- package/lib/hosted/node/plugin-reader.js +6 -6
- package/lib/hosted/node/plugin-reader.js.map +1 -1
- package/lib/hosted/node/plugin-reader.spec.js +4 -3
- package/lib/hosted/node/plugin-reader.spec.js.map +1 -1
- package/lib/hosted/node/plugin-require-override.d.ts.map +1 -1
- package/lib/hosted/node/plugin-require-override.js +3 -1
- package/lib/hosted/node/plugin-require-override.js.map +1 -1
- package/lib/hosted/node/plugin-require-override.spec.d.ts +2 -0
- package/lib/hosted/node/plugin-require-override.spec.d.ts.map +1 -0
- package/lib/hosted/node/plugin-require-override.spec.js +40 -0
- package/lib/hosted/node/plugin-require-override.spec.js.map +1 -0
- package/lib/hosted/node/scanners/file-plugin-uri-factory.js +1 -1
- package/lib/hosted/node/scanners/file-plugin-uri-factory.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +2 -2
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.spec.js +5 -4
- package/lib/hosted/node/scanners/scanner-theia.spec.js.map +1 -1
- package/lib/hosted/node-electron/scanner-theia-electron.js +1 -1
- package/lib/hosted/node-electron/scanner-theia-electron.js.map +1 -1
- package/lib/main/browser/commands.js +1 -1
- package/lib/main/browser/commands.js.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.js +3 -2
- package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
- package/lib/main/browser/comments/comments-contribution.js +1 -1
- package/lib/main/browser/comments/comments-contribution.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.spec.js +3 -2
- package/lib/main/browser/custom-editors/custom-editor-opener.spec.js.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.js +2 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/decorations/decorations-main.js +2 -1
- package/lib/main/browser/decorations/decorations-main.js.map +1 -1
- package/lib/main/browser/dialogs-main.js +2 -1
- package/lib/main/browser/dialogs-main.js.map +1 -1
- package/lib/main/browser/documents-main.js +3 -2
- package/lib/main/browser/documents-main.js.map +1 -1
- package/lib/main/browser/file-system-main-impl.js +3 -2
- package/lib/main/browser/file-system-main-impl.js.map +1 -1
- package/lib/main/browser/hierarchy/hierarchy-types-converters.js +3 -2
- package/lib/main/browser/hierarchy/hierarchy-types-converters.js.map +1 -1
- package/lib/main/browser/languages-main.js +3 -3
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/languages-main.spec.js +2 -1
- package/lib/main/browser/languages-main.spec.js.map +1 -1
- package/lib/main/browser/main-file-system-event-service.spec.js +2 -1
- package/lib/main/browser/main-file-system-event-service.spec.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 +3 -2
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.js +1 -1
- package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
- package/lib/main/browser/plugin-ext-widget.js +1 -1
- package/lib/main/browser/plugin-ext-widget.js.map +1 -1
- package/lib/main/browser/plugin-icon-service.js +1 -1
- package/lib/main/browser/plugin-icon-service.js.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.d.ts +2 -2
- package/lib/main/browser/plugin-icon-theme-service.d.ts.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.js +2 -2
- package/lib/main/browser/plugin-icon-theme-service.js.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.spec.js +2 -1
- package/lib/main/browser/plugin-icon-theme-service.spec.js.map +1 -1
- package/lib/main/browser/plugin-shared-style.js.map +1 -1
- package/lib/main/browser/scm-main.d.ts +3 -1
- package/lib/main/browser/scm-main.d.ts.map +1 -1
- package/lib/main/browser/scm-main.js +6 -3
- package/lib/main/browser/scm-main.js.map +1 -1
- package/lib/main/browser/scm-main.spec.js +31 -0
- package/lib/main/browser/scm-main.spec.js.map +1 -1
- package/lib/main/browser/status-bar-message-registry-main.js +2 -1
- package/lib/main/browser/status-bar-message-registry-main.js.map +1 -1
- package/lib/main/browser/text-editor-main.js +2 -1
- package/lib/main/browser/text-editor-main.js.map +1 -1
- package/lib/main/browser/text-editors-main.js +2 -1
- package/lib/main/browser/text-editors-main.js.map +1 -1
- package/lib/main/browser/view/plugin-tree-view-node-label-provider.js +1 -1
- package/lib/main/browser/view/plugin-tree-view-node-label-provider.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts +7 -2
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +19 -3
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.spec.js +82 -1
- package/lib/main/browser/view/plugin-view-registry.spec.js.map +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.js +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +1 -1
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/browser/webview/webview-theme-data-provider.d.ts +1 -1
- package/lib/main/browser/webview/webview-theme-data-provider.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +2 -2
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/browser/window-state-main.js +2 -1
- package/lib/main/browser/window-state-main.js.map +1 -1
- package/lib/main/browser/workspace-main.js +1 -1
- package/lib/main/browser/workspace-main.js.map +1 -1
- package/lib/main/common/plugin-theia-environment.js +1 -1
- package/lib/main/common/plugin-theia-environment.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-directory-handler.js +4 -4
- package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.js +3 -3
- package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
- package/lib/main/node/paths/plugin-paths-service.js +4 -4
- package/lib/main/node/paths/plugin-paths-service.js.map +1 -1
- package/lib/main/node/plugin-deployer-directory-handler-context-impl.js +2 -1
- package/lib/main/node/plugin-deployer-directory-handler-context-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-file-handler-context-impl.js +3 -2
- package/lib/main/node/plugin-deployer-file-handler-context-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-impl.js +1 -1
- package/lib/main/node/plugin-deployer-impl.js.map +1 -1
- package/lib/main/node/plugin-github-resolver.js +1 -1
- package/lib/main/node/plugin-github-resolver.js.map +1 -1
- package/lib/main/node/plugin-http-resolver.js +1 -1
- package/lib/main/node/plugin-http-resolver.js.map +1 -1
- package/lib/main/node/plugin-service.d.ts +1 -1
- package/lib/main/node/plugin-service.d.ts.map +1 -1
- package/lib/main/node/plugin-service.js +4 -4
- package/lib/main/node/plugin-service.js.map +1 -1
- package/lib/main/node/plugins-key-value-storage.js +2 -2
- package/lib/main/node/plugins-key-value-storage.js.map +1 -1
- package/lib/main/node/plugins-key-value-storage.spec.js +2 -1
- package/lib/main/node/plugins-key-value-storage.spec.js.map +1 -1
- package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js +2 -2
- package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js.map +1 -1
- package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.spec.js +4 -3
- package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.spec.js.map +1 -1
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.js +3 -3
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.js.map +1 -1
- package/lib/main/node/temp-dir-util.js +3 -2
- package/lib/main/node/temp-dir-util.js.map +1 -1
- package/lib/plugin/comments.d.ts +1 -1
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/custom-editors.js +2 -1
- package/lib/plugin/custom-editors.js.map +1 -1
- package/lib/plugin/decorations.spec.js +2 -1
- package/lib/plugin/decorations.spec.js.map +1 -1
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/document-data.js +0 -1
- package/lib/plugin/document-data.js.map +1 -1
- package/lib/plugin/documents.js +2 -1
- package/lib/plugin/documents.js.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/file-system-event-service-ext-impl.d.ts +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.js +3 -2
- package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
- package/lib/plugin/file-system-ext-impl.js +5 -4
- package/lib/plugin/file-system-ext-impl.js.map +1 -1
- package/lib/plugin/file-system-watcher.spec.js +2 -1
- package/lib/plugin/file-system-watcher.spec.js.map +1 -1
- package/lib/plugin/known-commands.js +5 -5
- package/lib/plugin/known-commands.js.map +1 -1
- package/lib/plugin/known-commands.spec.js +2 -1
- package/lib/plugin/known-commands.spec.js.map +1 -1
- package/lib/plugin/languages/call-hierarchy.js +2 -1
- package/lib/plugin/languages/call-hierarchy.js.map +1 -1
- package/lib/plugin/languages/code-action.js +2 -1
- package/lib/plugin/languages/code-action.js.map +1 -1
- package/lib/plugin/languages/color.js +2 -1
- package/lib/plugin/languages/color.js.map +1 -1
- package/lib/plugin/languages/completion.js +2 -1
- package/lib/plugin/languages/completion.js.map +1 -1
- package/lib/plugin/languages/declaration.js +3 -2
- package/lib/plugin/languages/declaration.js.map +1 -1
- package/lib/plugin/languages/definition.js +3 -2
- package/lib/plugin/languages/definition.js.map +1 -1
- package/lib/plugin/languages/document-drop-edit.js +4 -3
- package/lib/plugin/languages/document-drop-edit.js.map +1 -1
- package/lib/plugin/languages/document-formatting.js +2 -1
- package/lib/plugin/languages/document-formatting.js.map +1 -1
- package/lib/plugin/languages/document-highlight.js +3 -2
- package/lib/plugin/languages/document-highlight.js.map +1 -1
- package/lib/plugin/languages/evaluatable-expression.js +2 -1
- package/lib/plugin/languages/evaluatable-expression.js.map +1 -1
- package/lib/plugin/languages/folding.js +2 -1
- package/lib/plugin/languages/folding.js.map +1 -1
- package/lib/plugin/languages/hover.js +2 -1
- package/lib/plugin/languages/hover.js.map +1 -1
- package/lib/plugin/languages/implementation.js +3 -2
- package/lib/plugin/languages/implementation.js.map +1 -1
- package/lib/plugin/languages/inlay-hints.js +2 -1
- package/lib/plugin/languages/inlay-hints.js.map +1 -1
- package/lib/plugin/languages/inline-completion.js +2 -1
- package/lib/plugin/languages/inline-completion.js.map +1 -1
- package/lib/plugin/languages/inline-values.js +2 -1
- package/lib/plugin/languages/inline-values.js.map +1 -1
- package/lib/plugin/languages/lens.js +2 -1
- package/lib/plugin/languages/lens.js.map +1 -1
- package/lib/plugin/languages/link-provider.js +2 -1
- package/lib/plugin/languages/link-provider.js.map +1 -1
- package/lib/plugin/languages/multi-document-highlight.js +3 -2
- package/lib/plugin/languages/multi-document-highlight.js.map +1 -1
- package/lib/plugin/languages/on-type-formatting.js +2 -1
- package/lib/plugin/languages/on-type-formatting.js.map +1 -1
- package/lib/plugin/languages/outline.js +3 -2
- package/lib/plugin/languages/outline.js.map +1 -1
- package/lib/plugin/languages/range-formatting.js +2 -1
- package/lib/plugin/languages/range-formatting.js.map +1 -1
- package/lib/plugin/languages/reference.js +2 -1
- package/lib/plugin/languages/reference.js.map +1 -1
- package/lib/plugin/languages/rename.js +2 -1
- package/lib/plugin/languages/rename.js.map +1 -1
- package/lib/plugin/languages/selection-range.js +2 -1
- package/lib/plugin/languages/selection-range.js.map +1 -1
- package/lib/plugin/languages/signature.js +2 -1
- package/lib/plugin/languages/signature.js.map +1 -1
- package/lib/plugin/languages/type-definition.js +3 -2
- package/lib/plugin/languages/type-definition.js.map +1 -1
- package/lib/plugin/languages/type-hierarchy.js +2 -1
- package/lib/plugin/languages/type-hierarchy.js.map +1 -1
- package/lib/plugin/languages/util.js +2 -1
- package/lib/plugin/languages/util.js.map +1 -1
- package/lib/plugin/languages/workspace-symbol.js +2 -1
- package/lib/plugin/languages/workspace-symbol.js.map +1 -1
- package/lib/plugin/node/debug/debug.spec.js +2 -1
- package/lib/plugin/node/debug/debug.spec.js.map +1 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.js +3 -2
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.js.map +1 -1
- package/lib/plugin/node/env-node-ext.js +1 -1
- package/lib/plugin/node/env-node-ext.js.map +1 -1
- package/lib/plugin/notebook/notebook-document.js +3 -2
- package/lib/plugin/notebook/notebook-document.js.map +1 -1
- package/lib/plugin/notebook/notebook-editors.js +2 -1
- package/lib/plugin/notebook/notebook-editors.js.map +1 -1
- package/lib/plugin/notebook/notebooks.js +2 -1
- package/lib/plugin/notebook/notebooks.js.map +1 -1
- package/lib/plugin/path.spec.js +2 -1
- package/lib/plugin/path.spec.js.map +1 -1
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-icon-path.js +2 -1
- package/lib/plugin/plugin-icon-path.js.map +1 -1
- package/lib/plugin/plugin-manager.js +1 -1
- package/lib/plugin/plugin-manager.js.map +1 -1
- package/lib/plugin/preference-registry.spec.js +2 -1
- package/lib/plugin/preference-registry.spec.js.map +1 -1
- package/lib/plugin/quick-open.js +2 -1
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/relative-pattern.spec.js +3 -2
- package/lib/plugin/relative-pattern.spec.js.map +1 -1
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/scm.js +14 -1
- package/lib/plugin/scm.js.map +1 -1
- package/lib/plugin/scm.spec.js +56 -1
- package/lib/plugin/scm.spec.js.map +1 -1
- package/lib/plugin/tasks/task-provider.js +2 -1
- package/lib/plugin/tasks/task-provider.js.map +1 -1
- package/lib/plugin/tasks/tasks.js +2 -1
- package/lib/plugin/tasks/tasks.js.map +1 -1
- package/lib/plugin/telemetry-ext.spec.js +2 -1
- package/lib/plugin/telemetry-ext.spec.js.map +1 -1
- package/lib/plugin/terminal-ext.js +1 -1
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/terminal-ext.spec.js +2 -1
- package/lib/plugin/terminal-ext.spec.js.map +1 -1
- package/lib/plugin/tests.js +1 -1
- package/lib/plugin/tests.js.map +1 -1
- package/lib/plugin/text-editor.js +2 -1
- package/lib/plugin/text-editor.js.map +1 -1
- package/lib/plugin/text-editors.js +2 -1
- package/lib/plugin/text-editors.js.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.js +2 -1
- package/lib/plugin/tree/tree-views.js.map +1 -1
- package/lib/plugin/type-converters.js +6 -5
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/type-converters.spec.js +5 -4
- package/lib/plugin/type-converters.spec.js.map +1 -1
- package/lib/plugin/types-impl.js +1 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/types-impl.spec.js +3 -2
- package/lib/plugin/types-impl.spec.js.map +1 -1
- package/lib/plugin/workspace.js +2 -2
- package/lib/plugin/workspace.js.map +1 -1
- package/lib/plugin/workspace.spec.js +2 -1
- package/lib/plugin/workspace.spec.js.map +1 -1
- package/lib/plugin-ext-frontend-electron-module.js +2 -1
- package/lib/plugin-ext-frontend-electron-module.js.map +1 -1
- package/lib/plugin-ext-frontend-module.js +2 -1
- package/lib/plugin-ext-frontend-module.js.map +1 -1
- package/package.json +32 -32
- package/src/common/character-classifier.ts +1 -1
- package/src/common/plugin-api-rpc.ts +2 -0
- package/src/hosted/browser/hosted-plugin.spec.ts +66 -0
- package/src/hosted/browser/hosted-plugin.ts +3 -1
- package/src/hosted/node/plugin-host-proxy.ts +6 -3
- package/src/hosted/node/plugin-reader.ts +1 -1
- package/src/hosted/node/plugin-require-override.spec.ts +44 -0
- package/src/hosted/node/plugin-require-override.ts +1 -0
- package/src/main/browser/file-system-main-impl.ts +1 -1
- package/src/main/browser/notebooks/renderers/output-webview-internal.ts +6 -3
- package/src/main/browser/plugin-shared-style.ts +2 -2
- package/src/main/browser/scm-main.spec.ts +32 -0
- package/src/main/browser/scm-main.ts +6 -2
- package/src/main/browser/view/plugin-view-registry.spec.ts +134 -3
- package/src/main/browser/view/plugin-view-registry.ts +20 -3
- package/src/main/browser/webview/webview.ts +1 -1
- package/src/main/node/handlers/plugin-theia-directory-handler.ts +1 -1
- package/src/main/node/handlers/plugin-theia-file-handler.ts +1 -1
- package/src/main/node/plugin-deployer-file-handler-context-impl.ts +1 -1
- package/src/main/node/plugin-service.ts +1 -1
- package/src/plugin/document-data.ts +0 -1
- package/src/plugin/file-system-event-service-ext-impl.ts +1 -1
- package/src/plugin/file-system-ext-impl.ts +2 -2
- package/src/plugin/known-commands.ts +5 -5
- package/src/plugin/plugin-context.ts +3 -3
- package/src/plugin/scm.spec.ts +67 -1
- package/src/plugin/scm.ts +18 -1
- package/src/plugin/tests.ts +2 -2
- package/src/plugin/tree/tree-views.ts +2 -1
- package/src/plugin/type-converters.spec.ts +1 -1
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const
|
|
18
|
+
const tslib_1 = require("tslib");
|
|
19
|
+
const plugin_ext_frontend_electron_module_1 = tslib_1.__importDefault(require("./main/electron-browser/plugin-ext-frontend-electron-module"));
|
|
19
20
|
exports.default = plugin_ext_frontend_electron_module_1.default;
|
|
20
21
|
//# sourceMappingURL=plugin-ext-frontend-electron-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-ext-frontend-electron-module.js","sourceRoot":"","sources":["../src/plugin-ext-frontend-electron-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,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
|
|
1
|
+
{"version":3,"file":"plugin-ext-frontend-electron-module.js","sourceRoot":"","sources":["../src/plugin-ext-frontend-electron-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,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;;;AAEhF,8IAAqF;AAErF,kBAAe,6CAAU,CAAC"}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const
|
|
18
|
+
const tslib_1 = require("tslib");
|
|
19
|
+
const plugin_ext_frontend_module_1 = tslib_1.__importDefault(require("./main/browser/plugin-ext-frontend-module"));
|
|
19
20
|
exports.default = plugin_ext_frontend_module_1.default;
|
|
20
21
|
//# sourceMappingURL=plugin-ext-frontend-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-ext-frontend-module.js","sourceRoot":"","sources":["../src/plugin-ext-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,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
|
|
1
|
+
{"version":3,"file":"plugin-ext-frontend-module.js","sourceRoot":"","sources":["../src/plugin-ext-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,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;;;AAEhF,mHAAmE;AAEnE,kBAAe,oCAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-ext",
|
|
3
|
-
"version": "1.77.0-next.
|
|
3
|
+
"version": "1.77.0-next.56+320e807e1",
|
|
4
4
|
"description": "Theia - Plugin Extension",
|
|
5
5
|
"main": "lib/common/index.js",
|
|
6
6
|
"typings": "lib/common/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@theia/ai-core": "1.77.0-next.
|
|
9
|
-
"@theia/ai-mcp": "1.77.0-next.
|
|
10
|
-
"@theia/bulk-edit": "1.77.0-next.
|
|
11
|
-
"@theia/callhierarchy": "1.77.0-next.
|
|
12
|
-
"@theia/console": "1.77.0-next.
|
|
13
|
-
"@theia/core": "1.77.0-next.
|
|
14
|
-
"@theia/debug": "1.77.0-next.
|
|
15
|
-
"@theia/editor": "1.77.0-next.
|
|
16
|
-
"@theia/editor-preview": "1.77.0-next.
|
|
17
|
-
"@theia/file-search": "1.77.0-next.
|
|
18
|
-
"@theia/filesystem": "1.77.0-next.
|
|
19
|
-
"@theia/markers": "1.77.0-next.
|
|
20
|
-
"@theia/messages": "1.77.0-next.
|
|
21
|
-
"@theia/monaco": "1.77.0-next.
|
|
8
|
+
"@theia/ai-core": "1.77.0-next.56+320e807e1",
|
|
9
|
+
"@theia/ai-mcp": "1.77.0-next.56+320e807e1",
|
|
10
|
+
"@theia/bulk-edit": "1.77.0-next.56+320e807e1",
|
|
11
|
+
"@theia/callhierarchy": "1.77.0-next.56+320e807e1",
|
|
12
|
+
"@theia/console": "1.77.0-next.56+320e807e1",
|
|
13
|
+
"@theia/core": "1.77.0-next.56+320e807e1",
|
|
14
|
+
"@theia/debug": "1.77.0-next.56+320e807e1",
|
|
15
|
+
"@theia/editor": "1.77.0-next.56+320e807e1",
|
|
16
|
+
"@theia/editor-preview": "1.77.0-next.56+320e807e1",
|
|
17
|
+
"@theia/file-search": "1.77.0-next.56+320e807e1",
|
|
18
|
+
"@theia/filesystem": "1.77.0-next.56+320e807e1",
|
|
19
|
+
"@theia/markers": "1.77.0-next.56+320e807e1",
|
|
20
|
+
"@theia/messages": "1.77.0-next.56+320e807e1",
|
|
21
|
+
"@theia/monaco": "1.77.0-next.56+320e807e1",
|
|
22
22
|
"@theia/monaco-editor-core": "1.108.201",
|
|
23
|
-
"@theia/navigator": "1.77.0-next.
|
|
24
|
-
"@theia/notebook": "1.77.0-next.
|
|
25
|
-
"@theia/output": "1.77.0-next.
|
|
26
|
-
"@theia/plugin": "1.77.0-next.
|
|
27
|
-
"@theia/plugin-utils": "1.77.0-next.
|
|
28
|
-
"@theia/preferences": "1.77.0-next.
|
|
29
|
-
"@theia/scm": "1.77.0-next.
|
|
30
|
-
"@theia/search-in-workspace": "1.77.0-next.
|
|
31
|
-
"@theia/task": "1.77.0-next.
|
|
32
|
-
"@theia/telemetry": "1.77.0-next.
|
|
33
|
-
"@theia/terminal": "1.77.0-next.
|
|
34
|
-
"@theia/test": "1.77.0-next.
|
|
35
|
-
"@theia/timeline": "1.77.0-next.
|
|
36
|
-
"@theia/typehierarchy": "1.77.0-next.
|
|
37
|
-
"@theia/variable-resolver": "1.77.0-next.
|
|
38
|
-
"@theia/workspace": "1.77.0-next.
|
|
23
|
+
"@theia/navigator": "1.77.0-next.56+320e807e1",
|
|
24
|
+
"@theia/notebook": "1.77.0-next.56+320e807e1",
|
|
25
|
+
"@theia/output": "1.77.0-next.56+320e807e1",
|
|
26
|
+
"@theia/plugin": "1.77.0-next.56+320e807e1",
|
|
27
|
+
"@theia/plugin-utils": "1.77.0-next.56+320e807e1",
|
|
28
|
+
"@theia/preferences": "1.77.0-next.56+320e807e1",
|
|
29
|
+
"@theia/scm": "1.77.0-next.56+320e807e1",
|
|
30
|
+
"@theia/search-in-workspace": "1.77.0-next.56+320e807e1",
|
|
31
|
+
"@theia/task": "1.77.0-next.56+320e807e1",
|
|
32
|
+
"@theia/telemetry": "1.77.0-next.56+320e807e1",
|
|
33
|
+
"@theia/terminal": "1.77.0-next.56+320e807e1",
|
|
34
|
+
"@theia/test": "1.77.0-next.56+320e807e1",
|
|
35
|
+
"@theia/timeline": "1.77.0-next.56+320e807e1",
|
|
36
|
+
"@theia/typehierarchy": "1.77.0-next.56+320e807e1",
|
|
37
|
+
"@theia/variable-resolver": "1.77.0-next.56+320e807e1",
|
|
38
|
+
"@theia/workspace": "1.77.0-next.56+320e807e1",
|
|
39
39
|
"@types/mime": "^2.0.3",
|
|
40
40
|
"@vscode/debugprotocol": "^1.68.0",
|
|
41
41
|
"@vscode/proxy-agent": "^0.13.2",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"nyc": {
|
|
104
104
|
"extends": "../../configs/nyc.json"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "320e807e120baf2dd899cee35cb39c7e1f74f7a0"
|
|
107
107
|
}
|
|
@@ -65,7 +65,7 @@ export class CharacterClassifier<T extends number> {
|
|
|
65
65
|
|
|
66
66
|
public get(charCode: number): T {
|
|
67
67
|
if (charCode >= 0 && charCode < 256) {
|
|
68
|
-
return
|
|
68
|
+
return this._asciiMap[charCode] as T;
|
|
69
69
|
} else {
|
|
70
70
|
return <T>(this._map.get(charCode) || this._defaultValue);
|
|
71
71
|
}
|
|
@@ -1104,6 +1104,8 @@ export interface SourceControlGroupFeatures {
|
|
|
1104
1104
|
export interface ScmRawResource {
|
|
1105
1105
|
handle: number,
|
|
1106
1106
|
sourceUri: UriComponents,
|
|
1107
|
+
multiDiffEditorOriginalUri?: UriComponents,
|
|
1108
|
+
multiDiffEditorModifiedUri?: UriComponents,
|
|
1107
1109
|
icons: (IconUrl | ThemeIcon | undefined)[], /* icons: light, dark */
|
|
1108
1110
|
tooltip: string,
|
|
1109
1111
|
strikeThrough: boolean,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 JuliaHub, Inc. and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom';
|
|
18
|
+
// HostedPluginSupport transitively imports browser widgets (Lumino) that touch `document` at load time.
|
|
19
|
+
const disableJSDOM = enableJSDOM();
|
|
20
|
+
|
|
21
|
+
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
22
|
+
// Some transitively imported modules read the frontend config at load time.
|
|
23
|
+
FrontendApplicationConfigProvider.set({});
|
|
24
|
+
|
|
25
|
+
import { expect } from 'chai';
|
|
26
|
+
import { Disposable, DisposableCollection } from '@theia/core/lib/common';
|
|
27
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
28
|
+
import { FrontendApplicationState } from '@theia/core/lib/common/frontend-application-state';
|
|
29
|
+
import { HostedPluginSupport } from './hosted-plugin';
|
|
30
|
+
|
|
31
|
+
disableJSDOM();
|
|
32
|
+
|
|
33
|
+
describe('HostedPluginSupport - plugin view initialization', () => {
|
|
34
|
+
|
|
35
|
+
it('initializes plugin views once the application is ready, after the onDidInitializeLayout hooks', async () => {
|
|
36
|
+
const states = new Map<FrontendApplicationState, Deferred<void>>();
|
|
37
|
+
const reach = (state: FrontendApplicationState): Deferred<void> => {
|
|
38
|
+
if (!states.has(state)) {
|
|
39
|
+
states.set(state, new Deferred<void>());
|
|
40
|
+
}
|
|
41
|
+
return states.get(state)!;
|
|
42
|
+
};
|
|
43
|
+
const calls: string[] = [];
|
|
44
|
+
const support = new HostedPluginSupport();
|
|
45
|
+
Object.assign(support, {
|
|
46
|
+
appState: { reachedState: (state: FrontendApplicationState) => reach(state).promise },
|
|
47
|
+
viewRegistry: {
|
|
48
|
+
initWidgets: async () => { calls.push('initWidgets'); },
|
|
49
|
+
removeStaleWidgets: () => { calls.push('removeStaleWidgets'); }
|
|
50
|
+
},
|
|
51
|
+
workspaceTrustService: { refreshRestrictedModeIndicator: () => { } }
|
|
52
|
+
});
|
|
53
|
+
const flush = () => new Promise(resolve => setTimeout(resolve));
|
|
54
|
+
|
|
55
|
+
await (support as unknown as { afterLoadContributions(toDisconnect: DisposableCollection): Promise<void> })
|
|
56
|
+
.afterLoadContributions(new DisposableCollection(Disposable.NULL));
|
|
57
|
+
reach('initialized_layout').resolve();
|
|
58
|
+
await flush();
|
|
59
|
+
expect(calls).to.deep.equal([]);
|
|
60
|
+
|
|
61
|
+
reach('ready').resolve();
|
|
62
|
+
await flush();
|
|
63
|
+
expect(calls).to.deep.equal(['initWidgets', 'removeStaleWidgets']);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
});
|
|
@@ -288,9 +288,11 @@ export class HostedPluginSupport extends AbstractHostedPluginSupport<PluginManag
|
|
|
288
288
|
// must not run while the ShellLayoutRestorer still holds restored plugin view widgets, otherwise
|
|
289
289
|
// removeStaleWidgets can dispose a restored view container mid-restore and abort the whole
|
|
290
290
|
// layout restoration (see https://github.com/eclipse-theia/theia/issues/17770).
|
|
291
|
+
// Wait for `ready` rather than `initialized_layout`: only `ready` follows the onDidInitializeLayout
|
|
292
|
+
// hooks, and PluginViewRegistry's hook disposes the data widgets that initWidgets would prepare.
|
|
291
293
|
// Deliberately not awaited: startPlugins runs after this hook and may register file system
|
|
292
294
|
// providers the layout restoration depends on (see beforeLoadContributions).
|
|
293
|
-
this.appState.reachedState('
|
|
295
|
+
this.appState.reachedState('ready').then(async () => {
|
|
294
296
|
if (toDisconnect.disposed) {
|
|
295
297
|
return;
|
|
296
298
|
}
|
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
import * as
|
|
19
|
-
|
|
17
|
+
// Default imports resolve to the real Node module objects. With `esModuleInterop`, a namespace
|
|
18
|
+
// import (`import * as http`) is a read-only copy with getter-only properties, and the
|
|
19
|
+
// `Object.assign(http, …)` patches below would throw "Cannot set property … which has only a getter".
|
|
20
|
+
import http from 'http';
|
|
21
|
+
import https from 'https';
|
|
22
|
+
import tls from 'tls';
|
|
20
23
|
|
|
21
24
|
import { createHttpPatch, createProxyResolver, createTlsPatch, ProxySupportSetting } from '@vscode/proxy-agent';
|
|
22
25
|
import { PreferenceRegistryExtImpl } from '../../plugin/preference-registry';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import * as path from 'path';
|
|
18
18
|
import * as express from '@theia/core/shared/express';
|
|
19
|
-
import
|
|
19
|
+
import escape_html from 'escape-html';
|
|
20
20
|
import { realpath, stat } from 'fs/promises';
|
|
21
21
|
import { ILogger } from '@theia/core';
|
|
22
22
|
import { inject, injectable, optional, multiInject, named } from '@theia/core/shared/inversify';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource GmbH and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { expect } from 'chai';
|
|
18
|
+
import { overridePluginDependencies } from './plugin-require-override';
|
|
19
|
+
|
|
20
|
+
describe('overridePluginDependencies', () => {
|
|
21
|
+
|
|
22
|
+
const nodeModule = require('module');
|
|
23
|
+
let originalLoad: unknown;
|
|
24
|
+
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
originalLoad = nodeModule._load;
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
afterEach(() => {
|
|
30
|
+
nodeModule._load = originalLoad;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should provide the real node-pty module for an unresolvable node-pty request', () => {
|
|
34
|
+
overridePluginDependencies();
|
|
35
|
+
const nodePty = require('/nonexistent/vscode/node_modules/node-pty');
|
|
36
|
+
expect(nodePty).to.equal(require('node-pty'));
|
|
37
|
+
expect(nodePty.spawn).to.be.a('function');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('should rethrow for unresolvable requests without an override', () => {
|
|
41
|
+
overridePluginDependencies();
|
|
42
|
+
expect(() => require('/nonexistent/vscode/node_modules/unknown-package')).to.throw();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
+
// node-pty sets __esModule, so a namespace import already yields the real module object (a default import would be undefined).
|
|
17
18
|
import * as nodePty from 'node-pty';
|
|
18
19
|
|
|
19
20
|
const overrides = [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
// based on https://github.com/microsoft/vscode/blob/04c36be045a94fee58e5f8992d3e3fd980294a84/src/vs/workbench/api/browser/mainThreadFileSystem.ts
|
|
21
21
|
|
|
22
22
|
/* eslint-disable max-len */
|
|
23
|
-
/* eslint-disable @typescript-eslint/tslint/config */
|
|
24
23
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
24
|
+
/* eslint-disable @theia/explicit-return-type */
|
|
25
25
|
|
|
26
26
|
import { URI } from '@theia/core/shared/vscode-uri';
|
|
27
27
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
@@ -73,10 +73,13 @@ interface KernelPreloadModule {
|
|
|
73
73
|
export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
|
|
74
74
|
// workaround to allow rendering of links in outputs for non chromium browsers
|
|
75
75
|
// see https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API#cross-browser_support_for_trusted_types
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const windowWithTrustedTypes = window as unknown as {
|
|
77
|
+
trustedTypes?: { createPolicy(name: string, rules: unknown): unknown };
|
|
78
|
+
};
|
|
79
|
+
if (!windowWithTrustedTypes.trustedTypes) {
|
|
80
|
+
windowWithTrustedTypes.trustedTypes = {
|
|
78
81
|
createPolicy: (name: string, rules: unknown) => rules
|
|
79
|
-
}
|
|
82
|
+
};
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
const theia = acquireVsCodeApi();
|
|
@@ -87,12 +87,12 @@ export class PluginSharedStyle {
|
|
|
87
87
|
selector: string;
|
|
88
88
|
body: (theme: Theme) => string
|
|
89
89
|
}): void {
|
|
90
|
-
const sheet =
|
|
90
|
+
const sheet = this.style.sheet as CSSStyleSheet;
|
|
91
91
|
const cssBody = body(this.themeService.getCurrentTheme());
|
|
92
92
|
sheet.insertRule(selector + ' {\n' + cssBody + '\n}', 0);
|
|
93
93
|
}
|
|
94
94
|
deleteRule(selector: string): void {
|
|
95
|
-
const sheet =
|
|
95
|
+
const sheet = this.style.sheet as CSSStyleSheet;
|
|
96
96
|
const rules = sheet.rules || sheet.cssRules || [];
|
|
97
97
|
for (let i = rules.length - 1; i >= 0; i--) {
|
|
98
98
|
const rule = rules[i];
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { ScmService } from '@theia/scm/lib/browser/scm-service';
|
|
19
19
|
import { ScmMainImpl } from './scm-main';
|
|
20
|
+
import { ScmRawResource } from '../../common/plugin-api-rpc';
|
|
21
|
+
import URI from '@theia/core/lib/common/uri';
|
|
22
|
+
import { URI as vscodeURI } from '@theia/core/shared/vscode-uri';
|
|
20
23
|
|
|
21
24
|
interface ScmMainInternals {
|
|
22
25
|
repositories: Map<number, unknown>;
|
|
@@ -53,6 +56,35 @@ describe('ScmMainImpl - cascade dispose of children on $unregisterSourceControl'
|
|
|
53
56
|
impl = createScmMainImpl(scmService);
|
|
54
57
|
});
|
|
55
58
|
|
|
59
|
+
it('revives multi-diff URI components and preserves absent added/deleted sides', async () => {
|
|
60
|
+
await impl.$registerSourceControl(1, 'git', 'Main', undefined);
|
|
61
|
+
impl.$registerGroups(1, [{ handle: 2, id: 'changes', label: 'Changes', features: { hideWhenEmpty: undefined, contextValue: undefined } }], []);
|
|
62
|
+
const sourceUri = vscodeURI.file('/repo/file.txt').toJSON();
|
|
63
|
+
const originalUri = vscodeURI.parse('git:/repo/file.txt?ref=HEAD#original').toJSON();
|
|
64
|
+
const modifiedUri = vscodeURI.parse('file:///repo/file.txt?working=true#modified').toJSON();
|
|
65
|
+
const raw: ScmRawResource = {
|
|
66
|
+
handle: 3, sourceUri, icons: [], tooltip: '', strikeThrough: false, faded: false, contextValue: '', command: undefined
|
|
67
|
+
};
|
|
68
|
+
impl.$spliceResourceStates(1, [{
|
|
69
|
+
handle: 2, splices: [{
|
|
70
|
+
start: 0, deleteCount: 0, rawResources: [
|
|
71
|
+
{ ...raw, multiDiffEditorOriginalUri: originalUri },
|
|
72
|
+
{ ...raw, handle: 4, multiDiffEditorModifiedUri: modifiedUri },
|
|
73
|
+
{ ...raw, handle: 5 }
|
|
74
|
+
]
|
|
75
|
+
}]
|
|
76
|
+
}]);
|
|
77
|
+
const resources = scmService.repositories[0].provider.groups[0].resources;
|
|
78
|
+
expect(resources[0].multiDiffEditorOriginalUri).to.be.instanceOf(URI);
|
|
79
|
+
expect(resources[0].multiDiffEditorOriginalUri?.toString()).to.equal(vscodeURI.revive(originalUri).toString());
|
|
80
|
+
expect(resources[0].multiDiffEditorModifiedUri).to.equal(undefined);
|
|
81
|
+
expect(resources[1].multiDiffEditorOriginalUri).to.equal(undefined);
|
|
82
|
+
expect(resources[1].multiDiffEditorModifiedUri).to.be.instanceOf(URI);
|
|
83
|
+
expect(resources[1].multiDiffEditorModifiedUri?.toString()).to.equal(vscodeURI.revive(modifiedUri).toString());
|
|
84
|
+
expect(resources[2].multiDiffEditorOriginalUri).to.equal(undefined);
|
|
85
|
+
expect(resources[2].multiDiffEditorModifiedUri).to.equal(undefined);
|
|
86
|
+
});
|
|
87
|
+
|
|
56
88
|
it('should unregister worktree children when their parent is unregistered', async () => {
|
|
57
89
|
// Parent
|
|
58
90
|
await impl.$registerSourceControl(1, 'git', 'Main', { scheme: 'file', path: '/repo', authority: '', query: '', fragment: '' });
|
|
@@ -106,7 +106,9 @@ export class PluginScmResource implements ScmResource {
|
|
|
106
106
|
readonly group: PluginScmResourceGroup,
|
|
107
107
|
readonly decorations: ScmResourceDecorations,
|
|
108
108
|
readonly contextValue: string | undefined,
|
|
109
|
-
readonly command: ScmCommand | undefined
|
|
109
|
+
readonly command: ScmCommand | undefined,
|
|
110
|
+
readonly multiDiffEditorOriginalUri?: URI,
|
|
111
|
+
readonly multiDiffEditorModifiedUri?: URI
|
|
110
112
|
) { }
|
|
111
113
|
|
|
112
114
|
open(): Promise<void> {
|
|
@@ -487,7 +489,9 @@ export class PluginScmProvider implements ScmProvider {
|
|
|
487
489
|
group,
|
|
488
490
|
decorations,
|
|
489
491
|
contextValue || undefined,
|
|
490
|
-
command
|
|
492
|
+
command,
|
|
493
|
+
rawResource.multiDiffEditorOriginalUri ? new URI(vscodeURI.revive(rawResource.multiDiffEditorOriginalUri)) : undefined,
|
|
494
|
+
rawResource.multiDiffEditorModifiedUri ? new URI(vscodeURI.revive(rawResource.multiDiffEditorModifiedUri)) : undefined
|
|
491
495
|
);
|
|
492
496
|
});
|
|
493
497
|
|
|
@@ -25,7 +25,7 @@ FrontendApplicationConfigProvider.set({});
|
|
|
25
25
|
import { expect } from 'chai';
|
|
26
26
|
import { Command, Disposable } from '@theia/core/lib/common';
|
|
27
27
|
import { PluginViewRegistry, ViewContainerInfo, PLUGIN_VIEW_DATA_FACTORY_ID } from './plugin-view-registry';
|
|
28
|
-
import
|
|
28
|
+
import { PluginViewType, ViewWelcome } from '../../../common';
|
|
29
29
|
|
|
30
30
|
disableJSDOM();
|
|
31
31
|
|
|
@@ -104,6 +104,8 @@ describe('PluginViewRegistry - view menu labels', () => {
|
|
|
104
104
|
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
+
const welcome = (view: string): ViewWelcome => ({ view, content: `[Hi](command:${view}.hi)`, order: 0 });
|
|
108
|
+
|
|
107
109
|
describe('PluginViewRegistry - welcome-only views', () => {
|
|
108
110
|
|
|
109
111
|
interface FakeTreeViewWidget {
|
|
@@ -116,8 +118,6 @@ describe('PluginViewRegistry - welcome-only views', () => {
|
|
|
116
118
|
let createdWidget: FakeTreeViewWidget;
|
|
117
119
|
let getOrCreateCalls: Array<{ factoryId: string; options: unknown }>;
|
|
118
120
|
|
|
119
|
-
const welcome = (view: string): ViewWelcome => ({ view, content: `[Hi](command:${view}.hi)`, order: 0 });
|
|
120
|
-
|
|
121
121
|
const internals = (): {
|
|
122
122
|
views: Map<string, [string, { type?: unknown }]>;
|
|
123
123
|
viewDataProviders: Map<string, unknown>;
|
|
@@ -171,6 +171,137 @@ describe('PluginViewRegistry - welcome-only views', () => {
|
|
|
171
171
|
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
+
describe('PluginViewRegistry - welcome-only views on expand', () => {
|
|
175
|
+
|
|
176
|
+
const noop = () => Disposable.NULL;
|
|
177
|
+
|
|
178
|
+
let registry: PluginViewRegistry;
|
|
179
|
+
let view: { widgets: unknown[] };
|
|
180
|
+
let prepared: unknown[];
|
|
181
|
+
|
|
182
|
+
const internals = (): {
|
|
183
|
+
views: Map<string, [string, { type?: unknown }]>;
|
|
184
|
+
viewDataProviders: Map<string, unknown>;
|
|
185
|
+
viewsWelcome: Map<string, ViewWelcome[]>;
|
|
186
|
+
onDidExpandViewEmitter: { fire(viewId: string): void };
|
|
187
|
+
init(): void;
|
|
188
|
+
} => registry as unknown as {
|
|
189
|
+
views: Map<string, [string, { type?: unknown }]>;
|
|
190
|
+
viewDataProviders: Map<string, unknown>;
|
|
191
|
+
viewsWelcome: Map<string, ViewWelcome[]>;
|
|
192
|
+
onDidExpandViewEmitter: { fire(viewId: string): void };
|
|
193
|
+
init(): void;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
async function expand(viewId: string): Promise<void> {
|
|
197
|
+
internals().onDidExpandViewEmitter.fire(viewId);
|
|
198
|
+
await new Promise(resolve => setTimeout(resolve));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
beforeEach(() => {
|
|
202
|
+
registry = new PluginViewRegistry();
|
|
203
|
+
view = { widgets: [] };
|
|
204
|
+
prepared = [];
|
|
205
|
+
Object.assign(registry, {
|
|
206
|
+
shell: { activeWidget: undefined, onDidChangeActiveWidget: noop, initialized: new Promise(() => { }) },
|
|
207
|
+
viewContextKeys: { focusedView: { reset: () => { } } },
|
|
208
|
+
contextKeyService: { onDidChange: noop },
|
|
209
|
+
widgetManager: { onWillCreateWidget: noop, onDidCreateWidget: noop, getWidget: async () => view },
|
|
210
|
+
prepareView: async (widget: unknown) => { prepared.push(widget); }
|
|
211
|
+
});
|
|
212
|
+
internals().init();
|
|
213
|
+
internals().views.set('actions', ['container', {}]);
|
|
214
|
+
internals().viewsWelcome.set('actions', [welcome('actions')]);
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
it('prepares an empty welcome-only view when it is expanded, as after restoring a saved layout', async () => {
|
|
218
|
+
await expand('actions');
|
|
219
|
+
|
|
220
|
+
expect(prepared).to.deep.equal([view]);
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
it('leaves a view with a data provider to the provider', async () => {
|
|
224
|
+
internals().viewDataProviders.set('actions', () => undefined);
|
|
225
|
+
|
|
226
|
+
await expand('actions');
|
|
227
|
+
|
|
228
|
+
expect(prepared).to.have.lengthOf(0);
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
it('leaves a view that already has content alone', async () => {
|
|
232
|
+
view.widgets.push({});
|
|
233
|
+
|
|
234
|
+
await expand('actions');
|
|
235
|
+
|
|
236
|
+
expect(prepared).to.have.lengthOf(0);
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
it('leaves a view without welcomes alone', async () => {
|
|
240
|
+
internals().viewsWelcome.delete('actions');
|
|
241
|
+
|
|
242
|
+
await expand('actions');
|
|
243
|
+
|
|
244
|
+
expect(prepared).to.have.lengthOf(0);
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
it('leaves a webview view alone', async () => {
|
|
248
|
+
internals().views.set('actions', ['container', { type: PluginViewType.Webview }]);
|
|
249
|
+
|
|
250
|
+
await expand('actions');
|
|
251
|
+
|
|
252
|
+
expect(prepared).to.have.lengthOf(0);
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
describe('PluginViewRegistry - prepareView', () => {
|
|
258
|
+
|
|
259
|
+
interface FakeViewWidget {
|
|
260
|
+
options: { viewId: string };
|
|
261
|
+
title: { label: string };
|
|
262
|
+
widgets: unknown[];
|
|
263
|
+
isDisposed: boolean;
|
|
264
|
+
addWidget(widget: unknown): void;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
let registry: PluginViewRegistry;
|
|
268
|
+
let view: FakeViewWidget;
|
|
269
|
+
let dataWidget: { isDisposed: boolean; dispose(): void };
|
|
270
|
+
|
|
271
|
+
beforeEach(() => {
|
|
272
|
+
registry = new PluginViewRegistry();
|
|
273
|
+
view = {
|
|
274
|
+
options: { viewId: 'actions' },
|
|
275
|
+
title: { label: '' },
|
|
276
|
+
widgets: [],
|
|
277
|
+
isDisposed: false,
|
|
278
|
+
addWidget(widget: unknown): void {
|
|
279
|
+
this.widgets.push(widget);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
dataWidget = { isDisposed: false, dispose: () => { } };
|
|
283
|
+
(registry as unknown as { views: Map<string, unknown> }).views.set('actions', ['container', { id: 'actions', name: 'Actions' }]);
|
|
284
|
+
(registry as unknown as { createViewDataWidget: unknown }).createViewDataWidget = async () => dataWidget;
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
const prepareView = (): Promise<void> => (registry as unknown as { prepareView(widget: FakeViewWidget): Promise<void> }).prepareView(view);
|
|
288
|
+
|
|
289
|
+
it('adds the created data widget to the view', async () => {
|
|
290
|
+
await prepareView();
|
|
291
|
+
|
|
292
|
+
expect(view.widgets).to.deep.equal([dataWidget]);
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
it('leaves the view empty when its data widget was disposed before it could be added', async () => {
|
|
296
|
+
dataWidget.isDisposed = true;
|
|
297
|
+
|
|
298
|
+
await prepareView();
|
|
299
|
+
|
|
300
|
+
expect(view.widgets).to.have.lengthOf(0);
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
});
|
|
304
|
+
|
|
174
305
|
describe('PluginViewRegistry - VS Code view commands', () => {
|
|
175
306
|
|
|
176
307
|
let registry: PluginViewRegistry;
|
|
@@ -160,6 +160,7 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
|
|
|
160
160
|
|
|
161
161
|
this.updateFocusedView();
|
|
162
162
|
this.shell.onDidChangeActiveWidget(() => this.updateFocusedView());
|
|
163
|
+
this.onDidExpandView(viewId => this.prepareWelcomeOnlyView(viewId).catch(e => this.logger.error(e)));
|
|
163
164
|
|
|
164
165
|
this.widgetManager.onWillCreateWidget(({ factoryId, widget, waitUntil }) => {
|
|
165
166
|
if (factoryId === EXPLORER_VIEW_CONTAINER_ID && widget instanceof ViewContainerWidget) {
|
|
@@ -786,7 +787,8 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
|
|
|
786
787
|
const currentDataWidget = widget.widgets[0];
|
|
787
788
|
const webviewId = currentDataWidget instanceof WebviewWidget ? currentDataWidget.identifier?.id : undefined;
|
|
788
789
|
const viewDataWidget = await this.createViewDataWidget(view.id, webviewId);
|
|
789
|
-
|
|
790
|
+
// `onDidInitializeLayout` can dispose the data widget before it is added here.
|
|
791
|
+
if (widget.isDisposed || viewDataWidget?.isDisposed) {
|
|
790
792
|
viewDataWidget?.dispose();
|
|
791
793
|
return;
|
|
792
794
|
}
|
|
@@ -1029,8 +1031,8 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
|
|
|
1029
1031
|
}
|
|
1030
1032
|
|
|
1031
1033
|
/**
|
|
1032
|
-
*
|
|
1033
|
-
*
|
|
1034
|
+
* Retrieves the restored state of the data widgets and disposes them: a view gets a new data widget
|
|
1035
|
+
* once its data provider registers or, for a view with only welcome content, once it is expanded.
|
|
1034
1036
|
*/
|
|
1035
1037
|
onDidInitializeLayout(): void {
|
|
1036
1038
|
const widgets = this.widgetManager.getWidgets(PLUGIN_VIEW_DATA_FACTORY_ID);
|
|
@@ -1108,6 +1110,21 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
|
|
|
1108
1110
|
return widget;
|
|
1109
1111
|
}
|
|
1110
1112
|
|
|
1113
|
+
/**
|
|
1114
|
+
* Gives an expanded view that has `viewsWelcome` content but neither a data provider nor a
|
|
1115
|
+
* content widget its welcome widget, which `onDidInitializeLayout` disposes when it was restored.
|
|
1116
|
+
*/
|
|
1117
|
+
protected async prepareWelcomeOnlyView(viewId: string): Promise<void> {
|
|
1118
|
+
if (this.views.get(viewId)?.[1]?.type === PluginViewType.Webview
|
|
1119
|
+
|| this.viewDataProviders.has(viewId) || !this.getViewWelcomes(viewId).length) {
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
const view = await this.getView(viewId);
|
|
1123
|
+
if (view && !view.widgets.length) {
|
|
1124
|
+
await this.prepareView(view);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1111
1128
|
protected async createViewWelcomeWidget(viewId: string): Promise<TreeViewWidget> {
|
|
1112
1129
|
const widget = await this.widgetManager.getOrCreateWidget<TreeViewWidget>(PLUGIN_VIEW_DATA_FACTORY_ID, { id: viewId });
|
|
1113
1130
|
if (!widget.model.root) {
|
|
@@ -415,7 +415,7 @@ export class WebviewWidget extends BaseWidget implements StatefulWidget, Extract
|
|
|
415
415
|
}
|
|
416
416
|
|
|
417
417
|
setContentOptions(contentOptions: WebviewContentOptions): void {
|
|
418
|
-
if (JSONExt.deepEqual(
|
|
418
|
+
if (JSONExt.deepEqual(this.contentOptions as any, contentOptions as any)) {
|
|
419
419
|
return;
|
|
420
420
|
}
|
|
421
421
|
this._contentOptions = contentOptions;
|