@theia/plugin-ext 1.51.0 → 1.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/plugin-api-rpc-model.d.ts +13 -2
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +25 -17
- 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/worker/worker-main.js +2 -2
- package/lib/hosted/browser/worker/worker-main.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +1 -0
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/authentication-main.d.ts +4 -2
- package/lib/main/browser/authentication-main.d.ts.map +1 -1
- package/lib/main/browser/command-registry-main.d.ts +4 -2
- package/lib/main/browser/command-registry-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts +4 -2
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.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 +4 -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 +4 -2
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/notebooks/notebooks-main.d.ts +4 -2
- package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +7 -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 +9 -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 +4 -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 +4 -2
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-views-main.d.ts +4 -2
- package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +4 -2
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview-views/webview-views-main.d.ts +4 -2
- package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
- package/lib/main/browser/webviews-main.d.ts +4 -2
- package/lib/main/browser/webviews-main.d.ts.map +1 -1
- package/lib/main/browser/workspace-main.d.ts +4 -2
- package/lib/main/browser/workspace-main.d.ts.map +1 -1
- package/lib/plugin/authentication-ext.d.ts +4 -2
- package/lib/plugin/authentication-ext.d.ts.map +1 -1
- package/lib/plugin/clipboard-ext.d.ts +4 -2
- package/lib/plugin/clipboard-ext.d.ts.map +1 -1
- package/lib/plugin/command-registry.d.ts +4 -2
- package/lib/plugin/command-registry.d.ts.map +1 -1
- package/lib/plugin/comments.d.ts +4 -2
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/custom-editors.d.ts +4 -2
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/debug/debug-ext.d.ts +12 -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 +4 -2
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +4 -2
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +4 -2
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
- package/lib/plugin/decorations.d.ts +4 -2
- package/lib/plugin/decorations.d.ts.map +1 -1
- package/lib/plugin/dialogs.d.ts +4 -2
- package/lib/plugin/dialogs.d.ts.map +1 -1
- package/lib/plugin/document-data.d.ts +4 -2
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/documents.d.ts +4 -2
- package/lib/plugin/documents.d.ts.map +1 -1
- package/lib/plugin/env.d.ts +4 -2
- package/lib/plugin/env.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts +4 -2
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts +4 -2
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/label-service.d.ts +4 -2
- package/lib/plugin/label-service.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +4 -2
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/code-action.d.ts +4 -2
- package/lib/plugin/languages/code-action.d.ts.map +1 -1
- package/lib/plugin/languages/color.d.ts +4 -2
- package/lib/plugin/languages/color.d.ts.map +1 -1
- package/lib/plugin/languages/completion.d.ts +4 -2
- package/lib/plugin/languages/completion.d.ts.map +1 -1
- package/lib/plugin/languages/declaration.d.ts +4 -2
- package/lib/plugin/languages/declaration.d.ts.map +1 -1
- package/lib/plugin/languages/definition.d.ts +4 -2
- package/lib/plugin/languages/definition.d.ts.map +1 -1
- package/lib/plugin/languages/diagnostics.d.ts +4 -2
- package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
- package/lib/plugin/languages/document-drop-edit.d.ts +4 -2
- package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
- package/lib/plugin/languages/document-formatting.d.ts +4 -2
- package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/document-highlight.d.ts +4 -2
- package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
- package/lib/plugin/languages/evaluatable-expression.d.ts +4 -2
- package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
- package/lib/plugin/languages/folding.d.ts +4 -2
- package/lib/plugin/languages/folding.d.ts.map +1 -1
- package/lib/plugin/languages/hover.d.ts +4 -2
- package/lib/plugin/languages/hover.d.ts.map +1 -1
- package/lib/plugin/languages/implementation.d.ts +4 -2
- package/lib/plugin/languages/implementation.d.ts.map +1 -1
- package/lib/plugin/languages/inlay-hints.d.ts +4 -2
- package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
- package/lib/plugin/languages/inline-completion.d.ts +4 -2
- package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
- package/lib/plugin/languages/inline-values.d.ts +4 -2
- package/lib/plugin/languages/inline-values.d.ts.map +1 -1
- package/lib/plugin/languages/lens.d.ts +4 -2
- package/lib/plugin/languages/lens.d.ts.map +1 -1
- package/lib/plugin/languages/link-provider.d.ts +4 -2
- package/lib/plugin/languages/link-provider.d.ts.map +1 -1
- package/lib/plugin/languages/linked-editing-range.d.ts +4 -2
- package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
- package/lib/plugin/languages/on-type-formatting.d.ts +4 -2
- package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/outline.d.ts +4 -2
- package/lib/plugin/languages/outline.d.ts.map +1 -1
- package/lib/plugin/languages/range-formatting.d.ts +4 -2
- package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/reference.d.ts +4 -2
- package/lib/plugin/languages/reference.d.ts.map +1 -1
- package/lib/plugin/languages/rename.d.ts +4 -2
- package/lib/plugin/languages/rename.d.ts.map +1 -1
- package/lib/plugin/languages/selection-range.d.ts +4 -2
- package/lib/plugin/languages/selection-range.d.ts.map +1 -1
- package/lib/plugin/languages/semantic-highlighting.d.ts +4 -2
- package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
- package/lib/plugin/languages/signature.d.ts +4 -2
- package/lib/plugin/languages/signature.d.ts.map +1 -1
- package/lib/plugin/languages/type-definition.d.ts +4 -2
- package/lib/plugin/languages/type-definition.d.ts.map +1 -1
- package/lib/plugin/languages/type-hierarchy.d.ts +4 -2
- package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/util.d.ts +4 -2
- package/lib/plugin/languages/util.d.ts.map +1 -1
- package/lib/plugin/languages/workspace-symbol.d.ts +4 -2
- package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
- package/lib/plugin/languages-utils.d.ts +4 -2
- package/lib/plugin/languages-utils.d.ts.map +1 -1
- package/lib/plugin/languages.d.ts +4 -2
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/markdown-string.d.ts +4 -2
- package/lib/plugin/markdown-string.d.ts.map +1 -1
- package/lib/plugin/message-registry.d.ts +4 -2
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +4 -2
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-document.d.ts +4 -2
- package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-documents.d.ts +4 -2
- package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editor.d.ts +4 -2
- package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editors.d.ts +4 -2
- package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-kernels.d.ts +4 -2
- package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-renderers.d.ts +4 -2
- package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
- package/lib/plugin/notebook/notebooks.d.ts +4 -2
- package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
- package/lib/plugin/notification.d.ts +4 -2
- package/lib/plugin/notification.d.ts.map +1 -1
- package/lib/plugin/output-channel/log-output-channel.d.ts +4 -2
- package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
- package/lib/plugin/output-channel/output-channel-item.d.ts +4 -2
- package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
- package/lib/plugin/output-channel-registry.d.ts +4 -2
- package/lib/plugin/output-channel-registry.d.ts.map +1 -1
- package/lib/plugin/plugin-context.d.ts +4 -2
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +20 -9
- 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 +4 -2
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-storage.d.ts +4 -2
- package/lib/plugin/plugin-storage.d.ts.map +1 -1
- package/lib/plugin/preference-registry.d.ts +4 -2
- package/lib/plugin/preference-registry.d.ts.map +1 -1
- package/lib/plugin/quick-open.d.ts +7 -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 +4 -2
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/secrets-ext.d.ts +4 -2
- package/lib/plugin/secrets-ext.d.ts.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts +4 -2
- package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
- package/lib/plugin/status-bar-message-registry.d.ts +4 -2
- package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
- package/lib/plugin/tabs.d.ts +4 -2
- package/lib/plugin/tabs.d.ts.map +1 -1
- package/lib/plugin/tasks/task-provider.d.ts +4 -2
- package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +4 -2
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.d.ts +13 -16
- package/lib/plugin/terminal-ext.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.js +14 -21
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/test-item.d.ts +4 -2
- package/lib/plugin/test-item.d.ts.map +1 -1
- package/lib/plugin/tests.d.ts +9 -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 +4 -2
- package/lib/plugin/text-editor.d.ts.map +1 -1
- package/lib/plugin/text-editors.d.ts +4 -2
- package/lib/plugin/text-editors.d.ts.map +1 -1
- package/lib/plugin/timeline.d.ts +4 -2
- package/lib/plugin/timeline.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts +4 -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 +7 -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 +31 -6
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +29 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/webview-views.d.ts +4 -2
- package/lib/plugin/webview-views.d.ts.map +1 -1
- package/lib/plugin/webviews.d.ts +4 -2
- package/lib/plugin/webviews.d.ts.map +1 -1
- package/lib/plugin/window-state.d.ts +4 -2
- package/lib/plugin/window-state.d.ts.map +1 -1
- package/lib/plugin/workspace.d.ts +4 -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 +17 -11
- package/src/hosted/browser/worker/worker-main.ts +2 -2
- package/src/hosted/node/scanners/scanner-theia.ts +1 -0
- 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/quick-open-main.ts +23 -45
- package/src/main/browser/terminal-main.ts +26 -6
- package/src/plugin/debug/debug-ext.ts +56 -6
- package/src/plugin/plugin-context.ts +26 -12
- package/src/plugin/plugin-icon-path.ts +5 -2
- package/src/plugin/quick-open.ts +9 -32
- package/src/plugin/terminal-ext.ts +27 -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 +38 -6
package/package.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-ext",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.52.0",
|
|
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/bulk-edit": "1.
|
|
9
|
-
"@theia/callhierarchy": "1.
|
|
10
|
-
"@theia/console": "1.
|
|
11
|
-
"@theia/core": "1.
|
|
12
|
-
"@theia/debug": "1.
|
|
13
|
-
"@theia/editor": "1.
|
|
14
|
-
"@theia/editor-preview": "1.
|
|
15
|
-
"@theia/file-search": "1.
|
|
16
|
-
"@theia/filesystem": "1.
|
|
17
|
-
"@theia/markers": "1.
|
|
18
|
-
"@theia/messages": "1.
|
|
19
|
-
"@theia/monaco": "1.
|
|
8
|
+
"@theia/bulk-edit": "1.52.0",
|
|
9
|
+
"@theia/callhierarchy": "1.52.0",
|
|
10
|
+
"@theia/console": "1.52.0",
|
|
11
|
+
"@theia/core": "1.52.0",
|
|
12
|
+
"@theia/debug": "1.52.0",
|
|
13
|
+
"@theia/editor": "1.52.0",
|
|
14
|
+
"@theia/editor-preview": "1.52.0",
|
|
15
|
+
"@theia/file-search": "1.52.0",
|
|
16
|
+
"@theia/filesystem": "1.52.0",
|
|
17
|
+
"@theia/markers": "1.52.0",
|
|
18
|
+
"@theia/messages": "1.52.0",
|
|
19
|
+
"@theia/monaco": "1.52.0",
|
|
20
20
|
"@theia/monaco-editor-core": "1.83.101",
|
|
21
|
-
"@theia/navigator": "1.
|
|
22
|
-
"@theia/notebook": "1.
|
|
23
|
-
"@theia/output": "1.
|
|
24
|
-
"@theia/plugin": "1.
|
|
25
|
-
"@theia/preferences": "1.
|
|
26
|
-
"@theia/scm": "1.
|
|
27
|
-
"@theia/search-in-workspace": "1.
|
|
28
|
-
"@theia/task": "1.
|
|
29
|
-
"@theia/terminal": "1.
|
|
30
|
-
"@theia/test": "1.
|
|
31
|
-
"@theia/timeline": "1.
|
|
32
|
-
"@theia/typehierarchy": "1.
|
|
33
|
-
"@theia/variable-resolver": "1.
|
|
34
|
-
"@theia/workspace": "1.
|
|
21
|
+
"@theia/navigator": "1.52.0",
|
|
22
|
+
"@theia/notebook": "1.52.0",
|
|
23
|
+
"@theia/output": "1.52.0",
|
|
24
|
+
"@theia/plugin": "1.52.0",
|
|
25
|
+
"@theia/preferences": "1.52.0",
|
|
26
|
+
"@theia/scm": "1.52.0",
|
|
27
|
+
"@theia/search-in-workspace": "1.52.0",
|
|
28
|
+
"@theia/task": "1.52.0",
|
|
29
|
+
"@theia/terminal": "1.52.0",
|
|
30
|
+
"@theia/test": "1.52.0",
|
|
31
|
+
"@theia/timeline": "1.52.0",
|
|
32
|
+
"@theia/typehierarchy": "1.52.0",
|
|
33
|
+
"@theia/variable-resolver": "1.52.0",
|
|
34
|
+
"@theia/workspace": "1.52.0",
|
|
35
35
|
"@types/mime": "^2.0.1",
|
|
36
36
|
"@vscode/debugprotocol": "^1.51.0",
|
|
37
37
|
"@vscode/proxy-agent": "^0.13.2",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"watch": "theiaext watch"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@theia/ext-scripts": "1.
|
|
91
|
+
"@theia/ext-scripts": "1.52.0",
|
|
92
92
|
"@types/decompress": "^4.2.2",
|
|
93
93
|
"@types/escape-html": "^0.0.20",
|
|
94
94
|
"@types/lodash.clonedeep": "^4.5.3",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"nyc": {
|
|
98
98
|
"extends": "../../configs/nyc.json"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "40ceebcd4ee75f13ec16b9dc7314e9384493c1ac"
|
|
101
101
|
}
|
|
@@ -895,3 +895,13 @@ export interface InlineCompletionsProvider<T extends InlineCompletions = InlineC
|
|
|
895
895
|
freeInlineCompletions(completions: T): void;
|
|
896
896
|
}
|
|
897
897
|
|
|
898
|
+
export interface DebugStackFrameDTO {
|
|
899
|
+
readonly sessionId: string,
|
|
900
|
+
readonly frameId: number,
|
|
901
|
+
readonly threadId: number
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
export interface DebugThreadDTO {
|
|
905
|
+
readonly sessionId: string,
|
|
906
|
+
readonly threadId: number
|
|
907
|
+
}
|
|
@@ -89,7 +89,9 @@ import {
|
|
|
89
89
|
InlineCompletionContext,
|
|
90
90
|
DocumentDropEdit,
|
|
91
91
|
DataTransferDTO,
|
|
92
|
-
DocumentDropEditProviderMetadata
|
|
92
|
+
DocumentDropEditProviderMetadata,
|
|
93
|
+
DebugStackFrameDTO,
|
|
94
|
+
DebugThreadDTO
|
|
93
95
|
} from './plugin-api-rpc-model';
|
|
94
96
|
import { ExtPluginApi } from './plugin-ext-api-contribution';
|
|
95
97
|
import { KeysToAnyValues, KeysToKeysToAnyValue } from './types';
|
|
@@ -339,7 +341,7 @@ export interface TerminalServiceMain {
|
|
|
339
341
|
* Create new Terminal with Terminal options.
|
|
340
342
|
* @param options - object with parameters to create new terminal.
|
|
341
343
|
*/
|
|
342
|
-
$createTerminal(id: string, options:
|
|
344
|
+
$createTerminal(id: string, options: TerminalOptions, parentId?: string, isPseudoTerminal?: boolean): Promise<string>;
|
|
343
345
|
|
|
344
346
|
/**
|
|
345
347
|
* Send text to the terminal by id.
|
|
@@ -469,6 +471,10 @@ export interface TerminalServiceMain {
|
|
|
469
471
|
$unregisterTerminalObserver(id: string): unknown;
|
|
470
472
|
}
|
|
471
473
|
|
|
474
|
+
export interface TerminalOptions extends theia.TerminalOptions {
|
|
475
|
+
iconUrl?: string | { light: string; dark: string } | ThemeIcon;
|
|
476
|
+
}
|
|
477
|
+
|
|
472
478
|
export interface AutoFocus {
|
|
473
479
|
autoFocusFirstEntry?: boolean;
|
|
474
480
|
// TODO
|
|
@@ -524,10 +530,10 @@ export interface QuickOpenExt {
|
|
|
524
530
|
$onDidChangeSelection(sessionId: number, handles: number[]): void;
|
|
525
531
|
|
|
526
532
|
/* eslint-disable max-len */
|
|
527
|
-
showQuickPick(itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options: theia.QuickPickOptions & { canPickMany: true; },
|
|
533
|
+
showQuickPick(plugin: Plugin, itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options: theia.QuickPickOptions & { canPickMany: true; },
|
|
528
534
|
token?: theia.CancellationToken): Promise<Array<theia.QuickPickItem> | undefined>;
|
|
529
|
-
showQuickPick(itemsOrItemsPromise: string[] | Promise<string[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<string | undefined>;
|
|
530
|
-
showQuickPick(itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<theia.QuickPickItem | undefined>;
|
|
535
|
+
showQuickPick(plugin: Plugin, itemsOrItemsPromise: string[] | Promise<string[]>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<string | undefined>;
|
|
536
|
+
showQuickPick(plugin: Plugin, itemsOrItemsPromise: Array<theia.QuickPickItem> | Promise<Array<theia.QuickPickItem>>, options?: theia.QuickPickOptions, token?: theia.CancellationToken): Promise<theia.QuickPickItem | undefined>;
|
|
531
537
|
|
|
532
538
|
showInput(options?: theia.InputBoxOptions, token?: theia.CancellationToken): PromiseLike<string | undefined>;
|
|
533
539
|
// showWorkspaceFolderPick(options?: theia.WorkspaceFolderPickOptions, token?: theia.CancellationToken): Promise<theia.WorkspaceFolder | undefined>
|
|
@@ -651,7 +657,7 @@ export interface TransferQuickPickItem {
|
|
|
651
657
|
handle: number;
|
|
652
658
|
kind: 'item' | 'separator',
|
|
653
659
|
label: string;
|
|
654
|
-
|
|
660
|
+
iconUrl?: string | { light: string; dark: string } | ThemeIcon;
|
|
655
661
|
description?: string;
|
|
656
662
|
detail?: string;
|
|
657
663
|
picked?: boolean;
|
|
@@ -675,7 +681,7 @@ export interface TransferQuickPickOptions<T extends TransferQuickPickItem> {
|
|
|
675
681
|
|
|
676
682
|
export interface TransferQuickInputButton {
|
|
677
683
|
handle?: number;
|
|
678
|
-
readonly
|
|
684
|
+
readonly iconUrl?: string | { light: string; dark: string } | ThemeIcon;
|
|
679
685
|
readonly tooltip?: string | undefined;
|
|
680
686
|
}
|
|
681
687
|
|
|
@@ -1514,12 +1520,10 @@ export interface WorkspaceEditEntryMetadataDto {
|
|
|
1514
1520
|
needsConfirmation: boolean;
|
|
1515
1521
|
label: string;
|
|
1516
1522
|
description?: string;
|
|
1517
|
-
iconPath?: {
|
|
1518
|
-
id: string;
|
|
1519
|
-
} | {
|
|
1523
|
+
iconPath?: ThemeIcon | {
|
|
1520
1524
|
light: UriComponents;
|
|
1521
1525
|
dark: UriComponents;
|
|
1522
|
-
}
|
|
1526
|
+
};
|
|
1523
1527
|
}
|
|
1524
1528
|
|
|
1525
1529
|
export interface WorkspaceFileEditDto {
|
|
@@ -1979,6 +1983,8 @@ export interface DebugExt {
|
|
|
1979
1983
|
debugConfiguration: DebugConfiguration
|
|
1980
1984
|
): Promise<theia.DebugConfiguration | undefined | null>;
|
|
1981
1985
|
|
|
1986
|
+
$onDidChangeActiveFrame(frame: DebugStackFrameDTO | undefined): void;
|
|
1987
|
+
$onDidChangeActiveThread(thread: DebugThreadDTO | undefined): void;
|
|
1982
1988
|
$createDebugSession(debugConfiguration: DebugConfiguration, workspaceFolder: string | undefined): Promise<string>;
|
|
1983
1989
|
$terminateDebugSession(sessionId: string): Promise<void>;
|
|
1984
1990
|
$getTerminalCreationOptions(debugType: string): Promise<TerminalOptionsExt | undefined>;
|
|
@@ -45,7 +45,7 @@ const pluginsModulesNames = new Map<string, Plugin>();
|
|
|
45
45
|
const scripts = new Set<string>();
|
|
46
46
|
|
|
47
47
|
function initialize(contextPath: string, pluginMetadata: PluginMetadata): void {
|
|
48
|
-
const path = '
|
|
48
|
+
const path = './context/' + contextPath;
|
|
49
49
|
|
|
50
50
|
if (!scripts.has(path)) {
|
|
51
51
|
ctx.importScripts(path);
|
|
@@ -70,7 +70,7 @@ pluginManager.setPluginHost({
|
|
|
70
70
|
ctx.frontendModuleName = plugin.lifecycle.frontendModuleName;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
ctx.importScripts('
|
|
73
|
+
ctx.importScripts('./hostedPlugin/' + getPluginId(plugin.model) + '/' + plugin.pluginPath);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -196,6 +196,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
196
196
|
for (const c of configurations) {
|
|
197
197
|
const config = this.readConfiguration(c, rawPlugin.packagePath);
|
|
198
198
|
if (config) {
|
|
199
|
+
Object.values(config.properties).forEach(property => property.title = config.title);
|
|
199
200
|
contributions.configuration.push(config);
|
|
200
201
|
}
|
|
201
202
|
}
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
MAIN_RPC_CONTEXT
|
|
26
26
|
} from '../../../common/plugin-api-rpc';
|
|
27
27
|
import { DebugSessionManager } from '@theia/debug/lib/browser/debug-session-manager';
|
|
28
|
-
import { Breakpoint, WorkspaceFolder } from '../../../common/plugin-api-rpc-model';
|
|
28
|
+
import { Breakpoint, DebugStackFrameDTO, DebugThreadDTO, WorkspaceFolder } from '../../../common/plugin-api-rpc-model';
|
|
29
29
|
import { LabelProvider } from '@theia/core/lib/browser';
|
|
30
30
|
import { EditorManager } from '@theia/editor/lib/browser';
|
|
31
31
|
import { BreakpointManager, BreakpointsChangeEvent } from '@theia/debug/lib/browser/breakpoint/breakpoint-manager';
|
|
@@ -56,6 +56,9 @@ import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
|
|
|
56
56
|
import { ConnectionImpl } from '../../../common/connection';
|
|
57
57
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
58
58
|
import { DebugSessionOptions as TheiaDebugSessionOptions } from '@theia/debug/lib/browser/debug-session-options';
|
|
59
|
+
import { DebugStackFrame } from '@theia/debug/lib/browser/model/debug-stack-frame';
|
|
60
|
+
import { DebugThread } from '@theia/debug/lib/browser/model/debug-thread';
|
|
61
|
+
import { TestService } from '@theia/test/lib/browser/test-service';
|
|
59
62
|
|
|
60
63
|
export class DebugMainImpl implements DebugMain, Disposable {
|
|
61
64
|
private readonly debugExt: DebugExt;
|
|
@@ -75,6 +78,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
|
|
|
75
78
|
private readonly fileService: FileService;
|
|
76
79
|
private readonly pluginService: HostedPluginSupport;
|
|
77
80
|
private readonly debugContributionProvider: ContributionProvider<DebugContribution>;
|
|
81
|
+
private readonly testService: TestService;
|
|
78
82
|
private readonly workspaceService: WorkspaceService;
|
|
79
83
|
|
|
80
84
|
private readonly debuggerContributions = new Map<string, DisposableCollection>();
|
|
@@ -98,6 +102,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
|
|
|
98
102
|
this.debugContributionProvider = container.getNamed(ContributionProvider, DebugContribution);
|
|
99
103
|
this.fileService = container.get(FileService);
|
|
100
104
|
this.pluginService = container.get(HostedPluginSupport);
|
|
105
|
+
this.testService = container.get(TestService);
|
|
101
106
|
this.workspaceService = container.get(WorkspaceService);
|
|
102
107
|
|
|
103
108
|
const fireDidChangeBreakpoints = ({ added, removed, changed }: BreakpointsChangeEvent<SourceBreakpoint | FunctionBreakpoint>) => {
|
|
@@ -117,7 +122,9 @@ export class DebugMainImpl implements DebugMain, Disposable {
|
|
|
117
122
|
this.sessionManager.onDidStartDebugSession(debugSession => this.debugExt.$sessionDidStart(debugSession.id)),
|
|
118
123
|
this.sessionManager.onDidDestroyDebugSession(debugSession => this.debugExt.$sessionDidDestroy(debugSession.id)),
|
|
119
124
|
this.sessionManager.onDidChangeActiveDebugSession(event => this.debugExt.$sessionDidChange(event.current && event.current.id)),
|
|
120
|
-
this.sessionManager.onDidReceiveDebugSessionCustomEvent(event => this.debugExt.$onSessionCustomEvent(event.session.id, event.event, event.body))
|
|
125
|
+
this.sessionManager.onDidReceiveDebugSessionCustomEvent(event => this.debugExt.$onSessionCustomEvent(event.session.id, event.event, event.body)),
|
|
126
|
+
this.sessionManager.onDidFocusStackFrame(stackFrame => this.debugExt.$onDidChangeActiveFrame(this.toDebugStackFrameDTO(stackFrame))),
|
|
127
|
+
this.sessionManager.onDidFocusThread(debugThread => this.debugExt.$onDidChangeActiveThread(this.toDebugThreadDTO(debugThread))),
|
|
121
128
|
]);
|
|
122
129
|
}
|
|
123
130
|
|
|
@@ -161,6 +168,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
|
|
|
161
168
|
this.fileService,
|
|
162
169
|
terminalOptionsExt,
|
|
163
170
|
this.debugContributionProvider,
|
|
171
|
+
this.testService,
|
|
164
172
|
this.workspaceService,
|
|
165
173
|
);
|
|
166
174
|
|
|
@@ -323,6 +331,7 @@ export class DebugMainImpl implements DebugMain, Disposable {
|
|
|
323
331
|
} else {
|
|
324
332
|
sessionOptions = { ...sessionOptions, ...options, workspaceFolderUri };
|
|
325
333
|
}
|
|
334
|
+
sessionOptions.testRun = options.testRun;
|
|
326
335
|
|
|
327
336
|
// start options
|
|
328
337
|
const session = await this.sessionManager.start(sessionOptions);
|
|
@@ -340,6 +349,21 @@ export class DebugMainImpl implements DebugMain, Disposable {
|
|
|
340
349
|
}
|
|
341
350
|
}
|
|
342
351
|
|
|
352
|
+
private toDebugStackFrameDTO(stackFrame: DebugStackFrame | undefined): DebugStackFrameDTO | undefined {
|
|
353
|
+
return stackFrame ? {
|
|
354
|
+
sessionId: stackFrame.session.id,
|
|
355
|
+
frameId: stackFrame.frameId,
|
|
356
|
+
threadId: stackFrame.thread.threadId
|
|
357
|
+
} : undefined;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
private toDebugThreadDTO(debugThread: DebugThread | undefined): DebugThreadDTO | undefined {
|
|
361
|
+
return debugThread ? {
|
|
362
|
+
sessionId: debugThread.session.id,
|
|
363
|
+
threadId: debugThread.threadId
|
|
364
|
+
} : undefined;
|
|
365
|
+
}
|
|
366
|
+
|
|
343
367
|
private toTheiaPluginApiBreakpoints(breakpoints: (SourceBreakpoint | FunctionBreakpoint)[]): Breakpoint[] {
|
|
344
368
|
return breakpoints.map(b => this.toTheiaPluginApiBreakpoint(b));
|
|
345
369
|
}
|
|
@@ -22,7 +22,7 @@ import { LabelProvider } from '@theia/core/lib/browser/label-provider';
|
|
|
22
22
|
import { MessageClient } from '@theia/core/lib/common/message-service-protocol';
|
|
23
23
|
import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
|
|
24
24
|
import { DebugPreferences } from '@theia/debug/lib/browser/debug-preferences';
|
|
25
|
-
import { DebugConfigurationSessionOptions } from '@theia/debug/lib/browser/debug-session-options';
|
|
25
|
+
import { DebugConfigurationSessionOptions, TestRunReference } from '@theia/debug/lib/browser/debug-session-options';
|
|
26
26
|
import { DebugSession } from '@theia/debug/lib/browser/debug-session';
|
|
27
27
|
import { DebugSessionConnection } from '@theia/debug/lib/browser/debug-session-connection';
|
|
28
28
|
import { TerminalWidgetOptions, TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget';
|
|
@@ -32,12 +32,17 @@ import { DebugContribution } from '@theia/debug/lib/browser/debug-contribution';
|
|
|
32
32
|
import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
33
33
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
34
34
|
import { PluginChannel } from '../../../common/connection';
|
|
35
|
+
import { TestService } from '@theia/test/lib/browser/test-service';
|
|
36
|
+
import { DebugSessionManager } from '@theia/debug/lib/browser/debug-session-manager';
|
|
35
37
|
|
|
36
38
|
export class PluginDebugSession extends DebugSession {
|
|
37
39
|
constructor(
|
|
38
40
|
override readonly id: string,
|
|
39
41
|
override readonly options: DebugConfigurationSessionOptions,
|
|
40
42
|
override readonly parentSession: DebugSession | undefined,
|
|
43
|
+
testService: TestService,
|
|
44
|
+
testRun: TestRunReference | undefined,
|
|
45
|
+
sessionManager: DebugSessionManager,
|
|
41
46
|
protected override readonly connection: DebugSessionConnection,
|
|
42
47
|
protected override readonly terminalServer: TerminalService,
|
|
43
48
|
protected override readonly editorManager: EditorManager,
|
|
@@ -48,7 +53,8 @@ export class PluginDebugSession extends DebugSession {
|
|
|
48
53
|
protected readonly terminalOptionsExt: TerminalOptionsExt | undefined,
|
|
49
54
|
protected override readonly debugContributionProvider: ContributionProvider<DebugContribution>,
|
|
50
55
|
protected override readonly workspaceService: WorkspaceService) {
|
|
51
|
-
super(id, options, parentSession,
|
|
56
|
+
super(id, options, parentSession, testService, testRun, sessionManager, connection, terminalServer, editorManager, breakpoints,
|
|
57
|
+
labelProvider, messages, fileService, debugContributionProvider,
|
|
52
58
|
workspaceService);
|
|
53
59
|
}
|
|
54
60
|
|
|
@@ -75,12 +81,13 @@ export class PluginDebugSessionFactory extends DefaultDebugSessionFactory {
|
|
|
75
81
|
protected override readonly fileService: FileService,
|
|
76
82
|
protected readonly terminalOptionsExt: TerminalOptionsExt | undefined,
|
|
77
83
|
protected override readonly debugContributionProvider: ContributionProvider<DebugContribution>,
|
|
84
|
+
protected override readonly testService: TestService,
|
|
78
85
|
protected override readonly workspaceService: WorkspaceService,
|
|
79
86
|
) {
|
|
80
87
|
super();
|
|
81
88
|
}
|
|
82
89
|
|
|
83
|
-
override get(sessionId: string, options: DebugConfigurationSessionOptions, parentSession?: DebugSession): DebugSession {
|
|
90
|
+
override get(manager: DebugSessionManager, sessionId: string, options: DebugConfigurationSessionOptions, parentSession?: DebugSession): DebugSession {
|
|
84
91
|
const connection = new DebugSessionConnection(
|
|
85
92
|
sessionId,
|
|
86
93
|
this.connectionFactory,
|
|
@@ -90,6 +97,9 @@ export class PluginDebugSessionFactory extends DefaultDebugSessionFactory {
|
|
|
90
97
|
sessionId,
|
|
91
98
|
options,
|
|
92
99
|
parentSession,
|
|
100
|
+
this.testService,
|
|
101
|
+
options.testRun,
|
|
102
|
+
manager,
|
|
93
103
|
connection,
|
|
94
104
|
this.terminalService,
|
|
95
105
|
this.editorManager,
|
|
@@ -42,11 +42,8 @@ import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposa
|
|
|
42
42
|
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
|
43
43
|
import { MonacoQuickInputService } from '@theia/monaco/lib/browser/monaco-quick-input-service';
|
|
44
44
|
import { QuickInputButtons } from '../../plugin/types-impl';
|
|
45
|
-
import * as monaco from '@theia/monaco-editor-core';
|
|
46
|
-
import { UriComponents } from '../../common/uri-components';
|
|
47
|
-
import { URI } from '@theia/core/shared/vscode-uri';
|
|
48
45
|
import { ThemeIcon } from '@theia/monaco-editor-core/esm/vs/base/common/themables';
|
|
49
|
-
import {
|
|
46
|
+
import { PluginSharedStyle } from './plugin-shared-style';
|
|
50
47
|
import { QuickPickSeparator } from '@theia/core';
|
|
51
48
|
|
|
52
49
|
export interface QuickInputSession {
|
|
@@ -54,16 +51,12 @@ export interface QuickInputSession {
|
|
|
54
51
|
handlesToItems: Map<number, QuickPickItemOrSeparator>;
|
|
55
52
|
}
|
|
56
53
|
|
|
57
|
-
interface IconPath {
|
|
58
|
-
dark: URI,
|
|
59
|
-
light?: URI
|
|
60
|
-
};
|
|
61
|
-
|
|
62
54
|
export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
63
55
|
|
|
64
56
|
private quickInputService: QuickInputService;
|
|
65
57
|
private proxy: QuickOpenExt;
|
|
66
58
|
private delegate: MonacoQuickInputService;
|
|
59
|
+
private sharedStyle: PluginSharedStyle;
|
|
67
60
|
private readonly items: Record<number, {
|
|
68
61
|
resolve(items: QuickPickItemOrSeparator[]): void;
|
|
69
62
|
reject(error: Error): void;
|
|
@@ -75,6 +68,7 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
75
68
|
this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.QUICK_OPEN_EXT);
|
|
76
69
|
this.delegate = container.get(MonacoQuickInputService);
|
|
77
70
|
this.quickInputService = container.get(QuickInputService);
|
|
71
|
+
this.sharedStyle = container.get(PluginSharedStyle);
|
|
78
72
|
}
|
|
79
73
|
|
|
80
74
|
dispose(): void {
|
|
@@ -111,25 +105,21 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
111
105
|
return item?.kind === 'item';
|
|
112
106
|
}
|
|
113
107
|
|
|
114
|
-
private
|
|
115
|
-
|
|
116
|
-
iconClasses?: string[]
|
|
117
|
-
} {
|
|
118
|
-
let iconClasses;
|
|
108
|
+
private toIconClasses(path: { light: string; dark: string } | ThemeIcon | string | undefined): string[] {
|
|
109
|
+
const iconClasses: string[] = [];
|
|
119
110
|
if (ThemeIcon.isThemeIcon(path)) {
|
|
120
111
|
const codicon = codiconArray(path.id);
|
|
121
|
-
iconClasses
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
} else if (path && 'dark' in path) {
|
|
127
|
-
iconPath = { dark: URI.from(path.dark), light: URI.from(path.light) };
|
|
112
|
+
iconClasses.push(...codicon);
|
|
113
|
+
} else if (path) {
|
|
114
|
+
const iconReference = this.sharedStyle.toIconClass(path);
|
|
115
|
+
this.toDispose.push(iconReference);
|
|
116
|
+
iconClasses.push(iconReference.object.iconClass);
|
|
128
117
|
}
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
118
|
+
return iconClasses;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
private toIconClass(path: { light: string; dark: string } | ThemeIcon | string | undefined): string {
|
|
122
|
+
return this.toIconClasses(path).join(' ');
|
|
133
123
|
}
|
|
134
124
|
|
|
135
125
|
private toQuickPickItem(item: undefined): undefined;
|
|
@@ -146,13 +136,13 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
146
136
|
};
|
|
147
137
|
}
|
|
148
138
|
return {
|
|
149
|
-
...this.normalizeIconPath(item.iconPath),
|
|
150
139
|
type: 'item',
|
|
151
140
|
id: item.handle.toString(),
|
|
152
141
|
label: item.label,
|
|
153
142
|
description: item.description,
|
|
154
143
|
detail: item.detail,
|
|
155
144
|
alwaysShow: item.alwaysShow,
|
|
145
|
+
iconClasses: this.toIconClasses(item.iconUrl),
|
|
156
146
|
buttons: item.buttons ? this.convertToQuickInputButtons(item.buttons) : undefined
|
|
157
147
|
};
|
|
158
148
|
}
|
|
@@ -338,24 +328,12 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
338
328
|
if (button.handle === -1) {
|
|
339
329
|
return this.quickInputService.backButton;
|
|
340
330
|
}
|
|
341
|
-
const {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
};
|
|
348
|
-
} else {
|
|
349
|
-
const monacoIconPath = (iconPath as unknown as { light: monaco.Uri, dark: monaco.Uri });
|
|
350
|
-
return {
|
|
351
|
-
iconPath: {
|
|
352
|
-
dark: monaco.Uri.revive(monacoIconPath.dark),
|
|
353
|
-
light: monacoIconPath.light && monaco.Uri.revive(monacoIconPath.light)
|
|
354
|
-
},
|
|
355
|
-
tooltip,
|
|
356
|
-
handle
|
|
357
|
-
};
|
|
358
|
-
}
|
|
331
|
+
const { iconUrl, tooltip, handle } = button;
|
|
332
|
+
return {
|
|
333
|
+
tooltip,
|
|
334
|
+
handle,
|
|
335
|
+
iconClass: this.toIconClass(iconUrl)
|
|
336
|
+
};
|
|
359
337
|
});
|
|
360
338
|
} else {
|
|
361
339
|
(input as any)[param] = params[param];
|
|
@@ -381,7 +359,7 @@ export class QuickOpenMainImpl implements QuickOpenMain, Disposable {
|
|
|
381
359
|
|
|
382
360
|
private convertToQuickInputButtons(buttons: readonly TransferQuickInputButton[]): QuickInputButton[] {
|
|
383
361
|
return buttons.map((button, i) => ({
|
|
384
|
-
|
|
362
|
+
iconClass: this.toIconClass(button.iconUrl),
|
|
385
363
|
tooltip: button.tooltip,
|
|
386
364
|
handle: button === QuickInputButtons.Back ? -1 : i,
|
|
387
365
|
} as QuickInputButton));
|
|
@@ -15,21 +15,22 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
18
|
-
import { ApplicationShell, WidgetOpenerOptions } from '@theia/core/lib/browser';
|
|
19
|
-
import { TerminalEditorLocationOptions
|
|
18
|
+
import { ApplicationShell, WidgetOpenerOptions, codicon } from '@theia/core/lib/browser';
|
|
19
|
+
import { TerminalEditorLocationOptions } from '@theia/plugin';
|
|
20
20
|
import { TerminalLocation, TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget';
|
|
21
21
|
import { TerminalProfileService } from '@theia/terminal/lib/browser/terminal-profile-service';
|
|
22
22
|
import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
|
|
23
|
-
import { TerminalServiceMain, TerminalServiceExt, MAIN_RPC_CONTEXT } from '../../common/plugin-api-rpc';
|
|
23
|
+
import { TerminalServiceMain, TerminalServiceExt, MAIN_RPC_CONTEXT, TerminalOptions } from '../../common/plugin-api-rpc';
|
|
24
24
|
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
25
25
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
26
26
|
import { SerializableEnvironmentVariableCollection, ShellTerminalServerProxy } from '@theia/terminal/lib/common/shell-terminal-protocol';
|
|
27
27
|
import { TerminalLink, TerminalLinkProvider } from '@theia/terminal/lib/browser/terminal-link-provider';
|
|
28
28
|
import { URI } from '@theia/core/lib/common/uri';
|
|
29
|
-
import { getIconClass } from '../../plugin/terminal-ext';
|
|
30
29
|
import { PluginTerminalRegistry } from './plugin-terminal-registry';
|
|
31
|
-
import { CancellationToken } from '@theia/core';
|
|
30
|
+
import { CancellationToken, isObject } from '@theia/core';
|
|
32
31
|
import { HostedPluginSupport } from '../../hosted/browser/hosted-plugin';
|
|
32
|
+
import { PluginSharedStyle } from './plugin-shared-style';
|
|
33
|
+
import { ThemeIcon } from '@theia/core/lib/common/theme';
|
|
33
34
|
import debounce = require('@theia/core/shared/lodash.debounce');
|
|
34
35
|
|
|
35
36
|
interface TerminalObserverData {
|
|
@@ -49,6 +50,7 @@ export class TerminalServiceMainImpl implements TerminalServiceMain, TerminalLin
|
|
|
49
50
|
private readonly hostedPluginSupport: HostedPluginSupport;
|
|
50
51
|
private readonly shell: ApplicationShell;
|
|
51
52
|
private readonly extProxy: TerminalServiceExt;
|
|
53
|
+
private readonly sharedStyle: PluginSharedStyle;
|
|
52
54
|
private readonly shellTerminalServer: ShellTerminalServerProxy;
|
|
53
55
|
private readonly terminalLinkProviders: string[] = [];
|
|
54
56
|
|
|
@@ -60,6 +62,7 @@ export class TerminalServiceMainImpl implements TerminalServiceMain, TerminalLin
|
|
|
60
62
|
this.terminalProfileService = container.get(TerminalProfileService);
|
|
61
63
|
this.pluginTerminalRegistry = container.get(PluginTerminalRegistry);
|
|
62
64
|
this.hostedPluginSupport = container.get(HostedPluginSupport);
|
|
65
|
+
this.sharedStyle = container.get(PluginSharedStyle);
|
|
63
66
|
this.shell = container.get(ApplicationShell);
|
|
64
67
|
this.shellTerminalServer = container.get(ShellTerminalServerProxy);
|
|
65
68
|
this.extProxy = rpc.getProxy(MAIN_RPC_CONTEXT.TERMINAL_EXT);
|
|
@@ -153,7 +156,7 @@ export class TerminalServiceMainImpl implements TerminalServiceMain, TerminalLin
|
|
|
153
156
|
const terminal = await this.terminals.newTerminal({
|
|
154
157
|
id,
|
|
155
158
|
title: options.name,
|
|
156
|
-
iconClass:
|
|
159
|
+
iconClass: this.toIconClass(options),
|
|
157
160
|
shellPath: options.shellPath,
|
|
158
161
|
shellArgs: options.shellArgs,
|
|
159
162
|
cwd: options.cwd ? new URI(options.cwd) : undefined,
|
|
@@ -329,6 +332,23 @@ export class TerminalServiceMainImpl implements TerminalServiceMain, TerminalLin
|
|
|
329
332
|
}));
|
|
330
333
|
}
|
|
331
334
|
|
|
335
|
+
protected toIconClass(options: TerminalOptions): string | ThemeIcon | undefined {
|
|
336
|
+
const iconColor = isObject<{ id: string }>(options.color) && typeof options.color.id === 'string' ? options.color.id : undefined;
|
|
337
|
+
let iconClass: string;
|
|
338
|
+
if (options.iconUrl) {
|
|
339
|
+
if (typeof options.iconUrl === 'object' && 'id' in options.iconUrl) {
|
|
340
|
+
iconClass = codicon(options.iconUrl.id);
|
|
341
|
+
} else {
|
|
342
|
+
const iconReference = this.sharedStyle.toIconClass(options.iconUrl);
|
|
343
|
+
this.toDispose.push(iconReference);
|
|
344
|
+
iconClass = iconReference.object.iconClass;
|
|
345
|
+
}
|
|
346
|
+
} else {
|
|
347
|
+
iconClass = codicon('terminal');
|
|
348
|
+
}
|
|
349
|
+
return iconColor ? { id: iconClass, color: { id: iconColor } } : iconClass;
|
|
350
|
+
}
|
|
351
|
+
|
|
332
352
|
$unregisterTerminalObserver(id: string): void {
|
|
333
353
|
const observer = this.observers.get(id);
|
|
334
354
|
if (observer) {
|