@theia/plugin-ext 1.25.0-next.7 → 1.25.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 +3 -15
- 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 +15 -22
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js +2 -0
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/uri-components.d.ts +2 -9
- package/lib/common/uri-components.d.ts.map +1 -1
- package/lib/common/uri-components.js +1 -7
- package/lib/common/uri-components.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.js +17 -2
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts +9 -9
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.d.ts.map +1 -1
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js +70 -89
- package/lib/main/browser/callhierarchy/callhierarchy-type-converters.js.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.js +8 -2
- package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
- package/lib/main/browser/comments/comments-main.d.ts +5 -0
- package/lib/main/browser/comments/comments-main.d.ts.map +1 -1
- package/lib/main/browser/comments/comments-main.js +14 -0
- package/lib/main/browser/comments/comments-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-adapter-contribution.d.ts +0 -12
- package/lib/main/browser/debug/plugin-debug-adapter-contribution.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-adapter-contribution.js +0 -18
- package/lib/main/browser/debug/plugin-debug-adapter-contribution.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-configuration-provider.d.ts +2 -2
- package/lib/main/browser/debug/plugin-debug-configuration-provider.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-configuration-provider.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts +3 -2
- package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.js +28 -29
- package/lib/main/browser/debug/plugin-debug-service.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/languages-main.js +7 -1
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/main-context.d.ts.map +1 -1
- package/lib/main/browser/main-context.js +3 -0
- package/lib/main/browser/main-context.js.map +1 -1
- package/lib/main/browser/notification-main.d.ts +2 -1
- package/lib/main/browser/notification-main.d.ts.map +1 -1
- package/lib/main/browser/notification-main.js +12 -4
- package/lib/main/browser/notification-main.js.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.js +3 -0
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/status-bar-message-registry-main.d.ts +1 -1
- package/lib/main/browser/status-bar-message-registry-main.d.ts.map +1 -1
- package/lib/main/browser/status-bar-message-registry-main.js +4 -1
- package/lib/main/browser/status-bar-message-registry-main.js.map +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.d.ts +33 -0
- package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -0
- package/lib/main/browser/view/tree-view-decorator-service.js +70 -0
- package/lib/main/browser/view/tree-view-decorator-service.js.map +1 -0
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +5 -1
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/plugin/comments.d.ts +3 -0
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/comments.js +12 -0
- package/lib/plugin/comments.js.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +8 -7
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.js +39 -31
- package/lib/plugin/languages/call-hierarchy.js.map +1 -1
- package/lib/plugin/languages/lens.js.map +1 -1
- package/lib/plugin/languages.d.ts +5 -4
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/languages.js +3 -0
- package/lib/plugin/languages.js.map +1 -1
- package/lib/plugin/node/debug/debug.d.ts +2 -5
- package/lib/plugin/node/debug/debug.d.ts.map +1 -1
- package/lib/plugin/node/debug/debug.js +1 -60
- package/lib/plugin/node/debug/debug.js.map +1 -1
- package/lib/plugin/notification.d.ts +2 -0
- package/lib/plugin/notification.d.ts.map +1 -1
- package/lib/plugin/notification.js +14 -2
- package/lib/plugin/notification.js.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/quick-open.js +1 -30
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts +10 -2
- package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.js +31 -1
- package/lib/plugin/status-bar/status-bar-item.js.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.js +2 -1
- package/lib/plugin/tree/tree-views.js.map +1 -1
- package/lib/plugin/type-converters.d.ts +1 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +10 -6
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/type-converters.spec.js +16 -1
- package/lib/plugin/type-converters.spec.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +1 -2
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/workspace.d.ts +1 -1
- package/lib/plugin/workspace.d.ts.map +1 -1
- package/package.json +24 -24
- package/src/common/plugin-api-rpc-model.ts +3 -17
- package/src/common/plugin-api-rpc.ts +32 -26
- package/src/common/uri-components.ts +4 -17
- package/src/hosted/node/hosted-plugin-localization-service.ts +23 -2
- package/src/main/browser/callhierarchy/callhierarchy-type-converters.ts +85 -97
- package/src/main/browser/comments/comment-thread-widget.tsx +8 -2
- package/src/main/browser/comments/comments-main.ts +15 -0
- package/src/main/browser/debug/plugin-debug-adapter-contribution.ts +0 -21
- package/src/main/browser/debug/plugin-debug-configuration-provider.ts +8 -2
- package/src/main/browser/debug/plugin-debug-service.ts +53 -31
- package/src/main/browser/languages-main.ts +8 -4
- package/src/main/browser/main-context.ts +4 -0
- package/src/main/browser/notification-main.ts +13 -4
- package/src/main/browser/plugin-ext-frontend-module.ts +3 -0
- package/src/main/browser/status-bar-message-registry-main.ts +5 -0
- package/src/main/browser/view/tree-view-decorator-service.ts +52 -0
- package/src/main/browser/view/tree-view-widget.tsx +4 -1
- package/src/plugin/comments.ts +16 -1
- package/src/plugin/languages/call-hierarchy.ts +44 -50
- package/src/plugin/languages/lens.ts +1 -1
- package/src/plugin/languages.ts +11 -6
- package/src/plugin/node/debug/debug.ts +22 -78
- package/src/plugin/notification.ts +18 -2
- package/src/plugin/quick-open.ts +1 -33
- package/src/plugin/status-bar/status-bar-item.ts +46 -5
- package/src/plugin/tree/tree-views.ts +2 -1
- package/src/plugin/type-converters.spec.ts +20 -1
- package/src/plugin/type-converters.ts +13 -7
- package/src/plugin/types-impl.ts +1 -2
- package/src/plugin/workspace.ts +1 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from '@theia/callhierarchy/lib/browser';
|
|
18
18
|
import * as model from '../../../common/plugin-api-rpc-model';
|
|
19
19
|
import * as rpc from '../../../common/plugin-api-rpc';
|
|
20
20
|
import * as callhierarchy from '@theia/core/shared/vscode-languageserver-protocol';
|
|
@@ -70,136 +70,124 @@ export function toRange(range: model.Range): callhierarchy.Range {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export namespace SymbolKindConverter {
|
|
73
|
-
// tslint:disable-next-line:no-null-keyword
|
|
74
|
-
const fromMapping: { [kind: number]: model.SymbolKind } = Object.create(null);
|
|
75
|
-
fromMapping[callhierarchy.SymbolKind.File] = model.SymbolKind.File;
|
|
76
|
-
fromMapping[callhierarchy.SymbolKind.Module] = model.SymbolKind.Module;
|
|
77
|
-
fromMapping[callhierarchy.SymbolKind.Namespace] = model.SymbolKind.Namespace;
|
|
78
|
-
fromMapping[callhierarchy.SymbolKind.Package] = model.SymbolKind.Package;
|
|
79
|
-
fromMapping[callhierarchy.SymbolKind.Class] = model.SymbolKind.Class;
|
|
80
|
-
fromMapping[callhierarchy.SymbolKind.Method] = model.SymbolKind.Method;
|
|
81
|
-
fromMapping[callhierarchy.SymbolKind.Property] = model.SymbolKind.Property;
|
|
82
|
-
fromMapping[callhierarchy.SymbolKind.Field] = model.SymbolKind.Field;
|
|
83
|
-
fromMapping[callhierarchy.SymbolKind.Constructor] = model.SymbolKind.Constructor;
|
|
84
|
-
fromMapping[callhierarchy.SymbolKind.Enum] = model.SymbolKind.Enum;
|
|
85
|
-
fromMapping[callhierarchy.SymbolKind.Interface] = model.SymbolKind.Interface;
|
|
86
|
-
fromMapping[callhierarchy.SymbolKind.Function] = model.SymbolKind.Function;
|
|
87
|
-
fromMapping[callhierarchy.SymbolKind.Variable] = model.SymbolKind.Variable;
|
|
88
|
-
fromMapping[callhierarchy.SymbolKind.Constant] = model.SymbolKind.Constant;
|
|
89
|
-
fromMapping[callhierarchy.SymbolKind.String] = model.SymbolKind.String;
|
|
90
|
-
fromMapping[callhierarchy.SymbolKind.Number] = model.SymbolKind.Number;
|
|
91
|
-
fromMapping[callhierarchy.SymbolKind.Boolean] = model.SymbolKind.Boolean;
|
|
92
|
-
fromMapping[callhierarchy.SymbolKind.Array] = model.SymbolKind.Array;
|
|
93
|
-
fromMapping[callhierarchy.SymbolKind.Object] = model.SymbolKind.Object;
|
|
94
|
-
fromMapping[callhierarchy.SymbolKind.Key] = model.SymbolKind.Key;
|
|
95
|
-
fromMapping[callhierarchy.SymbolKind.Null] = model.SymbolKind.Null;
|
|
96
|
-
fromMapping[callhierarchy.SymbolKind.EnumMember] = model.SymbolKind.EnumMember;
|
|
97
|
-
fromMapping[callhierarchy.SymbolKind.Struct] = model.SymbolKind.Struct;
|
|
98
|
-
fromMapping[callhierarchy.SymbolKind.Event] = model.SymbolKind.Event;
|
|
99
|
-
fromMapping[callhierarchy.SymbolKind.Operator] = model.SymbolKind.Operator;
|
|
100
|
-
fromMapping[callhierarchy.SymbolKind.TypeParameter] = model.SymbolKind.TypeParameter;
|
|
101
|
-
|
|
102
73
|
export function fromSymbolKind(kind: callhierarchy.SymbolKind): model.SymbolKind {
|
|
103
|
-
|
|
74
|
+
switch (kind) {
|
|
75
|
+
case callhierarchy.SymbolKind.File: return model.SymbolKind.File;
|
|
76
|
+
case callhierarchy.SymbolKind.Module: return model.SymbolKind.Module;
|
|
77
|
+
case callhierarchy.SymbolKind.Namespace: return model.SymbolKind.Namespace;
|
|
78
|
+
case callhierarchy.SymbolKind.Package: return model.SymbolKind.Package;
|
|
79
|
+
case callhierarchy.SymbolKind.Class: return model.SymbolKind.Class;
|
|
80
|
+
case callhierarchy.SymbolKind.Method: return model.SymbolKind.Method;
|
|
81
|
+
case callhierarchy.SymbolKind.Property: return model.SymbolKind.Property;
|
|
82
|
+
case callhierarchy.SymbolKind.Field: return model.SymbolKind.Field;
|
|
83
|
+
case callhierarchy.SymbolKind.Constructor: return model.SymbolKind.Constructor;
|
|
84
|
+
case callhierarchy.SymbolKind.Enum: return model.SymbolKind.Enum;
|
|
85
|
+
case callhierarchy.SymbolKind.Interface: return model.SymbolKind.Interface;
|
|
86
|
+
case callhierarchy.SymbolKind.Function: return model.SymbolKind.Function;
|
|
87
|
+
case callhierarchy.SymbolKind.Variable: return model.SymbolKind.Variable;
|
|
88
|
+
case callhierarchy.SymbolKind.Constant: return model.SymbolKind.Constant;
|
|
89
|
+
case callhierarchy.SymbolKind.String: return model.SymbolKind.String;
|
|
90
|
+
case callhierarchy.SymbolKind.Number: return model.SymbolKind.Number;
|
|
91
|
+
case callhierarchy.SymbolKind.Boolean: return model.SymbolKind.Boolean;
|
|
92
|
+
case callhierarchy.SymbolKind.Array: return model.SymbolKind.Array;
|
|
93
|
+
case callhierarchy.SymbolKind.Object: return model.SymbolKind.Object;
|
|
94
|
+
case callhierarchy.SymbolKind.Key: return model.SymbolKind.Key;
|
|
95
|
+
case callhierarchy.SymbolKind.Null: return model.SymbolKind.Null;
|
|
96
|
+
case callhierarchy.SymbolKind.EnumMember: return model.SymbolKind.EnumMember;
|
|
97
|
+
case callhierarchy.SymbolKind.Struct: return model.SymbolKind.Struct;
|
|
98
|
+
case callhierarchy.SymbolKind.Event: return model.SymbolKind.Event;
|
|
99
|
+
case callhierarchy.SymbolKind.Operator: return model.SymbolKind.Operator;
|
|
100
|
+
case callhierarchy.SymbolKind.TypeParameter: return model.SymbolKind.TypeParameter;
|
|
101
|
+
default: return model.SymbolKind.Property;
|
|
102
|
+
}
|
|
104
103
|
}
|
|
105
|
-
|
|
106
|
-
// tslint:disable-next-line:no-null-keyword
|
|
107
|
-
const toMapping: { [kind: number]: callhierarchy.SymbolKind } = Object.create(null);
|
|
108
|
-
toMapping[model.SymbolKind.File] = callhierarchy.SymbolKind.File;
|
|
109
|
-
toMapping[model.SymbolKind.Module] = callhierarchy.SymbolKind.Module;
|
|
110
|
-
toMapping[model.SymbolKind.Namespace] = callhierarchy.SymbolKind.Namespace;
|
|
111
|
-
toMapping[model.SymbolKind.Package] = callhierarchy.SymbolKind.Package;
|
|
112
|
-
toMapping[model.SymbolKind.Class] = callhierarchy.SymbolKind.Class;
|
|
113
|
-
toMapping[model.SymbolKind.Method] = callhierarchy.SymbolKind.Method;
|
|
114
|
-
toMapping[model.SymbolKind.Property] = callhierarchy.SymbolKind.Property;
|
|
115
|
-
toMapping[model.SymbolKind.Field] = callhierarchy.SymbolKind.Field;
|
|
116
|
-
toMapping[model.SymbolKind.Constructor] = callhierarchy.SymbolKind.Constructor;
|
|
117
|
-
toMapping[model.SymbolKind.Enum] = callhierarchy.SymbolKind.Enum;
|
|
118
|
-
toMapping[model.SymbolKind.Interface] = callhierarchy.SymbolKind.Interface;
|
|
119
|
-
toMapping[model.SymbolKind.Function] = callhierarchy.SymbolKind.Function;
|
|
120
|
-
toMapping[model.SymbolKind.Variable] = callhierarchy.SymbolKind.Variable;
|
|
121
|
-
toMapping[model.SymbolKind.Constant] = callhierarchy.SymbolKind.Constant;
|
|
122
|
-
toMapping[model.SymbolKind.String] = callhierarchy.SymbolKind.String;
|
|
123
|
-
toMapping[model.SymbolKind.Number] = callhierarchy.SymbolKind.Number;
|
|
124
|
-
toMapping[model.SymbolKind.Boolean] = callhierarchy.SymbolKind.Boolean;
|
|
125
|
-
toMapping[model.SymbolKind.Array] = callhierarchy.SymbolKind.Array;
|
|
126
|
-
toMapping[model.SymbolKind.Object] = callhierarchy.SymbolKind.Object;
|
|
127
|
-
toMapping[model.SymbolKind.Key] = callhierarchy.SymbolKind.Key;
|
|
128
|
-
toMapping[model.SymbolKind.Null] = callhierarchy.SymbolKind.Null;
|
|
129
|
-
toMapping[model.SymbolKind.EnumMember] = callhierarchy.SymbolKind.EnumMember;
|
|
130
|
-
toMapping[model.SymbolKind.Struct] = callhierarchy.SymbolKind.Struct;
|
|
131
|
-
toMapping[model.SymbolKind.Event] = callhierarchy.SymbolKind.Event;
|
|
132
|
-
toMapping[model.SymbolKind.Operator] = callhierarchy.SymbolKind.Operator;
|
|
133
|
-
toMapping[model.SymbolKind.TypeParameter] = callhierarchy.SymbolKind.TypeParameter;
|
|
134
|
-
|
|
135
104
|
export function toSymbolKind(kind: model.SymbolKind): callhierarchy.SymbolKind {
|
|
136
|
-
|
|
105
|
+
switch (kind) {
|
|
106
|
+
case model.SymbolKind.File: return callhierarchy.SymbolKind.File;
|
|
107
|
+
case model.SymbolKind.Module: return callhierarchy.SymbolKind.Module;
|
|
108
|
+
case model.SymbolKind.Namespace: return callhierarchy.SymbolKind.Namespace;
|
|
109
|
+
case model.SymbolKind.Package: return callhierarchy.SymbolKind.Package;
|
|
110
|
+
case model.SymbolKind.Class: return callhierarchy.SymbolKind.Class;
|
|
111
|
+
case model.SymbolKind.Method: return callhierarchy.SymbolKind.Method;
|
|
112
|
+
case model.SymbolKind.Property: return callhierarchy.SymbolKind.Property;
|
|
113
|
+
case model.SymbolKind.Field: return callhierarchy.SymbolKind.Field;
|
|
114
|
+
case model.SymbolKind.Constructor: return callhierarchy.SymbolKind.Constructor;
|
|
115
|
+
case model.SymbolKind.Enum: return callhierarchy.SymbolKind.Enum;
|
|
116
|
+
case model.SymbolKind.Interface: return callhierarchy.SymbolKind.Interface;
|
|
117
|
+
case model.SymbolKind.Function: return callhierarchy.SymbolKind.Function;
|
|
118
|
+
case model.SymbolKind.Variable: return callhierarchy.SymbolKind.Variable;
|
|
119
|
+
case model.SymbolKind.Constant: return callhierarchy.SymbolKind.Constant;
|
|
120
|
+
case model.SymbolKind.String: return callhierarchy.SymbolKind.String;
|
|
121
|
+
case model.SymbolKind.Number: return callhierarchy.SymbolKind.Number;
|
|
122
|
+
case model.SymbolKind.Boolean: return callhierarchy.SymbolKind.Boolean;
|
|
123
|
+
case model.SymbolKind.Array: return callhierarchy.SymbolKind.Array;
|
|
124
|
+
case model.SymbolKind.Object: return callhierarchy.SymbolKind.Object;
|
|
125
|
+
case model.SymbolKind.Key: return callhierarchy.SymbolKind.Key;
|
|
126
|
+
case model.SymbolKind.Null: return callhierarchy.SymbolKind.Null;
|
|
127
|
+
case model.SymbolKind.EnumMember: return callhierarchy.SymbolKind.EnumMember;
|
|
128
|
+
case model.SymbolKind.Struct: return callhierarchy.SymbolKind.Struct;
|
|
129
|
+
case model.SymbolKind.Event: return callhierarchy.SymbolKind.Event;
|
|
130
|
+
case model.SymbolKind.Operator: return callhierarchy.SymbolKind.Operator;
|
|
131
|
+
case model.SymbolKind.TypeParameter: return callhierarchy.SymbolKind.TypeParameter;
|
|
132
|
+
default: return callhierarchy.SymbolKind.Property;
|
|
133
|
+
}
|
|
137
134
|
}
|
|
138
135
|
}
|
|
139
136
|
|
|
140
|
-
export function toDefinition(definition: model.
|
|
141
|
-
export function toDefinition(definition: model.
|
|
142
|
-
export function toDefinition(definition: model.
|
|
137
|
+
export function toDefinition(definition: model.CallHierarchyItem): CallHierarchyItem;
|
|
138
|
+
export function toDefinition(definition: model.CallHierarchyItem | undefined): CallHierarchyItem | undefined;
|
|
139
|
+
export function toDefinition(definition: model.CallHierarchyItem | undefined): CallHierarchyItem | undefined {
|
|
143
140
|
if (!definition) {
|
|
144
141
|
return undefined;
|
|
145
142
|
}
|
|
146
143
|
return {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
},
|
|
144
|
+
...definition,
|
|
145
|
+
kind: SymbolKindConverter.toSymbolKind(definition.kind),
|
|
146
|
+
range: toRange(definition.range),
|
|
151
147
|
selectionRange: toRange(definition.selectionRange),
|
|
152
|
-
symbolName: definition.name,
|
|
153
|
-
symbolKind: SymbolKindConverter.toSymbolKind(definition.kind),
|
|
154
|
-
containerName: undefined,
|
|
155
|
-
tags: definition.tags,
|
|
156
|
-
data: definition.data,
|
|
157
148
|
};
|
|
158
149
|
}
|
|
159
150
|
|
|
160
|
-
export function fromDefinition(definition:
|
|
151
|
+
export function fromDefinition(definition: CallHierarchyItem): model.CallHierarchyItem {
|
|
161
152
|
return {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
kind: SymbolKindConverter.fromSymbolKind(definition.symbolKind),
|
|
167
|
-
tags: definition.tags,
|
|
168
|
-
data: definition.data,
|
|
153
|
+
...definition,
|
|
154
|
+
kind: SymbolKindConverter.fromSymbolKind(definition.kind),
|
|
155
|
+
range: fromRange(definition.range),
|
|
156
|
+
selectionRange: fromRange(definition.range),
|
|
169
157
|
};
|
|
170
158
|
}
|
|
171
159
|
|
|
172
|
-
export function toCaller(caller: model.
|
|
160
|
+
export function toCaller(caller: model.CallHierarchyIncomingCall): CallHierarchyIncomingCall {
|
|
173
161
|
return {
|
|
174
|
-
|
|
175
|
-
|
|
162
|
+
from: toDefinition(caller.from),
|
|
163
|
+
fromRanges: caller.fromRanges.map(toRange)
|
|
176
164
|
};
|
|
177
165
|
}
|
|
178
166
|
|
|
179
|
-
export function fromCaller(caller:
|
|
167
|
+
export function fromCaller(caller: CallHierarchyIncomingCall): model.CallHierarchyIncomingCall {
|
|
180
168
|
return {
|
|
181
|
-
|
|
182
|
-
|
|
169
|
+
from: fromDefinition(caller.from),
|
|
170
|
+
fromRanges: caller.fromRanges.map(fromRange)
|
|
183
171
|
};
|
|
184
172
|
}
|
|
185
173
|
|
|
186
|
-
export function toCallee(callee: model.
|
|
174
|
+
export function toCallee(callee: model.CallHierarchyOutgoingCall): CallHierarchyOutgoingCall {
|
|
187
175
|
return {
|
|
188
|
-
|
|
189
|
-
|
|
176
|
+
to: toDefinition(callee.to),
|
|
177
|
+
fromRanges: callee.fromRanges.map(toRange),
|
|
190
178
|
};
|
|
191
179
|
}
|
|
192
180
|
|
|
193
|
-
export function fromCallHierarchyCallerToModelCallHierarchyIncomingCall(caller:
|
|
181
|
+
export function fromCallHierarchyCallerToModelCallHierarchyIncomingCall(caller: CallHierarchyIncomingCall): model.CallHierarchyIncomingCall {
|
|
194
182
|
return {
|
|
195
|
-
from: fromDefinition(caller.
|
|
196
|
-
fromRanges: caller.
|
|
183
|
+
from: fromDefinition(caller.from),
|
|
184
|
+
fromRanges: caller.fromRanges.map(fromRange),
|
|
197
185
|
};
|
|
198
186
|
}
|
|
199
187
|
|
|
200
|
-
export function fromCallHierarchyCalleeToModelCallHierarchyOutgoingCall(callee:
|
|
188
|
+
export function fromCallHierarchyCalleeToModelCallHierarchyOutgoingCall(callee: CallHierarchyOutgoingCall): model.CallHierarchyOutgoingCall {
|
|
201
189
|
return {
|
|
202
|
-
to: fromDefinition(callee.
|
|
203
|
-
fromRanges: callee.
|
|
190
|
+
to: fromDefinition(callee.to),
|
|
191
|
+
fromRanges: callee.fromRanges.map(fromRange),
|
|
204
192
|
};
|
|
205
193
|
}
|
|
@@ -89,6 +89,12 @@ export class CommentThreadWidget extends BaseWidget {
|
|
|
89
89
|
commentForm.update();
|
|
90
90
|
}
|
|
91
91
|
}));
|
|
92
|
+
this.toDispose.push(this._commentThread.onDidChangeCanReply(_canReply => {
|
|
93
|
+
const commentForm = this.commentFormRef.current;
|
|
94
|
+
if (commentForm) {
|
|
95
|
+
commentForm.update();
|
|
96
|
+
}
|
|
97
|
+
}));
|
|
92
98
|
this.contextMenu = this.menus.getMenu(COMMENT_THREAD_CONTEXT);
|
|
93
99
|
this.contextMenu.children.map(node => node instanceof ActionMenuNode && node.action.when).forEach(exp => {
|
|
94
100
|
if (typeof exp === 'string') {
|
|
@@ -381,7 +387,7 @@ export class CommentForm<P extends CommentForm.Props = CommentForm.Props> extend
|
|
|
381
387
|
override render(): React.ReactNode {
|
|
382
388
|
const { commands, commentThread, contextKeyService } = this.props;
|
|
383
389
|
const hasExistingComments = commentThread.comments && commentThread.comments.length > 0;
|
|
384
|
-
return <div className={'comment-form' + (this.state.expanded || commentThread.comments && commentThread.comments.length === 0 ? ' expand' : '')}>
|
|
390
|
+
return commentThread.canReply ? <div className={'comment-form' + (this.state.expanded || commentThread.comments && commentThread.comments.length === 0 ? ' expand' : '')}>
|
|
385
391
|
<div className={'theia-comments-input-message-container'}>
|
|
386
392
|
<textarea className={'theia-comments-input-message theia-input'}
|
|
387
393
|
spellCheck={false}
|
|
@@ -409,7 +415,7 @@ export class CommentForm<P extends CommentForm.Props = CommentForm.Props> extend
|
|
|
409
415
|
clearInput={this.clearInput}
|
|
410
416
|
/>
|
|
411
417
|
<button className={'review-thread-reply-button'} title={'Reply...'} onClick={this.expand}>Reply...</button>
|
|
412
|
-
</div
|
|
418
|
+
</div> : null;
|
|
413
419
|
}
|
|
414
420
|
}
|
|
415
421
|
|
|
@@ -124,12 +124,25 @@ export class CommentThreadImpl implements CommentThread, Disposable {
|
|
|
124
124
|
private readonly onDidChangeCollapsibleStateEmitter = new Emitter<CommentThreadCollapsibleState | undefined>();
|
|
125
125
|
readonly onDidChangeCollapsibleState = this.onDidChangeCollapsibleStateEmitter.event;
|
|
126
126
|
|
|
127
|
+
private readonly onDidChangeCanReplyEmitter = new Emitter<boolean>();
|
|
128
|
+
readonly onDidChangeCanReply = this.onDidChangeCanReplyEmitter.event;
|
|
129
|
+
|
|
127
130
|
private _isDisposed: boolean;
|
|
128
131
|
|
|
129
132
|
get isDisposed(): boolean {
|
|
130
133
|
return this._isDisposed;
|
|
131
134
|
}
|
|
132
135
|
|
|
136
|
+
private _canReply: boolean = true;
|
|
137
|
+
get canReply(): boolean {
|
|
138
|
+
return this._canReply;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
set canReply(canReply: boolean) {
|
|
142
|
+
this._canReply = canReply;
|
|
143
|
+
this.onDidChangeCanReplyEmitter.fire(this._canReply);
|
|
144
|
+
}
|
|
145
|
+
|
|
133
146
|
constructor(
|
|
134
147
|
public commentThreadHandle: number,
|
|
135
148
|
public controllerHandle: number,
|
|
@@ -150,6 +163,7 @@ export class CommentThreadImpl implements CommentThread, Disposable {
|
|
|
150
163
|
if (modified('contextValue')) { this._contextValue = changes.contextValue; }
|
|
151
164
|
if (modified('comments')) { this._comments = changes.comments; }
|
|
152
165
|
if (modified('collapseState')) { this._collapsibleState = changes.collapseState; }
|
|
166
|
+
if (modified('canReply')) { this._canReply = changes.canReply!; }
|
|
153
167
|
}
|
|
154
168
|
|
|
155
169
|
dispose(): void {
|
|
@@ -159,6 +173,7 @@ export class CommentThreadImpl implements CommentThread, Disposable {
|
|
|
159
173
|
this.onDidChangeInputEmitter.dispose();
|
|
160
174
|
this.onDidChangeLabelEmitter.dispose();
|
|
161
175
|
this.onDidChangeRangeEmitter.dispose();
|
|
176
|
+
this.onDidChangeCanReplyEmitter.dispose();
|
|
162
177
|
}
|
|
163
178
|
}
|
|
164
179
|
|
|
@@ -37,27 +37,6 @@ export class PluginDebugAdapterContribution {
|
|
|
37
37
|
return this.description.label;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
* @deprecated since 1.24.0, Use [PluginDebugConfigurationProvider](plugin-debug-configuration-provider.ts)
|
|
42
|
-
*/
|
|
43
|
-
async provideDebugConfigurations(workspaceFolderUri: string | undefined, dynamic: boolean = false): Promise<DebugConfiguration[]> {
|
|
44
|
-
return this.debugExt.$provideDebugConfigurations(this.type, workspaceFolderUri, dynamic);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated since 1.24.0, Use [PluginDebugConfigurationProvider](plugin-debug-configuration-provider.ts)
|
|
49
|
-
*/
|
|
50
|
-
async resolveDebugConfiguration(config: DebugConfiguration, workspaceFolderUri: string | undefined): Promise<DebugConfiguration | undefined> {
|
|
51
|
-
return this.debugExt.$resolveDebugConfigurations(config, workspaceFolderUri);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated since 1.24.0, Use [PluginDebugConfigurationProvider](plugin-debug-configuration-provider.ts)
|
|
56
|
-
*/
|
|
57
|
-
async resolveDebugConfigurationWithSubstitutedVariables(config: DebugConfiguration, workspaceFolderUri: string | undefined): Promise<DebugConfiguration | undefined> {
|
|
58
|
-
return this.debugExt.$resolveDebugConfigurationWithSubstitutedVariables(config, workspaceFolderUri);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
40
|
async createDebugSession(config: DebugConfiguration): Promise<string> {
|
|
62
41
|
await this.pluginService.activateByDebug('onDebugAdapterProtocolTracker', config.type);
|
|
63
42
|
return this.debugExt.$createDebugSession(config);
|
|
@@ -27,8 +27,14 @@ export class PluginDebugConfigurationProvider implements DebugConfigurationProvi
|
|
|
27
27
|
public type: string;
|
|
28
28
|
public triggerKind: DebugConfigurationProviderTriggerKind;
|
|
29
29
|
provideDebugConfigurations: (folder: string | undefined) => Promise<DebugConfiguration[]>;
|
|
30
|
-
resolveDebugConfiguration: (
|
|
31
|
-
|
|
30
|
+
resolveDebugConfiguration: (
|
|
31
|
+
folder: string | undefined,
|
|
32
|
+
debugConfiguration: DebugConfiguration
|
|
33
|
+
) => Promise<DebugConfiguration | undefined | null>;
|
|
34
|
+
resolveDebugConfigurationWithSubstitutedVariables: (
|
|
35
|
+
folder: string | undefined,
|
|
36
|
+
debugConfiguration: DebugConfiguration
|
|
37
|
+
) => Promise<DebugConfiguration | undefined | null>;
|
|
32
38
|
|
|
33
39
|
constructor(
|
|
34
40
|
description: DebugConfigurationProviderDescriptor,
|
|
@@ -147,52 +147,74 @@ export class PluginDebugService implements DebugService {
|
|
|
147
147
|
return configurationsRecord;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
async resolveDebugConfiguration(
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
async resolveDebugConfiguration(
|
|
151
|
+
config: DebugConfiguration,
|
|
152
|
+
workspaceFolderUri: string | undefined
|
|
153
|
+
): Promise<DebugConfiguration | undefined | null> {
|
|
153
154
|
const allProviders = Array.from(this.configurationProviders.values());
|
|
155
|
+
|
|
156
|
+
const resolvers = allProviders
|
|
157
|
+
.filter(p => p.type === config.type && !!p.resolveDebugConfiguration)
|
|
158
|
+
.map(p => p.resolveDebugConfiguration);
|
|
159
|
+
|
|
154
160
|
// Append debug type '*' at the end
|
|
155
|
-
|
|
156
|
-
|
|
161
|
+
resolvers.push(
|
|
162
|
+
...allProviders
|
|
163
|
+
.filter(p => p.type === '*' && !!p.resolveDebugConfiguration)
|
|
164
|
+
.map(p => p.resolveDebugConfiguration)
|
|
165
|
+
);
|
|
157
166
|
|
|
158
|
-
|
|
159
|
-
try {
|
|
160
|
-
const next = await provider.resolveDebugConfiguration(workspaceFolderUri, resolved);
|
|
161
|
-
if (next) {
|
|
162
|
-
resolved = next;
|
|
163
|
-
} else {
|
|
164
|
-
return resolved;
|
|
165
|
-
}
|
|
166
|
-
} catch (e) {
|
|
167
|
-
console.error(e);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
167
|
+
const resolved = await this.resolveDebugConfigurationByResolversChain(config, workspaceFolderUri, resolvers);
|
|
170
168
|
|
|
171
|
-
return this.delegated.resolveDebugConfiguration(resolved, workspaceFolderUri);
|
|
169
|
+
return resolved ? this.delegated.resolveDebugConfiguration(resolved, workspaceFolderUri) : resolved;
|
|
172
170
|
}
|
|
173
171
|
|
|
174
|
-
async resolveDebugConfigurationWithSubstitutedVariables(
|
|
175
|
-
|
|
176
|
-
|
|
172
|
+
async resolveDebugConfigurationWithSubstitutedVariables(
|
|
173
|
+
config: DebugConfiguration,
|
|
174
|
+
workspaceFolderUri: string | undefined
|
|
175
|
+
): Promise<DebugConfiguration | undefined | null> {
|
|
177
176
|
const allProviders = Array.from(this.configurationProviders.values());
|
|
177
|
+
|
|
178
|
+
const resolvers = allProviders
|
|
179
|
+
.filter(p => p.type === config.type && !!p.resolveDebugConfigurationWithSubstitutedVariables)
|
|
180
|
+
.map(p => p.resolveDebugConfigurationWithSubstitutedVariables);
|
|
181
|
+
|
|
178
182
|
// Append debug type '*' at the end
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
resolvers.push(
|
|
184
|
+
...allProviders
|
|
185
|
+
.filter(p => p.type === '*' && !!p.resolveDebugConfigurationWithSubstitutedVariables)
|
|
186
|
+
.map(p => p.resolveDebugConfigurationWithSubstitutedVariables)
|
|
187
|
+
);
|
|
181
188
|
|
|
182
|
-
|
|
189
|
+
const resolved = await this.resolveDebugConfigurationByResolversChain(config, workspaceFolderUri, resolvers);
|
|
190
|
+
|
|
191
|
+
return resolved
|
|
192
|
+
? this.delegated.resolveDebugConfigurationWithSubstitutedVariables(resolved, workspaceFolderUri)
|
|
193
|
+
: resolved;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
protected async resolveDebugConfigurationByResolversChain(
|
|
197
|
+
config: DebugConfiguration,
|
|
198
|
+
workspaceFolderUri: string | undefined,
|
|
199
|
+
resolvers: ((
|
|
200
|
+
folder: string | undefined,
|
|
201
|
+
debugConfiguration: DebugConfiguration
|
|
202
|
+
) => Promise<DebugConfiguration | null | undefined>)[]
|
|
203
|
+
): Promise<DebugConfiguration | undefined | null> {
|
|
204
|
+
let resolved: DebugConfiguration | undefined | null = config;
|
|
205
|
+
for (const resolver of resolvers) {
|
|
183
206
|
try {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
return resolved;
|
|
207
|
+
if (!resolved) {
|
|
208
|
+
// A provider has indicated to stop and process undefined or null as per specified in the vscode API
|
|
209
|
+
// https://code.visualstudio.com/api/references/vscode-api#DebugConfigurationProvider
|
|
210
|
+
break;
|
|
189
211
|
}
|
|
212
|
+
resolved = await resolver(workspaceFolderUri, resolved);
|
|
190
213
|
} catch (e) {
|
|
191
214
|
console.error(e);
|
|
192
215
|
}
|
|
193
216
|
}
|
|
194
|
-
|
|
195
|
-
return this.delegated.resolveDebugConfigurationWithSubstitutedVariables(resolved, workspaceFolderUri);
|
|
217
|
+
return resolved;
|
|
196
218
|
}
|
|
197
219
|
|
|
198
220
|
registerDebugger(contribution: DebuggerContribution): Disposable {
|
|
@@ -50,7 +50,7 @@ import * as theia from '@theia/plugin';
|
|
|
50
50
|
import { UriComponents } from '../../common/uri-components';
|
|
51
51
|
import { CancellationToken } from '@theia/core/lib/common';
|
|
52
52
|
import { LanguageSelector, RelativePattern } from '@theia/callhierarchy/lib/common/language-selector';
|
|
53
|
-
import { CallHierarchyService, CallHierarchyServiceProvider,
|
|
53
|
+
import { CallHierarchyService, CallHierarchyServiceProvider, CallHierarchyItem } from '@theia/callhierarchy/lib/browser';
|
|
54
54
|
import { toDefinition, toUriComponents, fromDefinition, fromPosition, toCaller, toCallee } from './callhierarchy/callhierarchy-type-converters';
|
|
55
55
|
import { Position, DocumentUri, DiagnosticTag } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
56
56
|
import { ObjectIdentifier } from '../../common/object-identifier';
|
|
@@ -804,8 +804,12 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
804
804
|
selector: language,
|
|
805
805
|
getRootDefinition: (uri: DocumentUri, position: Position, cancellationToken: CancellationToken) =>
|
|
806
806
|
this.proxy.$provideRootDefinition(handle, toUriComponents(uri), fromPosition(position), cancellationToken)
|
|
807
|
-
.then(def =>
|
|
808
|
-
|
|
807
|
+
.then(def => {
|
|
808
|
+
if (!def) { return undefined; }
|
|
809
|
+
const defs = Array.isArray(def) ? def : [def];
|
|
810
|
+
return { dispose: () => this.proxy.$releaseCallHierarchy(handle, defs[0]?._sessionId), items: defs.map(item => toDefinition(item)) };
|
|
811
|
+
}),
|
|
812
|
+
getCallers: (definition: CallHierarchyItem, cancellationToken: CancellationToken) => this.proxy.$provideCallers(handle, fromDefinition(definition), cancellationToken)
|
|
809
813
|
.then(result => {
|
|
810
814
|
if (!result) {
|
|
811
815
|
return undefined!;
|
|
@@ -818,7 +822,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
818
822
|
return undefined!;
|
|
819
823
|
}),
|
|
820
824
|
|
|
821
|
-
getCallees: (definition:
|
|
825
|
+
getCallees: (definition: CallHierarchyItem, cancellationToken: CancellationToken) => this.proxy.$provideCallees(handle, fromDefinition(definition), cancellationToken)
|
|
822
826
|
.then(result => {
|
|
823
827
|
if (!result) {
|
|
824
828
|
return undefined;
|
|
@@ -57,6 +57,7 @@ import { CustomEditorsMainImpl } from './custom-editors/custom-editors-main';
|
|
|
57
57
|
import { SecretsMainImpl } from './secrets-main';
|
|
58
58
|
import { WebviewViewsMainImpl } from './webview-views/webview-views-main';
|
|
59
59
|
import { MonacoLanguages } from '@theia/monaco/lib/browser/monaco-languages';
|
|
60
|
+
import { NotificationExtImpl } from '../../plugin/notification';
|
|
60
61
|
|
|
61
62
|
export function setUpPluginApi(rpc: RPCProtocol, container: interfaces.Container): void {
|
|
62
63
|
const authenticationMain = new AuthenticationMainImpl(rpc, container);
|
|
@@ -108,6 +109,9 @@ export function setUpPluginApi(rpc: RPCProtocol, container: interfaces.Container
|
|
|
108
109
|
const notificationMain = new NotificationMainImpl(rpc, container);
|
|
109
110
|
rpc.set(PLUGIN_RPC_CONTEXT.NOTIFICATION_MAIN, notificationMain);
|
|
110
111
|
|
|
112
|
+
const notificationExt = new NotificationExtImpl(rpc);
|
|
113
|
+
rpc.set(MAIN_RPC_CONTEXT.NOTIFICATION_EXT, notificationExt);
|
|
114
|
+
|
|
111
115
|
const terminalMain = new TerminalServiceMainImpl(rpc, container);
|
|
112
116
|
rpc.set(PLUGIN_RPC_CONTEXT.TERMINAL_MAIN, terminalMain);
|
|
113
117
|
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { NotificationMain } from '../../common
|
|
17
|
+
import { NotificationExt, NotificationMain, MAIN_RPC_CONTEXT } from '../../common';
|
|
18
18
|
import { ProgressService, Progress, ProgressMessage } from '@theia/core/lib/common';
|
|
19
19
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
20
20
|
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
21
21
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
22
22
|
|
|
23
23
|
export class NotificationMainImpl implements NotificationMain, Disposable {
|
|
24
|
-
|
|
25
24
|
private readonly progressService: ProgressService;
|
|
26
25
|
private readonly progressMap = new Map<string, Progress>();
|
|
27
26
|
private readonly progress2Work = new Map<string, number>();
|
|
27
|
+
private readonly proxy: NotificationExt;
|
|
28
28
|
|
|
29
29
|
protected readonly toDispose = new DisposableCollection(
|
|
30
30
|
Disposable.create(() => { /* mark as not disposed */ })
|
|
@@ -32,6 +32,7 @@ export class NotificationMainImpl implements NotificationMain, Disposable {
|
|
|
32
32
|
|
|
33
33
|
constructor(rpc: RPCProtocol, container: interfaces.Container) {
|
|
34
34
|
this.progressService = container.get(ProgressService);
|
|
35
|
+
this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.NOTIFICATION_EXT);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
dispose(): void {
|
|
@@ -39,8 +40,15 @@ export class NotificationMainImpl implements NotificationMain, Disposable {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
async $startProgress(options: NotificationMain.StartProgressOptions): Promise<string> {
|
|
43
|
+
const onDidCancel = () => {
|
|
44
|
+
// If the map does not contain current id, it has already stopped and should not be cancelled
|
|
45
|
+
if (this.progressMap.has(id)) {
|
|
46
|
+
this.proxy.$acceptProgressCanceled(id);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
42
50
|
const progressMessage = this.mapOptions(options);
|
|
43
|
-
const progress = await this.progressService.showProgress(progressMessage);
|
|
51
|
+
const progress = await this.progressService.showProgress(progressMessage, onDidCancel);
|
|
44
52
|
const id = progress.id;
|
|
45
53
|
this.progressMap.set(id, progress);
|
|
46
54
|
this.progress2Work.set(id, 0);
|
|
@@ -58,10 +66,11 @@ export class NotificationMainImpl implements NotificationMain, Disposable {
|
|
|
58
66
|
|
|
59
67
|
$stopProgress(id: string): void {
|
|
60
68
|
const progress = this.progressMap.get(id);
|
|
69
|
+
|
|
61
70
|
if (progress) {
|
|
62
|
-
progress.cancel();
|
|
63
71
|
this.progressMap.delete(id);
|
|
64
72
|
this.progress2Work.delete(id);
|
|
73
|
+
progress.cancel();
|
|
65
74
|
}
|
|
66
75
|
}
|
|
67
76
|
|
|
@@ -78,6 +78,7 @@ import { UndoRedoService } from './custom-editors/undo-redo-service';
|
|
|
78
78
|
import { WebviewFrontendSecurityWarnings } from './webview/webview-frontend-security-warnings';
|
|
79
79
|
import { PluginAuthenticationServiceImpl } from './plugin-authentication-service';
|
|
80
80
|
import { AuthenticationService } from '@theia/core/lib/browser/authentication-service';
|
|
81
|
+
import { bindTreeViewDecoratorUtilities, TreeViewDecoratorService } from './view/tree-view-decorator-service';
|
|
81
82
|
|
|
82
83
|
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
83
84
|
|
|
@@ -142,6 +143,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
|
142
143
|
|
|
143
144
|
bind(ViewContextKeyService).toSelf().inSingletonScope();
|
|
144
145
|
|
|
146
|
+
bindTreeViewDecoratorUtilities(bind);
|
|
145
147
|
bind(PluginTreeViewNodeLabelProvider).toSelf().inSingletonScope();
|
|
146
148
|
bind(LabelProviderContribution).toService(PluginTreeViewNodeLabelProvider);
|
|
147
149
|
bind(WidgetFactory).toDynamicValue(({ container }) => ({
|
|
@@ -160,6 +162,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
|
160
162
|
tree: PluginTree,
|
|
161
163
|
model: PluginTreeModel,
|
|
162
164
|
widget: TreeViewWidget,
|
|
165
|
+
decoratorService: TreeViewDecoratorService
|
|
163
166
|
});
|
|
164
167
|
child.bind(TreeViewWidgetIdentifier).toConstantValue(identifier);
|
|
165
168
|
return child.get(TreeWidget);
|
|
@@ -39,10 +39,12 @@ export class StatusBarMessageRegistryMainImpl implements StatusBarMessageRegistr
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
async $setMessage(id: string,
|
|
42
|
+
name: string | undefined,
|
|
42
43
|
text: string | undefined,
|
|
43
44
|
priority: number,
|
|
44
45
|
alignment: number,
|
|
45
46
|
color: string | undefined,
|
|
47
|
+
backgroundColor: string | undefined,
|
|
46
48
|
tooltip: string | undefined,
|
|
47
49
|
command: string | undefined,
|
|
48
50
|
accessibilityInformation: types.AccessibilityInformation,
|
|
@@ -52,12 +54,15 @@ export class StatusBarMessageRegistryMainImpl implements StatusBarMessageRegistr
|
|
|
52
54
|
const role = accessibilityInformation?.role;
|
|
53
55
|
|
|
54
56
|
const entry = {
|
|
57
|
+
name,
|
|
55
58
|
text: text || '',
|
|
56
59
|
ariaLabel,
|
|
57
60
|
role,
|
|
58
61
|
priority,
|
|
59
62
|
alignment: alignment === types.StatusBarAlignment.Left ? StatusBarAlignment.LEFT : StatusBarAlignment.RIGHT,
|
|
60
63
|
color: color && (this.colorRegistry.getCurrentColor(color) || color),
|
|
64
|
+
// In contrast to color, the backgroundColor must be a theme color. Thus, do not hand in the plain string if it cannot be resolved.
|
|
65
|
+
backgroundColor: backgroundColor && (this.colorRegistry.getCurrentColor(backgroundColor)),
|
|
61
66
|
tooltip,
|
|
62
67
|
command,
|
|
63
68
|
accessibilityInformation,
|