@theia/plugin-ext 1.18.0 → 1.19.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/README.md +5 -0
- package/lib/common/connection.d.ts +1 -2
- package/lib/common/connection.d.ts.map +1 -1
- package/lib/common/connection.js.map +1 -1
- package/lib/common/plugin-api-rpc-model.d.ts +2 -0
- 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 +8 -8
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +1 -0
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts +4 -5
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +17 -13
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.js +14 -38
- package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts +37 -0
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts.map +1 -0
- package/lib/hosted/node/hosted-plugin-localization-service.js +197 -0
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -0
- package/lib/hosted/node/hosted-plugin-process.d.ts +2 -2
- package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.js +5 -7
- package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.d.ts.map +1 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js +2 -0
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
- package/lib/hosted/node/plugin-manifest-loader.d.ts +1 -1
- package/lib/hosted/node/plugin-manifest-loader.d.ts.map +1 -1
- package/lib/hosted/node/plugin-manifest-loader.js +4 -52
- package/lib/hosted/node/plugin-manifest-loader.js.map +1 -1
- package/lib/hosted/node/plugin-service.d.ts +3 -6
- package/lib/hosted/node/plugin-service.d.ts.map +1 -1
- package/lib/hosted/node/plugin-service.js +7 -40
- package/lib/hosted/node/plugin-service.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +1 -0
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js +5 -2
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +1 -2
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +1 -2
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/debug/debug-main.js +1 -1
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +2 -2
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
- package/lib/main/browser/dialogs/modal-notification.d.ts +3 -3
- package/lib/main/browser/dialogs/modal-notification.d.ts.map +1 -1
- package/lib/main/browser/dialogs/modal-notification.js +17 -6
- package/lib/main/browser/dialogs/modal-notification.js.map +1 -1
- package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
- package/lib/main/browser/editors-and-documents-main.js +3 -4
- package/lib/main/browser/editors-and-documents-main.js.map +1 -1
- package/lib/main/browser/languages-main.js +1 -1
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/message-registry-main.js +1 -1
- package/lib/main/browser/message-registry-main.js.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +1 -1
- package/lib/main/browser/quick-open-main.d.ts.map +1 -1
- package/lib/main/browser/quick-open-main.js.map +1 -1
- package/lib/main/browser/timeline-main.d.ts.map +1 -1
- package/lib/main/browser/timeline-main.js +1 -1
- package/lib/main/browser/timeline-main.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts +3 -2
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +63 -23
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.d.ts +2 -0
- package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.js +3 -1
- package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +3 -4
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +25 -28
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/browser/webview/webview-frontend-security-warnings.d.ts.map +1 -1
- package/lib/main/browser/webview/webview-frontend-security-warnings.js +8 -5
- package/lib/main/browser/webview/webview-frontend-security-warnings.js.map +1 -1
- package/lib/main/browser/webview/webview-preferences.d.ts.map +1 -1
- package/lib/main/browser/webview/webview-preferences.js +3 -2
- package/lib/main/browser/webview/webview-preferences.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +1 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +1 -1
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/comments.js +2 -3
- package/lib/plugin/comments.js.map +1 -1
- package/lib/plugin/custom-editors.d.ts +1 -2
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/custom-editors.js +2 -3
- package/lib/plugin/custom-editors.js.map +1 -1
- package/lib/plugin/decorations.d.ts.map +1 -1
- package/lib/plugin/decorations.js +2 -3
- package/lib/plugin/decorations.js.map +1 -1
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/document-data.js +1 -1
- package/lib/plugin/document-data.js.map +1 -1
- package/lib/plugin/documents.d.ts.map +1 -1
- package/lib/plugin/documents.js +1 -2
- package/lib/plugin/documents.js.map +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 +2 -3
- package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.js +12 -13
- package/lib/plugin/file-system-ext-impl.js.map +1 -1
- package/lib/plugin/known-commands.spec.js +1 -2
- package/lib/plugin/known-commands.spec.js.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.js +7 -3
- package/lib/plugin/languages/call-hierarchy.js.map +1 -1
- package/lib/plugin/languages/rename.d.ts +1 -2
- package/lib/plugin/languages/rename.d.ts.map +1 -1
- package/lib/plugin/languages/rename.js.map +1 -1
- package/lib/plugin/languages.d.ts +1 -1
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/languages.js.map +1 -1
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/message-registry.js +8 -5
- package/lib/plugin/message-registry.js.map +1 -1
- package/lib/plugin/node/debug/debug.d.ts +1 -1
- package/lib/plugin/node/debug/debug.d.ts.map +1 -1
- package/lib/plugin/node/debug/debug.js +10 -4
- package/lib/plugin/node/debug/debug.js.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts +3 -3
- package/lib/plugin/node/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-session.js.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts +6 -4
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.js +23 -13
- package/lib/plugin/node/debug/plugin-debug-adapter-starter.js.map +1 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +3 -2
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-storage.d.ts.map +1 -1
- package/lib/plugin/plugin-storage.js.map +1 -1
- package/lib/plugin/preference-registry.spec.js.map +1 -1
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +9 -2
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/timeline.d.ts.map +1 -1
- package/lib/plugin/timeline.js +1 -2
- package/lib/plugin/timeline.js.map +1 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +10 -7
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +34 -0
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +61 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/webviews.d.ts +1 -2
- package/lib/plugin/webviews.d.ts.map +1 -1
- package/lib/plugin/webviews.js.map +1 -1
- package/package.json +26 -24
- package/src/common/connection.ts +1 -2
- package/src/common/plugin-api-rpc-model.ts +2 -0
- package/src/common/plugin-api-rpc.ts +8 -7
- package/src/common/plugin-protocol.ts +1 -0
- package/src/hosted/browser/hosted-plugin.ts +16 -11
- package/src/hosted/node/hosted-plugin-deployer-handler.ts +13 -40
- package/src/hosted/node/hosted-plugin-localization-service.ts +201 -0
- package/src/hosted/node/hosted-plugin-process.ts +4 -6
- package/src/hosted/node/plugin-ext-hosted-backend-module.ts +2 -0
- package/src/hosted/node/plugin-manifest-loader.ts +4 -56
- package/src/hosted/node/plugin-service.ts +7 -40
- package/src/hosted/node/scanners/scanner-theia.ts +1 -0
- package/src/main/browser/callhierarchy/callhierarchy-type-converters.ts +5 -2
- package/src/main/browser/custom-editors/custom-editor-opener.tsx +1 -2
- package/src/main/browser/custom-editors/custom-editors-main.ts +1 -2
- package/src/main/browser/debug/debug-main.ts +1 -1
- package/src/main/browser/debug/plugin-debug-session-factory.ts +3 -3
- package/src/main/browser/dialogs/modal-notification.ts +18 -7
- package/src/main/browser/dialogs/style/modal-notification.css +17 -2
- package/src/main/browser/editors-and-documents-main.ts +1 -2
- package/src/main/browser/languages-main.ts +1 -1
- package/src/main/browser/message-registry-main.ts +1 -1
- package/src/main/browser/quick-open-main.ts +1 -1
- package/src/main/browser/timeline-main.ts +1 -2
- package/src/main/browser/view/plugin-view-registry.ts +67 -25
- package/src/main/browser/view/plugin-view-widget.ts +7 -2
- package/src/main/browser/view/tree-view-widget.tsx +41 -46
- package/src/main/browser/webview/pre/host.js +3 -4
- package/src/main/browser/webview/webview-frontend-security-warnings.ts +8 -7
- package/src/main/browser/webview/webview-preferences.ts +3 -2
- package/src/main/browser/webview/webview.ts +1 -1
- package/src/plugin/comments.ts +1 -2
- package/src/plugin/custom-editors.ts +2 -4
- package/src/plugin/decorations.ts +1 -2
- package/src/plugin/document-data.ts +1 -2
- package/src/plugin/documents.ts +1 -2
- package/src/plugin/file-system-event-service-ext-impl.ts +1 -2
- package/src/plugin/file-system-ext-impl.ts +1 -2
- package/src/plugin/known-commands.spec.ts +1 -2
- package/src/plugin/languages/call-hierarchy.ts +13 -5
- package/src/plugin/languages/rename.ts +1 -2
- package/src/plugin/languages.ts +3 -1
- package/src/plugin/message-registry.ts +9 -6
- package/src/plugin/node/debug/debug.ts +14 -7
- package/src/plugin/node/debug/plugin-debug-adapter-session.ts +3 -3
- package/src/plugin/node/debug/plugin-debug-adapter-starter.ts +24 -14
- package/src/plugin/plugin-context.ts +6 -4
- package/src/plugin/plugin-storage.ts +1 -2
- package/src/plugin/preference-registry.spec.ts +1 -2
- package/src/plugin/quick-open.ts +10 -3
- package/src/plugin/timeline.ts +1 -2
- package/src/plugin/type-converters.ts +12 -8
- package/src/plugin/types-impl.ts +53 -0
- package/src/plugin/webviews.ts +1 -2
package/src/plugin/comments.ts
CHANGED
|
@@ -18,7 +18,7 @@ import * as theia from '@theia/plugin';
|
|
|
18
18
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
19
19
|
import { CommandRegistryImpl } from './command-registry';
|
|
20
20
|
import { UriComponents } from '../common/uri-components';
|
|
21
|
-
import { URI } from './types-impl';
|
|
21
|
+
import { CommentThreadCollapsibleState, URI } from './types-impl';
|
|
22
22
|
import {
|
|
23
23
|
Range,
|
|
24
24
|
Comment,
|
|
@@ -29,7 +29,6 @@ import { DocumentsExtImpl } from './documents';
|
|
|
29
29
|
import { Emitter } from '@theia/core/lib/common/event';
|
|
30
30
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
31
31
|
import { fromMarkdown, fromRange, toRange } from './type-converters';
|
|
32
|
-
import { CommentThreadCollapsibleState } from './types-impl';
|
|
33
32
|
import {
|
|
34
33
|
CommentsCommandArg, CommentsContextCommandArg, CommentsEditCommandArg,
|
|
35
34
|
CommentsExt,
|
|
@@ -19,17 +19,15 @@
|
|
|
19
19
|
*--------------------------------------------------------------------------------------------*/
|
|
20
20
|
// copied and modified from https://github.com/microsoft/vscode/blob/53eac52308c4611000a171cc7bf1214293473c78/src/vs/workbench/api/common/extHostCustomEditors.ts
|
|
21
21
|
|
|
22
|
-
import { CustomEditorsExt, CustomEditorsMain, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
|
|
22
|
+
import { CustomEditorsExt, CustomEditorsMain, Plugin, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
|
|
23
23
|
import * as theia from '@theia/plugin';
|
|
24
24
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
25
|
-
import {
|
|
26
|
-
import { URI } from './types-impl';
|
|
25
|
+
import { Disposable, URI } from './types-impl';
|
|
27
26
|
import { UriComponents } from '../common/uri-components';
|
|
28
27
|
import { DocumentsExtImpl } from './documents';
|
|
29
28
|
import { WebviewImpl, WebviewsExtImpl } from './webviews';
|
|
30
29
|
import { CancellationToken, CancellationTokenSource } from '@theia/core/lib/common/cancellation';
|
|
31
30
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
32
|
-
import { Disposable } from './types-impl';
|
|
33
31
|
import { WorkspaceExtImpl } from './workspace';
|
|
34
32
|
import * as Converters from './type-converters';
|
|
35
33
|
|
|
@@ -24,8 +24,7 @@ import {
|
|
|
24
24
|
PLUGIN_RPC_CONTEXT, PluginInfo
|
|
25
25
|
} from '../common/plugin-api-rpc';
|
|
26
26
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
27
|
-
import { URI } from './types-impl';
|
|
28
|
-
import { Disposable, FileDecoration } from './types-impl';
|
|
27
|
+
import { Disposable, FileDecoration, URI } from './types-impl';
|
|
29
28
|
import { CancellationToken } from '@theia/core/lib/common';
|
|
30
29
|
import { dirname } from 'path';
|
|
31
30
|
|
|
@@ -17,9 +17,8 @@
|
|
|
17
17
|
import * as theia from '@theia/plugin';
|
|
18
18
|
import { ModelChangedEvent, DocumentsMain } from '../common/plugin-api-rpc';
|
|
19
19
|
import { Range as ARange } from '../common/plugin-api-rpc-model';
|
|
20
|
-
import { URI } from './types-impl';
|
|
20
|
+
import { EndOfLine, Position, Range, URI } from './types-impl';
|
|
21
21
|
import { ok } from '../common/assert';
|
|
22
|
-
import { Range, Position, EndOfLine } from './types-impl';
|
|
23
22
|
import { PrefixSumComputer } from './prefix-sum-computer';
|
|
24
23
|
import { getWordAtText, ensureValidWordDefinition } from './word-helper';
|
|
25
24
|
|
package/src/plugin/documents.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* based on https://github.com/Microsoft/vscode/blob/bf9a27ec01f2ef82fc45f69e0c946c7d74a57d3e/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts
|
|
22
22
|
*/
|
|
23
23
|
import { DocumentsExt, ModelChangedEvent, PLUGIN_RPC_CONTEXT, DocumentsMain, SingleEditOperation } from '../common/plugin-api-rpc';
|
|
24
|
-
import { URI } from './types-impl';
|
|
24
|
+
import { TextEdit, URI } from './types-impl';
|
|
25
25
|
import { UriComponents } from '../common/uri-components';
|
|
26
26
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
27
27
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
|
@@ -31,7 +31,6 @@ import { EditorsAndDocumentsExtImpl } from './editors-and-documents';
|
|
|
31
31
|
import * as Converter from './type-converters';
|
|
32
32
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
33
33
|
import { Range, TextDocumentShowOptions } from '../common/plugin-api-rpc-model';
|
|
34
|
-
import { TextEdit } from './types-impl';
|
|
35
34
|
|
|
36
35
|
export class DocumentsExtImpl implements DocumentsExt {
|
|
37
36
|
private toDispose = new DisposableCollection();
|
|
@@ -31,11 +31,10 @@
|
|
|
31
31
|
import { Emitter, WaitUntilEvent, AsyncEmitter } from '@theia/core/lib/common/event';
|
|
32
32
|
import { IRelativePattern, parse } from '@theia/callhierarchy/lib/common/glob';
|
|
33
33
|
import { UriComponents } from '@theia/core/shared/vscode-uri';
|
|
34
|
-
import { URI } from './types-impl';
|
|
34
|
+
import { Disposable, URI, WorkspaceEdit } from './types-impl';
|
|
35
35
|
import { EditorsAndDocumentsExtImpl as ExtHostDocumentsAndEditors } from './editors-and-documents';
|
|
36
36
|
import type * as vscode from '@theia/plugin';
|
|
37
37
|
import * as typeConverter from './type-converters';
|
|
38
|
-
import { Disposable, WorkspaceEdit } from './types-impl';
|
|
39
38
|
import { FileOperation } from '@theia/filesystem/lib/common/files';
|
|
40
39
|
import { flatten } from '../common/arrays';
|
|
41
40
|
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
|
@@ -29,12 +29,11 @@
|
|
|
29
29
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
30
30
|
|
|
31
31
|
import { UriComponents } from '@theia/core/shared/vscode-uri';
|
|
32
|
-
import { URI } from './types-impl';
|
|
32
|
+
import { FileChangeType, FileSystemError, URI } from './types-impl';
|
|
33
33
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
34
34
|
import { PLUGIN_RPC_CONTEXT, FileSystemExt, FileSystemMain, IFileChangeDto } from '../common/plugin-api-rpc';
|
|
35
35
|
import * as vscode from '@theia/plugin';
|
|
36
36
|
import * as files from '@theia/filesystem/lib/common/files';
|
|
37
|
-
import { FileChangeType, FileSystemError } from './types-impl';
|
|
38
37
|
import * as typeConverter from './type-converters';
|
|
39
38
|
import { LanguagesExtImpl } from './languages';
|
|
40
39
|
import { Schemes as Schemas } from '../common/uri-components';
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import * as assert from 'assert';
|
|
18
18
|
import { KnownCommands } from './known-commands';
|
|
19
|
-
import { URI } from './types-impl';
|
|
20
|
-
import { Position } from './types-impl';
|
|
19
|
+
import { Position, URI } from './types-impl';
|
|
21
20
|
import { fromPosition } from './type-converters';
|
|
22
21
|
|
|
23
22
|
describe('Known Command Conversions', () => {
|
|
@@ -29,7 +29,9 @@ export class CallHierarchyAdapter {
|
|
|
29
29
|
private readonly documents: DocumentsExtImpl
|
|
30
30
|
) { }
|
|
31
31
|
|
|
32
|
-
async provideRootDefinition(
|
|
32
|
+
async provideRootDefinition(
|
|
33
|
+
resource: URI, position: rpc.Position, token: theia.CancellationToken
|
|
34
|
+
): Promise<model.CallHierarchyDefinition | model.CallHierarchyDefinition[] | undefined> {
|
|
33
35
|
const documentData = this.documents.getDocumentData(resource);
|
|
34
36
|
if (!documentData) {
|
|
35
37
|
return Promise.reject(new Error(`There is no document for ${resource}`));
|
|
@@ -40,12 +42,14 @@ export class CallHierarchyAdapter {
|
|
|
40
42
|
position.lineNumber,
|
|
41
43
|
position.column
|
|
42
44
|
),
|
|
43
|
-
token
|
|
45
|
+
token
|
|
46
|
+
);
|
|
47
|
+
|
|
44
48
|
if (!definition) {
|
|
45
49
|
return undefined;
|
|
46
50
|
}
|
|
47
51
|
|
|
48
|
-
return this.fromCallHierarchyItem(definition);
|
|
52
|
+
return Array.isArray(definition) ? definition.map(item => this.fromCallHierarchyItem(item)) : this.fromCallHierarchyItem(definition);
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
async provideCallers(definition: model.CallHierarchyDefinition, token: theia.CancellationToken): Promise<model.CallHierarchyReference[] | undefined> {
|
|
@@ -73,7 +77,8 @@ export class CallHierarchyAdapter {
|
|
|
73
77
|
selectionRange: this.fromRange(item.selectionRange),
|
|
74
78
|
name: item.name,
|
|
75
79
|
kind: item.kind,
|
|
76
|
-
tags: item.tags
|
|
80
|
+
tags: item.tags,
|
|
81
|
+
data: item.data,
|
|
77
82
|
};
|
|
78
83
|
}
|
|
79
84
|
|
|
@@ -96,7 +101,7 @@ export class CallHierarchyAdapter {
|
|
|
96
101
|
}
|
|
97
102
|
|
|
98
103
|
private toCallHierarchyItem(definition: model.CallHierarchyDefinition): theia.CallHierarchyItem {
|
|
99
|
-
|
|
104
|
+
const item = new types.CallHierarchyItem(
|
|
100
105
|
Converter.SymbolKind.toSymbolKind(definition.kind),
|
|
101
106
|
definition.name,
|
|
102
107
|
definition.detail ? definition.detail : '',
|
|
@@ -104,6 +109,9 @@ export class CallHierarchyAdapter {
|
|
|
104
109
|
this.toRange(definition.range),
|
|
105
110
|
this.toRange(definition.selectionRange),
|
|
106
111
|
);
|
|
112
|
+
item.tags = definition.tags;
|
|
113
|
+
item.data = definition.data;
|
|
114
|
+
return item;
|
|
107
115
|
}
|
|
108
116
|
|
|
109
117
|
private fromCallHierarchyIncomingCall(caller: theia.CallHierarchyIncomingCall): model.CallHierarchyReference {
|
|
@@ -19,8 +19,7 @@ import * as theia from '@theia/plugin';
|
|
|
19
19
|
import * as Converter from '../type-converters';
|
|
20
20
|
import * as model from '../../common/plugin-api-rpc-model';
|
|
21
21
|
import { DocumentsExtImpl } from '../documents';
|
|
22
|
-
import { WorkspaceEditDto } from '../../common/plugin-api-rpc';
|
|
23
|
-
import { Position } from '../../common/plugin-api-rpc';
|
|
22
|
+
import { Position, WorkspaceEditDto } from '../../common/plugin-api-rpc';
|
|
24
23
|
import { Range } from '../types-impl';
|
|
25
24
|
import { isObject } from '../../common/types';
|
|
26
25
|
|
package/src/plugin/languages.ts
CHANGED
|
@@ -583,7 +583,9 @@ export class LanguagesExtImpl implements LanguagesExt {
|
|
|
583
583
|
return this.createDisposable(callId);
|
|
584
584
|
}
|
|
585
585
|
|
|
586
|
-
$provideRootDefinition(
|
|
586
|
+
$provideRootDefinition(
|
|
587
|
+
handle: number, resource: UriComponents, location: Position, token: theia.CancellationToken
|
|
588
|
+
): Promise<CallHierarchyDefinition | CallHierarchyDefinition[] | undefined> {
|
|
587
589
|
return this.withAdapter(handle, CallHierarchyAdapter, adapter => adapter.provideRootDefinition(URI.revive(resource), location, token), undefined);
|
|
588
590
|
}
|
|
589
591
|
|
|
@@ -50,14 +50,17 @@ export class MessageRegistryExt {
|
|
|
50
50
|
} else {
|
|
51
51
|
if ('modal' in optionsOrFirstItem) {
|
|
52
52
|
options.modal = optionsOrFirstItem.modal;
|
|
53
|
+
if ('detail' in optionsOrFirstItem) {
|
|
54
|
+
options.detail = optionsOrFirstItem.detail;
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
57
|
}
|
|
58
|
+
for (const item of rest) {
|
|
59
|
+
pushItem(item);
|
|
60
|
+
}
|
|
61
|
+
const actionHandle = await this.proxy.$showMessage(type, message, options, actions);
|
|
62
|
+
return actionHandle !== undefined ? items[actionHandle] : undefined;
|
|
55
63
|
}
|
|
56
|
-
for (const item of rest) {
|
|
57
|
-
pushItem(item);
|
|
58
|
-
}
|
|
59
|
-
const actionHandle = await this.proxy.$showMessage(type, message, options, actions);
|
|
60
|
-
return actionHandle !== undefined ? items[actionHandle] : undefined;
|
|
61
|
-
}
|
|
62
64
|
|
|
65
|
+
}
|
|
63
66
|
}
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Emitter } from '@theia/core/lib/common/event';
|
|
17
17
|
import { Path } from '@theia/core/lib/common/path';
|
|
18
|
-
import { CommunicationProvider } from '@theia/debug/lib/common/debug-model';
|
|
19
18
|
import * as theia from '@theia/plugin';
|
|
20
19
|
import { URI } from '@theia/core/shared/vscode-uri';
|
|
21
20
|
import { Breakpoint } from '../../../common/plugin-api-rpc-model';
|
|
@@ -25,12 +24,16 @@ import { RPCProtocol } from '../../../common/rpc-protocol';
|
|
|
25
24
|
import { PluginWebSocketChannel } from '../../../common/connection';
|
|
26
25
|
import { CommandRegistryImpl } from '../../command-registry';
|
|
27
26
|
import { ConnectionExtImpl } from '../../connection-ext';
|
|
28
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
Disposable, Breakpoint as BreakpointExt, SourceBreakpoint, FunctionBreakpoint, Location, Range,
|
|
29
|
+
DebugAdapterServer, DebugAdapterExecutable, DebugAdapterNamedPipeServer, DebugAdapterInlineImplementation
|
|
30
|
+
} from '../../types-impl';
|
|
29
31
|
import { resolveDebugAdapterExecutable } from './plugin-debug-adapter-executable-resolver';
|
|
30
32
|
import { PluginDebugAdapterSession } from './plugin-debug-adapter-session';
|
|
31
|
-
import {
|
|
33
|
+
import { connectInlineDebugAdapter, connectPipeDebugAdapter, connectSocketDebugAdapter, startDebugAdapter } from './plugin-debug-adapter-starter';
|
|
32
34
|
import { PluginDebugAdapterTracker } from './plugin-debug-adapter-tracker';
|
|
33
35
|
import uuid = require('uuid');
|
|
36
|
+
import { CommunicationProvider } from '@theia/debug/lib/node/debug-model';
|
|
34
37
|
|
|
35
38
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
36
39
|
|
|
@@ -423,16 +426,20 @@ export class DebugExtImpl implements DebugExt {
|
|
|
423
426
|
// @param executable The debug adapter's executable information as specified in the package.json (or undefined if no such information exists).
|
|
424
427
|
const descriptor = await descriptorFactory.createDebugAdapterDescriptor(session, executable);
|
|
425
428
|
if (descriptor) {
|
|
426
|
-
if (
|
|
427
|
-
return
|
|
428
|
-
} else {
|
|
429
|
+
if (DebugAdapterServer.is(descriptor)) {
|
|
430
|
+
return connectSocketDebugAdapter(descriptor);
|
|
431
|
+
} else if (DebugAdapterExecutable.is(descriptor)) {
|
|
429
432
|
return startDebugAdapter(descriptor);
|
|
433
|
+
} else if (DebugAdapterNamedPipeServer.is(descriptor)) {
|
|
434
|
+
return connectPipeDebugAdapter(descriptor);
|
|
435
|
+
} else if (DebugAdapterInlineImplementation.is(descriptor)) {
|
|
436
|
+
return connectInlineDebugAdapter(descriptor);
|
|
430
437
|
}
|
|
431
438
|
}
|
|
432
439
|
}
|
|
433
440
|
|
|
434
441
|
if ('debugServer' in debugConfiguration) {
|
|
435
|
-
return
|
|
442
|
+
return connectSocketDebugAdapter({ port: debugConfiguration.debugServer });
|
|
436
443
|
} else {
|
|
437
444
|
if (!executable) {
|
|
438
445
|
throw new Error('It is not possible to provide debug adapter executable.');
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import { CommunicationProvider } from '@theia/debug/lib/common/debug-model';
|
|
18
17
|
import { DebugAdapterSessionImpl } from '@theia/debug/lib/node/debug-adapter-session';
|
|
19
18
|
import * as theia from '@theia/plugin';
|
|
20
19
|
import { IWebSocket } from '@theia/core/shared/vscode-ws-jsonrpc';
|
|
20
|
+
import { CommunicationProvider, DebugAdapterSession } from '@theia/debug/lib/node/debug-model';
|
|
21
21
|
|
|
22
22
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Server debug adapter session.
|
|
26
26
|
*/
|
|
27
|
-
export class PluginDebugAdapterSession extends DebugAdapterSessionImpl implements theia.DebugSession {
|
|
27
|
+
export class PluginDebugAdapterSession extends DebugAdapterSessionImpl implements theia.DebugSession, DebugAdapterSession {
|
|
28
28
|
readonly type: string;
|
|
29
29
|
readonly name: string;
|
|
30
30
|
readonly configuration: theia.DebugConfiguration;
|
|
31
31
|
|
|
32
32
|
constructor(
|
|
33
|
-
|
|
33
|
+
readonly communicationProvider: CommunicationProvider,
|
|
34
34
|
protected readonly tracker: theia.DebugAdapterTracker,
|
|
35
35
|
protected readonly theiaSession: theia.DebugSession) {
|
|
36
36
|
|
|
@@ -15,15 +15,18 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
17
|
import * as net from 'net';
|
|
18
|
-
import * as theia from '@theia/plugin';
|
|
19
|
-
import { CommunicationProvider } from '@theia/debug/lib/common/debug-model';
|
|
20
18
|
import { ChildProcess, spawn, fork, ForkOptions } from 'child_process';
|
|
19
|
+
import { CommunicationProvider } from '@theia/debug/lib/node/debug-model';
|
|
20
|
+
import { StreamCommunicationProvider } from '@theia/debug/lib/node/stream-communication-provider';
|
|
21
|
+
import { Disposable } from '@theia/core/lib/common/disposable';
|
|
22
|
+
import { DebugAdapterExecutable, DebugAdapterInlineImplementation, DebugAdapterNamedPipeServer, DebugAdapterServer } from '../../types-impl';
|
|
23
|
+
import { InlineCommunicationProvider } from '@theia/debug/lib/node/inline-communication-provider';
|
|
21
24
|
const isElectron = require('is-electron');
|
|
22
25
|
|
|
23
26
|
/**
|
|
24
27
|
* Starts debug adapter process.
|
|
25
28
|
*/
|
|
26
|
-
export function startDebugAdapter(executable:
|
|
29
|
+
export function startDebugAdapter(executable: DebugAdapterExecutable): CommunicationProvider {
|
|
27
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
31
|
const options: any = { stdio: ['pipe', 'pipe', 2] };
|
|
29
32
|
|
|
@@ -63,21 +66,28 @@ export function startDebugAdapter(executable: theia.DebugAdapterExecutable): Com
|
|
|
63
66
|
childProcess = spawn(command, args, options);
|
|
64
67
|
}
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
dispose: () => childProcess.kill()
|
|
70
|
-
};
|
|
69
|
+
const provider = new StreamCommunicationProvider(childProcess.stdout!, childProcess.stdin!);
|
|
70
|
+
provider.push(Disposable.create(() => childProcess.kill()));
|
|
71
|
+
return provider;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
/**
|
|
74
75
|
* Connects to a remote debug server.
|
|
75
76
|
*/
|
|
76
|
-
export function
|
|
77
|
+
export function connectSocketDebugAdapter(server: DebugAdapterServer): CommunicationProvider {
|
|
77
78
|
const socket = net.createConnection(server.port, server.host);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
const provider = new StreamCommunicationProvider(socket, socket);
|
|
80
|
+
provider.push(Disposable.create(() => socket.end()));
|
|
81
|
+
return provider;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function connectPipeDebugAdapter(adapter: DebugAdapterNamedPipeServer): CommunicationProvider {
|
|
85
|
+
const socket = net.createConnection(adapter.path);
|
|
86
|
+
const provider = new StreamCommunicationProvider(socket, socket);
|
|
87
|
+
provider.push(Disposable.create(() => socket.end()));
|
|
88
|
+
return provider;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function connectInlineDebugAdapter(adapter: DebugAdapterInlineImplementation): CommunicationProvider {
|
|
92
|
+
return new InlineCommunicationProvider(adapter.implementation);
|
|
83
93
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import type * as theia from '@theia/plugin';
|
|
21
21
|
import { CommandRegistryImpl } from './command-registry';
|
|
22
22
|
import { Emitter } from '@theia/core/lib/common/event';
|
|
23
|
-
import { CancellationTokenSource } from '@theia/core/lib/common/cancellation';
|
|
23
|
+
import { CancellationError, CancellationToken, CancellationTokenSource } from '@theia/core/lib/common/cancellation';
|
|
24
24
|
import { QuickOpenExtImpl } from './quick-open';
|
|
25
25
|
import {
|
|
26
26
|
MAIN_RPC_CONTEXT,
|
|
@@ -106,6 +106,8 @@ import {
|
|
|
106
106
|
Task2,
|
|
107
107
|
DebugAdapterExecutable,
|
|
108
108
|
DebugAdapterServer,
|
|
109
|
+
DebugAdapterNamedPipeServer,
|
|
110
|
+
DebugAdapterInlineImplementation,
|
|
109
111
|
Breakpoint,
|
|
110
112
|
SourceBreakpoint,
|
|
111
113
|
FunctionBreakpoint,
|
|
@@ -151,7 +153,6 @@ import { LanguagesExtImpl } from './languages';
|
|
|
151
153
|
import { fromDocumentSelector, pluginToPluginInfo, fromGlobPattern } from './type-converters';
|
|
152
154
|
import { DialogsExtImpl } from './dialogs';
|
|
153
155
|
import { NotificationExtImpl } from './notification';
|
|
154
|
-
import { CancellationToken, CancellationError } from '@theia/core/lib/common/cancellation';
|
|
155
156
|
import { score } from '@theia/callhierarchy/lib/common/language-selector';
|
|
156
157
|
import { MarkdownString } from './markdown-string';
|
|
157
158
|
import { TreeViewsExtImpl } from './tree/tree-views';
|
|
@@ -159,9 +160,8 @@ import { ConnectionExtImpl } from './connection-ext';
|
|
|
159
160
|
import { TasksExtImpl } from './tasks/tasks';
|
|
160
161
|
import { DebugExtImpl } from './node/debug/debug';
|
|
161
162
|
import { FileSystemExtImpl } from './file-system-ext-impl';
|
|
162
|
-
import { QuickPick, QuickPickItem, ResourceLabelFormatter } from '@theia/plugin';
|
|
163
|
+
import { QuickPick, QuickPickItem, ResourceLabelFormatter, LineChange } from '@theia/plugin';
|
|
163
164
|
import { ScmExtImpl } from './scm';
|
|
164
|
-
import { LineChange } from '@theia/plugin';
|
|
165
165
|
import { DecorationsExtImpl } from './decorations';
|
|
166
166
|
import { TextEditorExt } from './text-editor';
|
|
167
167
|
import { ClipboardExt } from './clipboard-ext';
|
|
@@ -930,6 +930,8 @@ export function createAPIFactory(
|
|
|
930
930
|
Task2,
|
|
931
931
|
DebugAdapterExecutable,
|
|
932
932
|
DebugAdapterServer,
|
|
933
|
+
DebugAdapterNamedPipeServer,
|
|
934
|
+
DebugAdapterInlineImplementation,
|
|
933
935
|
DebugConfigurationProviderTriggerKind,
|
|
934
936
|
Breakpoint,
|
|
935
937
|
SourceBreakpoint,
|
|
@@ -16,10 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
import * as theia from '@theia/plugin';
|
|
18
18
|
import { Event, Emitter } from '@theia/core/lib/common/event';
|
|
19
|
-
import { StorageMain, StorageExt } from '../common/plugin-api-rpc';
|
|
19
|
+
import { PLUGIN_RPC_CONTEXT, StorageMain, StorageExt } from '../common/plugin-api-rpc';
|
|
20
20
|
import { KeysToAnyValues, KeysToKeysToAnyValue } from '../common/types';
|
|
21
21
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
22
|
-
import { PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc';
|
|
23
22
|
|
|
24
23
|
export class Memento implements theia.Memento {
|
|
25
24
|
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
import { PreferenceRegistryExtImpl } from './preference-registry';
|
|
18
18
|
import * as chai from 'chai';
|
|
19
19
|
import { WorkspaceExtImpl } from '../plugin/workspace';
|
|
20
|
-
import { RPCProtocol } from '../common/rpc-protocol';
|
|
21
|
-
import { ProxyIdentifier } from '../common/rpc-protocol';
|
|
20
|
+
import { ProxyIdentifier, RPCProtocol } from '../common/rpc-protocol';
|
|
22
21
|
|
|
23
22
|
const expect = chai.expect;
|
|
24
23
|
|
package/src/plugin/quick-open.ts
CHANGED
|
@@ -259,7 +259,7 @@ export class QuickInputExt implements QuickInput {
|
|
|
259
259
|
private onDidHideEmitter: Emitter<void>;
|
|
260
260
|
private onDidTriggerButtonEmitter: Emitter<theia.QuickInputButton>;
|
|
261
261
|
private _updateTimeout: any;
|
|
262
|
-
private _pendingUpdate: TransferQuickInput
|
|
262
|
+
private _pendingUpdate: TransferQuickInput = { id: this._id };
|
|
263
263
|
|
|
264
264
|
constructor(readonly quickOpen: QuickOpenExtImpl, readonly quickOpenMain: QuickOpenMain, readonly plugin: Plugin, private _onDidDispose: () => void) {
|
|
265
265
|
this.title = undefined;
|
|
@@ -613,9 +613,16 @@ export class QuickPickExt<T extends theia.QuickPickItem> extends QuickInputExt i
|
|
|
613
613
|
this._handlesToItems.set(i, item);
|
|
614
614
|
this._itemsToHandles.set(item, i);
|
|
615
615
|
});
|
|
616
|
-
items.forEach((item, i) => Object.assign(item, { handle: i }));
|
|
617
616
|
this.update({
|
|
618
|
-
items
|
|
617
|
+
items: items.map((item, i) => ({
|
|
618
|
+
type: item.type,
|
|
619
|
+
label: item.label,
|
|
620
|
+
description: item.description,
|
|
621
|
+
handle: i,
|
|
622
|
+
detail: item.detail,
|
|
623
|
+
picked: item.picked,
|
|
624
|
+
alwaysShow: item.alwaysShow
|
|
625
|
+
}))
|
|
619
626
|
});
|
|
620
627
|
}
|
|
621
628
|
|
package/src/plugin/timeline.ts
CHANGED
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Plugin, TimelineCommandArg, TimelineExt, TimelineMain } from '../common';
|
|
16
|
+
import { Plugin, PLUGIN_RPC_CONTEXT, TimelineCommandArg, TimelineExt, TimelineMain } from '../common';
|
|
17
17
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
18
18
|
import { Disposable, URI } from './types-impl';
|
|
19
|
-
import { PLUGIN_RPC_CONTEXT } from '../common';
|
|
20
19
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
21
20
|
import { CommandRegistryImpl } from './command-registry';
|
|
22
21
|
import type {
|
|
@@ -26,7 +26,6 @@ import { LanguageFilter, LanguageSelector, RelativePattern } from '@theia/callhi
|
|
|
26
26
|
import { isMarkdownString, MarkdownString } from './markdown-string';
|
|
27
27
|
import * as types from './types-impl';
|
|
28
28
|
import { UriComponents } from '../common/uri-components';
|
|
29
|
-
import { TaskGroup } from './types-impl';
|
|
30
29
|
import { isReadonlyArray } from '../common/arrays';
|
|
31
30
|
|
|
32
31
|
const SIDE_GROUP = -2;
|
|
@@ -684,18 +683,23 @@ export function fromCallHierarchyItem(item: theia.CallHierarchyItem): model.Call
|
|
|
684
683
|
uri: item.uri,
|
|
685
684
|
range: fromRange(item.range),
|
|
686
685
|
selectionRange: fromRange(item.selectionRange),
|
|
687
|
-
tags: item.tags
|
|
686
|
+
tags: item.tags,
|
|
687
|
+
data: item.data,
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
export function toCallHierarchyItem(value: model.CallHierarchyItem): types.CallHierarchyItem {
|
|
692
|
-
|
|
692
|
+
const item = new types.CallHierarchyItem(
|
|
693
693
|
SymbolKind.toSymbolKind(value.kind),
|
|
694
694
|
value.name,
|
|
695
695
|
value.detail ? value.detail : '',
|
|
696
696
|
URI.revive(value.uri),
|
|
697
697
|
toRange(value.range),
|
|
698
|
-
toRange(value.selectionRange)
|
|
698
|
+
toRange(value.selectionRange),
|
|
699
|
+
);
|
|
700
|
+
item.tags = value.tags;
|
|
701
|
+
item.data = value.data;
|
|
702
|
+
return item;
|
|
699
703
|
}
|
|
700
704
|
|
|
701
705
|
export function toCallHierarchyIncomingCall(value: model.CallHierarchyIncomingCall): types.CallHierarchyIncomingCall {
|
|
@@ -744,9 +748,9 @@ export function fromTask(task: theia.Task): TaskDto | undefined {
|
|
|
744
748
|
}
|
|
745
749
|
|
|
746
750
|
const group = task.group;
|
|
747
|
-
if (group === TaskGroup.Build) {
|
|
751
|
+
if (group === types.TaskGroup.Build) {
|
|
748
752
|
taskDto.group = BUILD_GROUP;
|
|
749
|
-
} else if (group === TaskGroup.Test) {
|
|
753
|
+
} else if (group === types.TaskGroup.Test) {
|
|
750
754
|
taskDto.group = TEST_GROUP;
|
|
751
755
|
}
|
|
752
756
|
|
|
@@ -833,9 +837,9 @@ export function toTask(taskDto: TaskDto): theia.Task {
|
|
|
833
837
|
|
|
834
838
|
if (group) {
|
|
835
839
|
if (group === BUILD_GROUP) {
|
|
836
|
-
result.group = TaskGroup.Build;
|
|
840
|
+
result.group = types.TaskGroup.Build;
|
|
837
841
|
} else if (group === TEST_GROUP) {
|
|
838
|
-
result.group = TaskGroup.Test;
|
|
842
|
+
result.group = types.TaskGroup.Test;
|
|
839
843
|
}
|
|
840
844
|
}
|
|
841
845
|
|
package/src/plugin/types-impl.ts
CHANGED
|
@@ -2120,6 +2120,12 @@ export class DebugAdapterExecutable {
|
|
|
2120
2120
|
}
|
|
2121
2121
|
}
|
|
2122
2122
|
|
|
2123
|
+
export namespace DebugAdapterExecutable {
|
|
2124
|
+
export function is(adapter: theia.DebugAdapterDescriptor | undefined): adapter is theia.DebugAdapterExecutable {
|
|
2125
|
+
return !!adapter && 'command' in adapter;
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2123
2129
|
/**
|
|
2124
2130
|
* Represents a debug adapter running as a socket based server.
|
|
2125
2131
|
*/
|
|
@@ -2145,6 +2151,52 @@ export class DebugAdapterServer {
|
|
|
2145
2151
|
}
|
|
2146
2152
|
}
|
|
2147
2153
|
|
|
2154
|
+
export namespace DebugAdapterServer {
|
|
2155
|
+
export function is(adapter: theia.DebugAdapterDescriptor | undefined): adapter is DebugAdapterServer {
|
|
2156
|
+
return !!adapter && 'port' in adapter;
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
/**
|
|
2161
|
+
* Represents a debug adapter running as a Named Pipe (on Windows)/UNIX Domain Socket (on non-Windows) based server.
|
|
2162
|
+
*/
|
|
2163
|
+
@es5ClassCompat
|
|
2164
|
+
export class DebugAdapterNamedPipeServer {
|
|
2165
|
+
/**
|
|
2166
|
+
* Create a description for a debug adapter running as a Named Pipe (on Windows)/UNIX Domain Socket (on non-Windows) based server.
|
|
2167
|
+
*/
|
|
2168
|
+
constructor(readonly path: string) { }
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
export namespace DebugAdapterNamedPipeServer {
|
|
2172
|
+
export function is(adapter: theia.DebugAdapterDescriptor | undefined): adapter is DebugAdapterNamedPipeServer {
|
|
2173
|
+
return !!adapter && 'path' in adapter;
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* A debug adapter descriptor for an inline implementation.
|
|
2179
|
+
*/
|
|
2180
|
+
@es5ClassCompat
|
|
2181
|
+
export class DebugAdapterInlineImplementation {
|
|
2182
|
+
implementation: theia.DebugAdapter;
|
|
2183
|
+
|
|
2184
|
+
/**
|
|
2185
|
+
* Create a descriptor for an inline implementation of a debug adapter.
|
|
2186
|
+
*/
|
|
2187
|
+
constructor(impl: theia.DebugAdapter) {
|
|
2188
|
+
this.implementation = impl;
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
export namespace DebugAdapterInlineImplementation {
|
|
2193
|
+
export function is(adapter: theia.DebugAdapterDescriptor | undefined): adapter is DebugAdapterInlineImplementation {
|
|
2194
|
+
return !!adapter && 'implementation' in adapter;
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
export type DebugAdapterDescriptor = DebugAdapterExecutable | DebugAdapterServer | DebugAdapterNamedPipeServer | DebugAdapterInlineImplementation;
|
|
2199
|
+
|
|
2148
2200
|
export enum LogLevel {
|
|
2149
2201
|
Trace = 1,
|
|
2150
2202
|
Debug = 2,
|
|
@@ -2367,6 +2419,7 @@ export class CallHierarchyItem {
|
|
|
2367
2419
|
range: Range;
|
|
2368
2420
|
selectionRange: Range;
|
|
2369
2421
|
tags?: readonly SymbolTag[];
|
|
2422
|
+
data?: unknown;
|
|
2370
2423
|
|
|
2371
2424
|
constructor(kind: SymbolKind, name: string, detail: string, uri: URI, range: Range, selectionRange: Range) {
|
|
2372
2425
|
this.kind = kind;
|
package/src/plugin/webviews.ts
CHANGED
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
17
|
import { v4 } from 'uuid';
|
|
18
|
-
import { WebviewsExt, WebviewPanelViewState, WebviewsMain, PLUGIN_RPC_CONTEXT, WebviewInitData, /* WebviewsMain, PLUGIN_RPC_CONTEXT */ } from '../common/plugin-api-rpc';
|
|
18
|
+
import { Plugin, WebviewsExt, WebviewPanelViewState, WebviewsMain, PLUGIN_RPC_CONTEXT, WebviewInitData, /* WebviewsMain, PLUGIN_RPC_CONTEXT */ } from '../common/plugin-api-rpc';
|
|
19
19
|
import * as theia from '@theia/plugin';
|
|
20
20
|
import { RPCProtocol } from '../common/rpc-protocol';
|
|
21
|
-
import { Plugin } from '../common/plugin-api-rpc';
|
|
22
21
|
import { Emitter, Event } from '@theia/core/lib/common/event';
|
|
23
22
|
import { fromViewColumn, toViewColumn, toWebviewPanelShowOptions } from './type-converters';
|
|
24
23
|
import { Disposable, WebviewPanelTargetArea, URI } from './types-impl';
|