@theia/plugin-ext 1.25.0-next.3 → 1.25.0-next.32
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.d.ts +10 -18
- 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/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/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/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 +2 -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 +9 -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 +2 -0
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +9 -1
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/plugin/comments.js.map +1 -1
- package/lib/plugin/languages/lens.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 +3 -0
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +8 -0
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts +13 -2
- package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.js +38 -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 +4 -2
- package/lib/plugin/tree/tree-views.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +4 -0
- 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 +23 -23
- package/src/common/plugin-api-rpc.ts +27 -21
- package/src/hosted/node/hosted-plugin-localization-service.ts +23 -2
- 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/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 +12 -0
- package/src/main/browser/view/tree-view-decorator-service.ts +52 -0
- package/src/main/browser/view/tree-view-widget.tsx +15 -1
- package/src/plugin/comments.ts +1 -1
- package/src/plugin/languages/lens.ts +1 -1
- package/src/plugin/node/debug/debug.ts +22 -78
- package/src/plugin/notification.ts +18 -2
- package/src/plugin/quick-open.ts +10 -0
- package/src/plugin/status-bar/status-bar-item.ts +57 -5
- package/src/plugin/tree/tree-views.ts +4 -2
- package/src/plugin/types-impl.ts +5 -0
- package/src/plugin/workspace.ts +1 -1
|
@@ -20,15 +20,24 @@ import { UUID } from '@theia/core/shared/@phosphor/coreutils';
|
|
|
20
20
|
|
|
21
21
|
export class StatusBarItemImpl implements theia.StatusBarItem {
|
|
22
22
|
|
|
23
|
+
/** Map from allowed background colors to corresponding foreground colors. */
|
|
24
|
+
private static BACKGROUND_COLORS = new Map<string, string>([
|
|
25
|
+
['statusBarItem.errorBackground', 'statusBarItem.errorForeground'],
|
|
26
|
+
['statusBarItem.warningBackground', 'statusBarItem.warningForeground']
|
|
27
|
+
]);
|
|
28
|
+
|
|
23
29
|
private _id: string;
|
|
24
30
|
|
|
25
31
|
private _alignment: StatusBarAlignment;
|
|
26
32
|
private _priority: number;
|
|
27
33
|
|
|
34
|
+
private _name: string | undefined;
|
|
28
35
|
private _text: string;
|
|
29
36
|
private _tooltip: string;
|
|
30
|
-
private _color: string | ThemeColor;
|
|
37
|
+
private _color: string | ThemeColor | undefined;
|
|
38
|
+
private _backgroundColor: ThemeColor | undefined;
|
|
31
39
|
private _command: string | theia.Command;
|
|
40
|
+
private _accessibilityInformation: theia.AccessibilityInformation;
|
|
32
41
|
|
|
33
42
|
private _isVisible: boolean;
|
|
34
43
|
private _timeoutHandle: NodeJS.Timer | undefined;
|
|
@@ -57,6 +66,10 @@ export class StatusBarItemImpl implements theia.StatusBarItem {
|
|
|
57
66
|
return this._priority;
|
|
58
67
|
}
|
|
59
68
|
|
|
69
|
+
public get name(): string | undefined {
|
|
70
|
+
return this._name;
|
|
71
|
+
}
|
|
72
|
+
|
|
60
73
|
public get text(): string {
|
|
61
74
|
return this._text;
|
|
62
75
|
}
|
|
@@ -65,14 +78,27 @@ export class StatusBarItemImpl implements theia.StatusBarItem {
|
|
|
65
78
|
return this._tooltip;
|
|
66
79
|
}
|
|
67
80
|
|
|
68
|
-
public get color(): string | ThemeColor {
|
|
81
|
+
public get color(): string | ThemeColor | undefined {
|
|
69
82
|
return this._color;
|
|
70
83
|
}
|
|
71
84
|
|
|
85
|
+
public get backgroundColor(): ThemeColor | undefined {
|
|
86
|
+
return this._backgroundColor;
|
|
87
|
+
}
|
|
88
|
+
|
|
72
89
|
public get command(): string | theia.Command {
|
|
73
90
|
return this._command;
|
|
74
91
|
}
|
|
75
92
|
|
|
93
|
+
public get accessibilityInformation(): theia.AccessibilityInformation {
|
|
94
|
+
return this._accessibilityInformation;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
public set name(name: string | undefined) {
|
|
98
|
+
this._name = name;
|
|
99
|
+
this.update();
|
|
100
|
+
}
|
|
101
|
+
|
|
76
102
|
public set text(text: string) {
|
|
77
103
|
this._text = text;
|
|
78
104
|
this.update();
|
|
@@ -83,16 +109,30 @@ export class StatusBarItemImpl implements theia.StatusBarItem {
|
|
|
83
109
|
this.update();
|
|
84
110
|
}
|
|
85
111
|
|
|
86
|
-
public set color(color: string | ThemeColor) {
|
|
112
|
+
public set color(color: string | ThemeColor | undefined) {
|
|
87
113
|
this._color = color;
|
|
88
114
|
this.update();
|
|
89
115
|
}
|
|
90
116
|
|
|
117
|
+
public set backgroundColor(backgroundColor: ThemeColor | undefined) {
|
|
118
|
+
if (backgroundColor && StatusBarItemImpl.BACKGROUND_COLORS.has(backgroundColor.id)) {
|
|
119
|
+
this._backgroundColor = backgroundColor;
|
|
120
|
+
} else {
|
|
121
|
+
this._backgroundColor = undefined;
|
|
122
|
+
}
|
|
123
|
+
this.update();
|
|
124
|
+
}
|
|
125
|
+
|
|
91
126
|
public set command(command: string | theia.Command) {
|
|
92
127
|
this._command = command;
|
|
93
128
|
this.update();
|
|
94
129
|
}
|
|
95
130
|
|
|
131
|
+
public set accessibilityInformation(information: theia.AccessibilityInformation) {
|
|
132
|
+
this._accessibilityInformation = information;
|
|
133
|
+
this.update();
|
|
134
|
+
}
|
|
135
|
+
|
|
96
136
|
public show(): void {
|
|
97
137
|
this._isVisible = true;
|
|
98
138
|
this.update();
|
|
@@ -119,13 +159,25 @@ export class StatusBarItemImpl implements theia.StatusBarItem {
|
|
|
119
159
|
|
|
120
160
|
const commandId = typeof this.command === 'object' ? this.command.command : this.command;
|
|
121
161
|
const args = typeof this.command === 'object' ? this.command.arguments : undefined;
|
|
162
|
+
|
|
163
|
+
let color = this.color;
|
|
164
|
+
if (this.backgroundColor) {
|
|
165
|
+
// If an error or warning background color is set, set the corresponding foreground color
|
|
166
|
+
color = StatusBarItemImpl.BACKGROUND_COLORS.get(this.backgroundColor.id);
|
|
167
|
+
}
|
|
168
|
+
|
|
122
169
|
// Set to status bar
|
|
123
|
-
this._proxy.$setMessage(
|
|
170
|
+
this._proxy.$setMessage(
|
|
171
|
+
this.id,
|
|
172
|
+
this.name,
|
|
173
|
+
this.text,
|
|
124
174
|
this.priority,
|
|
125
175
|
this.alignment,
|
|
126
|
-
typeof
|
|
176
|
+
typeof color === 'string' ? color : color?.id,
|
|
177
|
+
this.backgroundColor?.id,
|
|
127
178
|
this.tooltip,
|
|
128
179
|
commandId,
|
|
180
|
+
this.accessibilityInformation,
|
|
129
181
|
args);
|
|
130
182
|
}, 0);
|
|
131
183
|
}
|
|
@@ -262,7 +262,8 @@ class TreeViewExtImpl<T> implements Disposable {
|
|
|
262
262
|
// root
|
|
263
263
|
return [];
|
|
264
264
|
}
|
|
265
|
-
const
|
|
265
|
+
const result = this.treeDataProvider.getParent && await this.treeDataProvider.getParent(element);
|
|
266
|
+
const parent = result ? result : undefined;
|
|
266
267
|
const chain = await this.calculateRevealParentChain(parent);
|
|
267
268
|
if (!chain) {
|
|
268
269
|
// parents are inconsistent
|
|
@@ -386,7 +387,8 @@ class TreeViewExtImpl<T> implements Disposable {
|
|
|
386
387
|
tooltip: treeItem.tooltip,
|
|
387
388
|
collapsibleState: treeItem.collapsibleState,
|
|
388
389
|
contextValue: treeItem.contextValue,
|
|
389
|
-
command: this.commandsConverter.toSafeCommand(treeItem.command, toDisposeElement)
|
|
390
|
+
command: this.commandsConverter.toSafeCommand(treeItem.command, toDisposeElement),
|
|
391
|
+
accessibilityInformation: treeItem.accessibilityInformation
|
|
390
392
|
} as TreeViewItem;
|
|
391
393
|
|
|
392
394
|
return treeViewItem;
|
package/src/plugin/types-impl.ts
CHANGED
package/src/plugin/workspace.ts
CHANGED
|
@@ -276,7 +276,7 @@ export class WorkspaceExtImpl implements WorkspaceExt {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
async $provideTextDocumentContent(documentURI: string): Promise<string | undefined> {
|
|
279
|
+
async $provideTextDocumentContent(documentURI: string): Promise<string | undefined | null> {
|
|
280
280
|
const uri = URI.parse(documentURI);
|
|
281
281
|
const provider = this.documentContentProviders.get(uri.scheme);
|
|
282
282
|
if (provider) {
|