@theia/plugin-ext 1.53.2 → 1.54.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 +10 -1
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc-model.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +7 -6
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/test-types.d.ts +11 -1
- package/lib/common/test-types.d.ts.map +1 -1
- package/lib/common/test-types.js +9 -1
- package/lib/common/test-types.js.map +1 -1
- package/lib/main/browser/authentication-main.d.ts +6 -6
- package/lib/main/browser/authentication-main.d.ts.map +1 -1
- package/lib/main/browser/authentication-main.js +15 -9
- package/lib/main/browser/authentication-main.js.map +1 -1
- package/lib/main/browser/command-registry-main.d.ts +0 -1
- package/lib/main/browser/command-registry-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +5 -3
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js +16 -3
- package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts +0 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts +2 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js +6 -2
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts +0 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
- package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
- package/lib/main/browser/editors-and-documents-main.js +14 -2
- package/lib/main/browser/editors-and-documents-main.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts +0 -1
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts.map +1 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.js +2 -2
- package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.d.ts.map +1 -1
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js +2 -0
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js.map +1 -1
- package/lib/main/browser/notebooks/notebooks-main.d.ts +0 -1
- package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +0 -1
- package/lib/main/browser/quick-open-main.d.ts.map +1 -1
- package/lib/main/browser/tabs/tabs-main.d.ts +1 -1
- package/lib/main/browser/tabs/tabs-main.d.ts.map +1 -1
- package/lib/main/browser/tabs/tabs-main.js +1 -1
- package/lib/main/browser/tabs/tabs-main.js.map +1 -1
- package/lib/main/browser/terminal-main.d.ts +0 -1
- package/lib/main/browser/terminal-main.d.ts.map +1 -1
- package/lib/main/browser/test-main.d.ts.map +1 -1
- package/lib/main/browser/test-main.js.map +1 -1
- package/lib/main/browser/text-editor-main.d.ts +6 -3
- package/lib/main/browser/text-editor-main.d.ts.map +1 -1
- package/lib/main/browser/text-editor-main.js +39 -5
- package/lib/main/browser/text-editor-main.js.map +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.d.ts +0 -1
- package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +0 -1
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-views-main.d.ts +0 -1
- package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +0 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview-views/webview-views-main.d.ts +0 -1
- package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
- package/lib/main/browser/webviews-main.d.ts +0 -1
- package/lib/main/browser/webviews-main.d.ts.map +1 -1
- package/lib/main/browser/workspace-main.d.ts +0 -1
- package/lib/main/browser/workspace-main.d.ts.map +1 -1
- package/lib/plugin/authentication-ext.d.ts +3 -3
- package/lib/plugin/authentication-ext.d.ts.map +1 -1
- package/lib/plugin/authentication-ext.js +8 -5
- package/lib/plugin/authentication-ext.js.map +1 -1
- package/lib/plugin/clipboard-ext.d.ts +0 -1
- package/lib/plugin/clipboard-ext.d.ts.map +1 -1
- package/lib/plugin/command-registry.d.ts +0 -1
- package/lib/plugin/command-registry.d.ts.map +1 -1
- package/lib/plugin/comments.d.ts +0 -1
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/custom-editors.d.ts +0 -1
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/debug/debug-ext.d.ts +0 -1
- package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +0 -1
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +0 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +0 -1
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
- package/lib/plugin/decorations.d.ts +0 -1
- package/lib/plugin/decorations.d.ts.map +1 -1
- package/lib/plugin/dialogs.d.ts +0 -1
- package/lib/plugin/dialogs.d.ts.map +1 -1
- package/lib/plugin/document-data.d.ts +0 -1
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/documents.d.ts +0 -1
- package/lib/plugin/documents.d.ts.map +1 -1
- package/lib/plugin/env.d.ts +0 -1
- package/lib/plugin/env.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts +0 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts +0 -1
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/label-service.d.ts +0 -1
- package/lib/plugin/label-service.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +0 -1
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/code-action.d.ts +0 -1
- package/lib/plugin/languages/code-action.d.ts.map +1 -1
- package/lib/plugin/languages/color.d.ts +0 -1
- package/lib/plugin/languages/color.d.ts.map +1 -1
- package/lib/plugin/languages/completion.d.ts +0 -1
- package/lib/plugin/languages/completion.d.ts.map +1 -1
- package/lib/plugin/languages/declaration.d.ts +0 -1
- package/lib/plugin/languages/declaration.d.ts.map +1 -1
- package/lib/plugin/languages/definition.d.ts +0 -1
- package/lib/plugin/languages/definition.d.ts.map +1 -1
- package/lib/plugin/languages/diagnostics.d.ts +0 -1
- package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
- package/lib/plugin/languages/document-drop-edit.d.ts +0 -1
- package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
- package/lib/plugin/languages/document-formatting.d.ts +0 -1
- package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/document-highlight.d.ts +0 -1
- package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
- package/lib/plugin/languages/evaluatable-expression.d.ts +0 -1
- package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
- package/lib/plugin/languages/folding.d.ts +0 -1
- package/lib/plugin/languages/folding.d.ts.map +1 -1
- package/lib/plugin/languages/hover.d.ts +0 -1
- package/lib/plugin/languages/hover.d.ts.map +1 -1
- package/lib/plugin/languages/implementation.d.ts +0 -1
- package/lib/plugin/languages/implementation.d.ts.map +1 -1
- package/lib/plugin/languages/inlay-hints.d.ts +0 -1
- package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
- package/lib/plugin/languages/inline-completion.d.ts +0 -1
- package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
- package/lib/plugin/languages/inline-values.d.ts +0 -1
- package/lib/plugin/languages/inline-values.d.ts.map +1 -1
- package/lib/plugin/languages/lens.d.ts +0 -1
- package/lib/plugin/languages/lens.d.ts.map +1 -1
- package/lib/plugin/languages/link-provider.d.ts +0 -1
- package/lib/plugin/languages/link-provider.d.ts.map +1 -1
- package/lib/plugin/languages/linked-editing-range.d.ts +0 -1
- package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
- package/lib/plugin/languages/on-type-formatting.d.ts +0 -1
- package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/outline.d.ts +0 -1
- package/lib/plugin/languages/outline.d.ts.map +1 -1
- package/lib/plugin/languages/range-formatting.d.ts +0 -1
- package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/reference.d.ts +0 -1
- package/lib/plugin/languages/reference.d.ts.map +1 -1
- package/lib/plugin/languages/rename.d.ts +0 -1
- package/lib/plugin/languages/rename.d.ts.map +1 -1
- package/lib/plugin/languages/selection-range.d.ts +0 -1
- package/lib/plugin/languages/selection-range.d.ts.map +1 -1
- package/lib/plugin/languages/semantic-highlighting.d.ts +0 -1
- package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
- package/lib/plugin/languages/signature.d.ts +0 -1
- package/lib/plugin/languages/signature.d.ts.map +1 -1
- package/lib/plugin/languages/type-definition.d.ts +0 -1
- package/lib/plugin/languages/type-definition.d.ts.map +1 -1
- package/lib/plugin/languages/type-hierarchy.d.ts +0 -1
- package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/util.d.ts +0 -1
- package/lib/plugin/languages/util.d.ts.map +1 -1
- package/lib/plugin/languages/workspace-symbol.d.ts +0 -1
- package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
- package/lib/plugin/languages-utils.d.ts +0 -1
- package/lib/plugin/languages-utils.d.ts.map +1 -1
- package/lib/plugin/languages.d.ts +0 -1
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/markdown-string.d.ts +0 -1
- package/lib/plugin/markdown-string.d.ts.map +1 -1
- package/lib/plugin/message-registry.d.ts +0 -1
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +0 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-document.d.ts +0 -1
- package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-documents.d.ts +0 -1
- package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editor.d.ts +0 -1
- package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editors.d.ts +0 -1
- package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-kernels.d.ts +0 -1
- package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-renderers.d.ts +0 -1
- package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
- package/lib/plugin/notebook/notebooks.d.ts +1 -1
- package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
- package/lib/plugin/notebook/notebooks.js +22 -2
- package/lib/plugin/notebook/notebooks.js.map +1 -1
- package/lib/plugin/notification.d.ts +0 -1
- package/lib/plugin/notification.d.ts.map +1 -1
- package/lib/plugin/output-channel/log-output-channel.d.ts +0 -1
- package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
- package/lib/plugin/output-channel/output-channel-item.d.ts +0 -1
- package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
- package/lib/plugin/output-channel-registry.d.ts +0 -1
- package/lib/plugin/output-channel-registry.d.ts.map +1 -1
- package/lib/plugin/plugin-context.d.ts +0 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +4 -0
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts +0 -1
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-storage.d.ts +0 -1
- package/lib/plugin/plugin-storage.d.ts.map +1 -1
- package/lib/plugin/preference-registry.d.ts +0 -1
- package/lib/plugin/preference-registry.d.ts.map +1 -1
- package/lib/plugin/quick-open.d.ts +0 -1
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/scm.d.ts +0 -1
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/secrets-ext.d.ts +0 -1
- package/lib/plugin/secrets-ext.d.ts.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts +0 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
- package/lib/plugin/status-bar-message-registry.d.ts +0 -1
- package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
- package/lib/plugin/tabs.d.ts +0 -1
- package/lib/plugin/tabs.d.ts.map +1 -1
- package/lib/plugin/tasks/task-provider.d.ts +0 -1
- package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +0 -1
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.d.ts +1 -1
- package/lib/plugin/terminal-ext.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.js +1 -0
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/test-item.d.ts +0 -1
- package/lib/plugin/test-item.d.ts.map +1 -1
- package/lib/plugin/tests.d.ts +8 -2
- package/lib/plugin/tests.d.ts.map +1 -1
- package/lib/plugin/tests.js +24 -1
- package/lib/plugin/tests.js.map +1 -1
- package/lib/plugin/text-editor.d.ts +1 -2
- package/lib/plugin/text-editor.d.ts.map +1 -1
- package/lib/plugin/text-editor.js.map +1 -1
- package/lib/plugin/text-editors.d.ts +0 -1
- package/lib/plugin/text-editors.d.ts.map +1 -1
- package/lib/plugin/timeline.d.ts +0 -1
- package/lib/plugin/timeline.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts +0 -1
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/type-converters.d.ts +13 -2
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +55 -5
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +7 -1
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +9 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/uri-ext.d.ts +0 -1
- package/lib/plugin/uri-ext.d.ts.map +1 -1
- package/lib/plugin/webview-views.d.ts +0 -1
- package/lib/plugin/webview-views.d.ts.map +1 -1
- package/lib/plugin/webviews.d.ts +0 -1
- package/lib/plugin/webviews.d.ts.map +1 -1
- package/lib/plugin/window-state.d.ts +0 -1
- package/lib/plugin/window-state.d.ts.map +1 -1
- package/lib/plugin/workspace.d.ts +0 -1
- package/lib/plugin/workspace.d.ts.map +1 -1
- package/package.json +29 -29
- package/src/common/plugin-api-rpc-model.ts +11 -0
- package/src/common/plugin-api-rpc.ts +7 -5
- package/src/common/test-types.ts +15 -1
- package/src/main/browser/authentication-main.ts +24 -11
- package/src/main/browser/custom-editors/custom-editor-opener.tsx +19 -4
- package/src/main/browser/custom-editors/plugin-custom-editor-registry.ts +7 -3
- package/src/main/browser/editors-and-documents-main.ts +25 -2
- package/src/main/browser/menus/plugin-menu-command-adapter.ts +2 -2
- package/src/main/browser/notebooks/notebook-documents-and-editors-main.ts +4 -1
- package/src/main/browser/tabs/tabs-main.ts +6 -2
- package/src/main/browser/test-main.ts +4 -1
- package/src/main/browser/text-editor-main.ts +55 -14
- package/src/plugin/authentication-ext.ts +9 -5
- package/src/plugin/notebook/notebooks.ts +21 -0
- package/src/plugin/plugin-context.ts +6 -1
- package/src/plugin/terminal-ext.ts +1 -0
- package/src/plugin/tests.ts +34 -3
- package/src/plugin/text-editor.ts +1 -1
- package/src/plugin/type-converters.ts +58 -6
- package/src/plugin/types-impl.ts +10 -1
|
@@ -97,6 +97,13 @@ export class NotebooksExtImpl implements NotebooksExt {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
|
+
|
|
101
|
+
textDocumentsAndEditors.onDidChangeActiveTextEditor(e => {
|
|
102
|
+
if (e && e?.document.uri.scheme !== CellUri.cellUriScheme && this.activeNotebookEditor) {
|
|
103
|
+
this.activeNotebookEditor = undefined;
|
|
104
|
+
this.onDidChangeActiveNotebookEditorEmitter.fire(undefined);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
async $provideNotebookCellStatusBarItems(handle: number, uri: UriComponents, index: number, token: CancellationToken): Promise<NotebookCellStatusBarListDto | undefined> {
|
|
@@ -131,6 +138,15 @@ export class NotebooksExtImpl implements NotebooksExt {
|
|
|
131
138
|
this.statusBarRegistry.delete(cacheId);
|
|
132
139
|
}
|
|
133
140
|
|
|
141
|
+
$acceptActiveCellEditorChange(newActiveEditor: string | null): void {
|
|
142
|
+
const newActiveEditorId = this.textDocumentsAndEditors.allEditors().find(editor => editor.document.uri.toString() === newActiveEditor)?.id;
|
|
143
|
+
if (newActiveEditorId || newActiveEditor === null) {
|
|
144
|
+
this.textDocumentsAndEditors.acceptEditorsAndDocumentsDelta({
|
|
145
|
+
newActiveEditor: newActiveEditorId ?? null
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
134
150
|
// --- serialize/deserialize
|
|
135
151
|
|
|
136
152
|
private currentSerializerHandle = 0;
|
|
@@ -319,6 +335,11 @@ export class NotebooksExtImpl implements NotebooksExt {
|
|
|
319
335
|
console.error(`FAILED to find active notebook editor ${delta.newActiveEditor}`);
|
|
320
336
|
}
|
|
321
337
|
this.activeNotebookEditor = this.editors.get(delta.newActiveEditor);
|
|
338
|
+
if (this.textDocumentsAndEditors.activeEditor()?.document.uri.path !== this.activeNotebookEditor?.notebookData.uri.path) {
|
|
339
|
+
this.textDocumentsAndEditors.acceptEditorsAndDocumentsDelta({
|
|
340
|
+
newActiveEditor: null
|
|
341
|
+
});
|
|
342
|
+
}
|
|
322
343
|
}
|
|
323
344
|
if (delta.newActiveEditor !== undefined) {
|
|
324
345
|
this.onDidChangeActiveNotebookEditorEmitter.fire(this.activeNotebookEditor?.apiEditor);
|
|
@@ -187,6 +187,7 @@ import {
|
|
|
187
187
|
TestTag,
|
|
188
188
|
TestRunRequest,
|
|
189
189
|
TestMessage,
|
|
190
|
+
TestMessageStackFrame,
|
|
190
191
|
ExtensionKind,
|
|
191
192
|
InlineCompletionItem,
|
|
192
193
|
InlineCompletionList,
|
|
@@ -338,6 +339,9 @@ export function createAPIFactory(
|
|
|
338
339
|
},
|
|
339
340
|
get onDidChangeSessions(): theia.Event<theia.AuthenticationSessionsChangeEvent> {
|
|
340
341
|
return authenticationExt.onDidChangeSessions;
|
|
342
|
+
},
|
|
343
|
+
getAccounts(providerId: string): Thenable<readonly theia.AuthenticationSessionAccountInformation[]> {
|
|
344
|
+
return authenticationExt.getAccounts(providerId);
|
|
341
345
|
}
|
|
342
346
|
};
|
|
343
347
|
function commandIsDeclaredInPackage(id: string, model: PluginPackage): boolean {
|
|
@@ -881,7 +885,7 @@ export function createAPIFactory(
|
|
|
881
885
|
|
|
882
886
|
const extensions: typeof theia.extensions = Object.freeze({
|
|
883
887
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
884
|
-
getExtension<T = any>(extensionId: string, includeFromDifferentExtensionHosts: boolean = false): theia.Extension<T> | undefined {
|
|
888
|
+
getExtension<T = any>(extensionId: string, includeFromDifferentExtensionHosts: boolean = false): theia.Extension<T | undefined> | undefined {
|
|
885
889
|
includeFromDifferentExtensionHosts = false;
|
|
886
890
|
const plg = pluginManager.getPluginById(extensionId.toLowerCase());
|
|
887
891
|
if (plg) {
|
|
@@ -1460,6 +1464,7 @@ export function createAPIFactory(
|
|
|
1460
1464
|
TestTag,
|
|
1461
1465
|
TestRunRequest,
|
|
1462
1466
|
TestMessage,
|
|
1467
|
+
TestMessageStackFrame,
|
|
1463
1468
|
ExtensionKind,
|
|
1464
1469
|
InlineCompletionItem,
|
|
1465
1470
|
InlineCompletionList,
|
|
@@ -478,6 +478,7 @@ export class TerminalExtImpl implements theia.Terminal {
|
|
|
478
478
|
this.creationOptions = this.options;
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
+
/** @stubbed Terminal Shell Ingration */
|
|
481
482
|
shellIntegration: theia.TerminalShellIntegration | undefined = undefined;
|
|
482
483
|
|
|
483
484
|
sendText(text: string, shouldExecute: boolean = true): void {
|
package/src/plugin/tests.ts
CHANGED
|
@@ -40,10 +40,12 @@ import { TestItemImpl, TestItemCollection } from './test-item';
|
|
|
40
40
|
import { AccumulatingTreeDeltaEmitter, TreeDelta } from '@theia/test/lib/common/tree-delta';
|
|
41
41
|
import {
|
|
42
42
|
TestItemDTO, TestOutputDTO, TestExecutionState, TestRunProfileDTO,
|
|
43
|
-
TestRunProfileKind, TestRunRequestDTO, TestStateChangeDTO, TestItemReference, TestMessageArg, TestMessageDTO
|
|
43
|
+
TestRunProfileKind, TestRunRequestDTO, TestStateChangeDTO, TestItemReference, TestMessageArg, TestMessageDTO,
|
|
44
|
+
TestMessageStackFrameDTO
|
|
44
45
|
} from '../common/test-types';
|
|
46
|
+
import * as protocol from '@theia/core/shared/vscode-languageserver-protocol';
|
|
45
47
|
import { ChangeBatcher, observableProperty } from '@theia/test/lib/common/collections';
|
|
46
|
-
import { TestRunRequest } from './types-impl';
|
|
48
|
+
import { Location, Position, Range, TestRunRequest, URI } from './types-impl';
|
|
47
49
|
import { MarkdownString } from '../common/plugin-api-rpc-model';
|
|
48
50
|
|
|
49
51
|
type RefreshHandler = (token: theia.CancellationToken) => void | theia.Thenable<void>;
|
|
@@ -374,7 +376,36 @@ export class TestingExtImpl implements TestingExt {
|
|
|
374
376
|
actualOutput: testMessage.actual,
|
|
375
377
|
expectedOutput: testMessage.expected,
|
|
376
378
|
contextValue: testMessage.contextValue,
|
|
377
|
-
location:
|
|
379
|
+
location: this.toLocation(testMessage.location),
|
|
380
|
+
stackTrace: testMessage.stackTrace ? testMessage.stackTrace.map(frame => this.toStackFrame(frame)) : undefined
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
toLocation(location: protocol.Location | undefined): Location | undefined {
|
|
385
|
+
if (!location) {
|
|
386
|
+
return undefined;
|
|
387
|
+
}
|
|
388
|
+
return new Location(URI.parse(location.uri), this.toRange(location.range));
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
toRange(range: protocol.Range): Range {
|
|
392
|
+
return new Range(this.toPosition(range.start), this.toPosition(range.end));
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
toPosition(position: protocol.Position): Position;
|
|
396
|
+
toPosition(position: protocol.Position | undefined): Position | undefined;
|
|
397
|
+
toPosition(position: protocol.Position | undefined): Position | undefined {
|
|
398
|
+
if (!position) {
|
|
399
|
+
return undefined;
|
|
400
|
+
}
|
|
401
|
+
return new Position(position.line, position.character);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
toStackFrame(stackFrame: TestMessageStackFrameDTO): theia.TestMessageStackFrame {
|
|
405
|
+
return {
|
|
406
|
+
label: stackFrame.label,
|
|
407
|
+
position: this.toPosition(stackFrame.position),
|
|
408
|
+
uri: stackFrame.uri ? URI.parse(stackFrame.uri) : undefined
|
|
378
409
|
};
|
|
379
410
|
}
|
|
380
411
|
|
|
@@ -30,7 +30,7 @@ export class TextEditorExt implements theia.TextEditor {
|
|
|
30
30
|
private disposed = false;
|
|
31
31
|
constructor(
|
|
32
32
|
private readonly proxy: TextEditorsMain,
|
|
33
|
-
|
|
33
|
+
readonly id: string,
|
|
34
34
|
document: DocumentDataExt,
|
|
35
35
|
private _selections: Selection[],
|
|
36
36
|
options: TextEditorConfiguration,
|
|
@@ -34,7 +34,7 @@ import { BinaryBuffer } from '@theia/core/lib/common/buffer';
|
|
|
34
34
|
import { CellRange, isTextStreamMime } from '@theia/notebook/lib/common';
|
|
35
35
|
import { MarkdownString as MarkdownStringDTO } from '@theia/core/lib/common/markdown-rendering';
|
|
36
36
|
|
|
37
|
-
import { TestItemDTO, TestMessageDTO } from '../common/test-types';
|
|
37
|
+
import { TestItemDTO, TestMessageDTO, TestMessageStackFrameDTO } from '../common/test-types';
|
|
38
38
|
import { PluginIconPath } from './plugin-icon-path';
|
|
39
39
|
|
|
40
40
|
const SIDE_GROUP = -2;
|
|
@@ -134,12 +134,21 @@ export function fromRange(range: theia.Range | undefined): model.Range | undefin
|
|
|
134
134
|
endColumn: end.character + 1
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
export function fromPosition(position: types.Position | theia.Position): Position
|
|
137
|
+
export function fromPosition(position: types.Position | theia.Position): Position;
|
|
138
|
+
export function fromPosition(position: types.Position | theia.Position | undefined): Position | undefined;
|
|
139
|
+
export function fromPosition(position: types.Position | theia.Position | undefined): Position | undefined {
|
|
140
|
+
if (!position) {
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
139
143
|
return { lineNumber: position.line + 1, column: position.character + 1 };
|
|
140
144
|
}
|
|
141
145
|
|
|
142
|
-
export function toPosition(position: Position): types.Position
|
|
146
|
+
export function toPosition(position: Position): types.Position;
|
|
147
|
+
export function toPosition(position: Position | undefined): types.Position | undefined;
|
|
148
|
+
export function toPosition(position: Position | undefined): types.Position | undefined {
|
|
149
|
+
if (!position) {
|
|
150
|
+
return undefined;
|
|
151
|
+
}
|
|
143
152
|
return new types.Position(position.lineNumber - 1, position.column - 1);
|
|
144
153
|
}
|
|
145
154
|
|
|
@@ -474,6 +483,18 @@ export function fromLocation(location: theia.Location | undefined): model.Locati
|
|
|
474
483
|
};
|
|
475
484
|
}
|
|
476
485
|
|
|
486
|
+
export function fromLocationToLanguageServerLocation(location: theia.Location): lstypes.Location;
|
|
487
|
+
export function fromLocationToLanguageServerLocation(location: theia.Location | undefined): lstypes.Location | undefined;
|
|
488
|
+
export function fromLocationToLanguageServerLocation(location: theia.Location | undefined): lstypes.Location | undefined {
|
|
489
|
+
if (!location) {
|
|
490
|
+
return undefined;
|
|
491
|
+
}
|
|
492
|
+
return <lstypes.Location>{
|
|
493
|
+
uri: location.uri.toString(),
|
|
494
|
+
range: location.range
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
|
|
477
498
|
export function fromTextDocumentShowOptions(options: theia.TextDocumentShowOptions): model.TextDocumentShowOptions {
|
|
478
499
|
if (options.selection) {
|
|
479
500
|
return {
|
|
@@ -731,6 +752,26 @@ export function toSymbolTag(kind: model.SymbolTag): types.SymbolTag {
|
|
|
731
752
|
}
|
|
732
753
|
}
|
|
733
754
|
|
|
755
|
+
/**
|
|
756
|
+
* Creates a merged symbol of type theia.SymbolInformation & theia.DocumentSymbol.
|
|
757
|
+
* Is only used as the result type of the `vscode.executeDocumentSymbolProvider` command.
|
|
758
|
+
*/
|
|
759
|
+
export function toMergedSymbol(uri: UriComponents, symbol: model.DocumentSymbol): theia.SymbolInformation & theia.DocumentSymbol {
|
|
760
|
+
const uriValue = URI.revive(uri);
|
|
761
|
+
const location = new types.Location(uriValue, toRange(symbol.range));
|
|
762
|
+
return {
|
|
763
|
+
name: symbol.name,
|
|
764
|
+
containerName: symbol.containerName ?? '',
|
|
765
|
+
kind: SymbolKind.toSymbolKind(symbol.kind),
|
|
766
|
+
tags: [],
|
|
767
|
+
location,
|
|
768
|
+
detail: symbol.detail,
|
|
769
|
+
range: location.range,
|
|
770
|
+
selectionRange: toRange(symbol.selectionRange),
|
|
771
|
+
children: symbol.children?.map(child => toMergedSymbol(uri, child)) ?? []
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
|
|
734
775
|
export function isModelLocation(arg: unknown): arg is model.Location {
|
|
735
776
|
return isObject<model.Location>(arg) &&
|
|
736
777
|
isModelRange(arg.range) &&
|
|
@@ -1677,15 +1718,26 @@ export namespace TestMessage {
|
|
|
1677
1718
|
return message.map(msg => TestMessage.from(msg)[0]);
|
|
1678
1719
|
}
|
|
1679
1720
|
return [{
|
|
1680
|
-
location:
|
|
1721
|
+
location: fromLocationToLanguageServerLocation(message.location),
|
|
1681
1722
|
message: fromMarkdown(message.message)!,
|
|
1682
1723
|
expected: message.expectedOutput,
|
|
1683
1724
|
actual: message.actualOutput,
|
|
1684
|
-
contextValue: message.contextValue
|
|
1725
|
+
contextValue: message.contextValue,
|
|
1726
|
+
stackTrace: message.stackTrace && message.stackTrace.map(frame => TestMessageStackFrame.from(frame))
|
|
1685
1727
|
}];
|
|
1686
1728
|
}
|
|
1687
1729
|
}
|
|
1688
1730
|
|
|
1731
|
+
export namespace TestMessageStackFrame {
|
|
1732
|
+
export function from(stackTrace: theia.TestMessageStackFrame): TestMessageStackFrameDTO {
|
|
1733
|
+
return {
|
|
1734
|
+
label: stackTrace.label,
|
|
1735
|
+
position: stackTrace.position,
|
|
1736
|
+
uri: stackTrace?.uri?.toString()
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1689
1741
|
export namespace TestItem {
|
|
1690
1742
|
export function from(test: theia.TestItem): TestItemDTO {
|
|
1691
1743
|
return <TestItemDTO>TestItem.fromPartial(test);
|
package/src/plugin/types-impl.ts
CHANGED
|
@@ -3036,7 +3036,7 @@ export class DebugThread implements theia.DebugThread {
|
|
|
3036
3036
|
}
|
|
3037
3037
|
|
|
3038
3038
|
export class DebugStackFrame implements theia.DebugStackFrame {
|
|
3039
|
-
|
|
3039
|
+
constructor(readonly session: theia.DebugSession, readonly threadId: number, readonly frameId: number) { }
|
|
3040
3040
|
}
|
|
3041
3041
|
|
|
3042
3042
|
@es5ClassCompat
|
|
@@ -3350,6 +3350,7 @@ export class TestMessage implements theia.TestMessage {
|
|
|
3350
3350
|
public actualOutput?: string;
|
|
3351
3351
|
public location?: theia.Location;
|
|
3352
3352
|
public contextValue?: string;
|
|
3353
|
+
public stackTrace?: theia.TestMessageStackFrame[] | undefined;
|
|
3353
3354
|
|
|
3354
3355
|
public static diff(message: string | theia.MarkdownString, expected: string, actual: string): theia.TestMessage {
|
|
3355
3356
|
const msg = new TestMessage(message);
|
|
@@ -3366,6 +3367,14 @@ export class TestCoverageCount {
|
|
|
3366
3367
|
constructor(public covered: number, public total: number) { }
|
|
3367
3368
|
}
|
|
3368
3369
|
|
|
3370
|
+
export class TestMessageStackFrame implements theia.TestMessageStackFrame {
|
|
3371
|
+
constructor(
|
|
3372
|
+
public label: string,
|
|
3373
|
+
public uri?: theia.Uri,
|
|
3374
|
+
public position?: Position
|
|
3375
|
+
) { }
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3369
3378
|
@es5ClassCompat
|
|
3370
3379
|
export class FileCoverage {
|
|
3371
3380
|
|