@theia/plugin-ext 1.73.0-next.3 → 1.73.0-next.39
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/hosted/node/hosted-plugin-localization-service.d.ts +2 -1
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.js +6 -1
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
- package/lib/hosted/node/plugin-deployer-handler-impl.js +4 -3
- package/lib/hosted/node/plugin-deployer-handler-impl.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts +2 -0
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +63 -50
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.d.ts +3 -3
- package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js +1 -0
- package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts +1 -0
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js +3 -0
- package/lib/main/browser/custom-editors/custom-editor-widget.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 +2 -0
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/debug/debug-main.d.ts +1 -11
- package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
- package/lib/main/browser/debug/debug-main.js +3 -24
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts +2 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.js +8 -3
- package/lib/main/browser/debug/plugin-debug-service.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +7 -44
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.js +29 -35
- package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts +2 -0
- 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/lm-main.js +2 -2
- package/lib/main/browser/lm-main.js.map +1 -1
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +2 -1
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
- package/lib/main/browser/notebooks/renderers/cell-output-webview.js +11 -5
- package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.d.ts +2 -0
- package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.js +10 -4
- package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts +7 -0
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +85 -6
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.spec.d.ts +2 -0
- package/lib/main/browser/view/plugin-view-registry.spec.d.ts.map +1 -0
- package/lib/main/browser/view/plugin-view-registry.spec.js +80 -0
- package/lib/main/browser/view/plugin-view-registry.spec.js.map +1 -0
- package/lib/main/browser/webview/webview-resource-cache.d.ts +2 -0
- package/lib/main/browser/webview/webview-resource-cache.d.ts.map +1 -1
- package/lib/main/browser/webview/webview-resource-cache.js +7 -1
- package/lib/main/browser/webview/webview-resource-cache.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +2 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +7 -1
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/node/plugin-deployer-impl.js +2 -1
- package/lib/main/node/plugin-deployer-impl.js.map +1 -1
- package/lib/plugin/languages/diagnostics.d.ts +4 -1
- package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
- package/lib/plugin/languages/diagnostics.js +22 -9
- package/lib/plugin/languages/diagnostics.js.map +1 -1
- package/package.json +30 -30
- package/src/hosted/node/hosted-plugin-localization-service.ts +6 -3
- package/src/hosted/node/plugin-deployer-handler-impl.ts +5 -5
- package/src/hosted/node/scanners/scanner-theia.ts +63 -51
- package/src/main/browser/comments/comment-thread-widget.tsx +5 -5
- package/src/main/browser/custom-editors/custom-editor-opener.tsx +1 -0
- package/src/main/browser/custom-editors/custom-editor-widget.ts +4 -0
- package/src/main/browser/custom-editors/custom-editors-main.ts +2 -0
- package/src/main/browser/debug/debug-main.ts +3 -45
- package/src/main/browser/debug/plugin-debug-service.ts +7 -5
- package/src/main/browser/debug/plugin-debug-session-factory.ts +25 -71
- package/src/main/browser/languages-main.ts +6 -2
- package/src/main/browser/lm-main.ts +2 -2
- package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +11 -7
- package/src/main/browser/plugin-contribution-handler.ts +8 -4
- package/src/main/browser/plugin-ext-widget.tsx +1 -1
- package/src/main/browser/view/plugin-view-registry.spec.ts +105 -0
- package/src/main/browser/view/plugin-view-registry.ts +91 -6
- package/src/main/browser/webview/webview-resource-cache.ts +6 -2
- package/src/main/browser/webview/webview.ts +6 -3
- package/src/main/node/plugin-deployer-impl.ts +2 -2
- package/src/plugin/languages/diagnostics.ts +28 -10
|
@@ -42,7 +42,7 @@ export class PluginDeployerImpl implements PluginDeployer {
|
|
|
42
42
|
protected readonly onDidDeployEmitter = new Emitter<void>();
|
|
43
43
|
readonly onDidDeploy = this.onDidDeployEmitter.event;
|
|
44
44
|
|
|
45
|
-
@inject(ILogger)
|
|
45
|
+
@inject(ILogger) @named('plugin-ext:PluginDeployerImpl')
|
|
46
46
|
protected readonly logger: ILogger;
|
|
47
47
|
|
|
48
48
|
@inject(PluginDeployerHandler)
|
|
@@ -215,7 +215,7 @@ export class PluginDeployerImpl implements PluginDeployer {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
} catch (e) {
|
|
218
|
-
|
|
218
|
+
this.logger.error(`Failed to resolve plugins from '${entry.id}'`, e);
|
|
219
219
|
errors.push(e instanceof Error ? e : new Error(String(e)));
|
|
220
220
|
}
|
|
221
221
|
}));
|
|
@@ -30,6 +30,7 @@ export class DiagnosticCollection implements theia.DiagnosticCollection {
|
|
|
30
30
|
];
|
|
31
31
|
|
|
32
32
|
private collectionName: string;
|
|
33
|
+
private ownerId: string;
|
|
33
34
|
private diagnosticsLimitPerResource: number;
|
|
34
35
|
private proxy: LanguagesMain;
|
|
35
36
|
private onDidChangeDiagnosticsEmitter: Emitter<theia.DiagnosticChangeEvent>;
|
|
@@ -38,8 +39,9 @@ export class DiagnosticCollection implements theia.DiagnosticCollection {
|
|
|
38
39
|
private isDisposed: boolean;
|
|
39
40
|
private onDisposeCallback: (() => void) | undefined;
|
|
40
41
|
|
|
41
|
-
constructor(name: string, maxCountPerFile: number, proxy: LanguagesMain, onDidChangeDiagnosticsEmitter: Emitter<theia.DiagnosticChangeEvent>) {
|
|
42
|
+
constructor(name: string, owner: string, maxCountPerFile: number, proxy: LanguagesMain, onDidChangeDiagnosticsEmitter: Emitter<theia.DiagnosticChangeEvent>) {
|
|
42
43
|
this.collectionName = name;
|
|
44
|
+
this.ownerId = owner;
|
|
43
45
|
this.diagnosticsLimitPerResource = maxCountPerFile;
|
|
44
46
|
this.proxy = proxy;
|
|
45
47
|
this.onDidChangeDiagnosticsEmitter = onDidChangeDiagnosticsEmitter;
|
|
@@ -53,6 +55,10 @@ export class DiagnosticCollection implements theia.DiagnosticCollection {
|
|
|
53
55
|
return this.collectionName;
|
|
54
56
|
}
|
|
55
57
|
|
|
58
|
+
get owner(): string {
|
|
59
|
+
return this.ownerId;
|
|
60
|
+
}
|
|
61
|
+
|
|
56
62
|
set(uri: theia.Uri, diagnostics: theia.Diagnostic[] | undefined): void;
|
|
57
63
|
set(entries: [theia.Uri, theia.Diagnostic[] | undefined][]): void;
|
|
58
64
|
set(arg: theia.Uri | [theia.Uri, theia.Diagnostic[] | undefined][], diagnostics?: theia.Diagnostic[] | undefined): void {
|
|
@@ -115,7 +121,7 @@ export class DiagnosticCollection implements theia.DiagnosticCollection {
|
|
|
115
121
|
if (this.has(uri)) {
|
|
116
122
|
this.fireDiagnosticChangeEvent(uri);
|
|
117
123
|
this.diagnostics.delete(uri.toString());
|
|
118
|
-
this.proxy.$changeDiagnostics(this.
|
|
124
|
+
this.proxy.$changeDiagnostics(this.ownerId, [[uri.toString(), []]]);
|
|
119
125
|
}
|
|
120
126
|
}
|
|
121
127
|
|
|
@@ -123,7 +129,7 @@ export class DiagnosticCollection implements theia.DiagnosticCollection {
|
|
|
123
129
|
this.ensureNotDisposed();
|
|
124
130
|
this.fireDiagnosticChangeEvent(this.getAllResourcesUris());
|
|
125
131
|
this.diagnostics.clear();
|
|
126
|
-
this.proxy.$clearDiagnostics(this.
|
|
132
|
+
this.proxy.$clearDiagnostics(this.ownerId);
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -247,7 +253,7 @@ export class DiagnosticCollection implements theia.DiagnosticCollection {
|
|
|
247
253
|
}
|
|
248
254
|
}
|
|
249
255
|
|
|
250
|
-
this.proxy.$changeDiagnostics(this.
|
|
256
|
+
this.proxy.$changeDiagnostics(this.ownerId, markers);
|
|
251
257
|
}
|
|
252
258
|
}
|
|
253
259
|
|
|
@@ -256,7 +262,12 @@ export class Diagnostics {
|
|
|
256
262
|
private static GENERATED_DIAGNOSTIC_COLLECTION_NAME_PREFIX = '_generated_diagnostic_collection_name_#';
|
|
257
263
|
|
|
258
264
|
private proxy: LanguagesMain;
|
|
259
|
-
|
|
265
|
+
// Collections are keyed by their unique `owner` id (which is the same as `name` for the first
|
|
266
|
+
// collection with that name, but is suffixed when a duplicate name is requested). This matches
|
|
267
|
+
// VS Code's behavior and prevents collisions on the main side's marker owner namespace as well
|
|
268
|
+
// as a latent bug where disposing the first collection would evict the second from the map.
|
|
269
|
+
private diagnosticCollections: Map<string, DiagnosticCollection>;
|
|
270
|
+
private nextOwnerSuffix = 1;
|
|
260
271
|
|
|
261
272
|
private diagnosticsChangedEmitter = new Emitter<theia.DiagnosticChangeEvent>();
|
|
262
273
|
public readonly onDidChangeDiagnostics: Event<theia.DiagnosticChangeEvent> = this.diagnosticsChangedEmitter.event;
|
|
@@ -278,19 +289,26 @@ export class Diagnostics {
|
|
|
278
289
|
}
|
|
279
290
|
|
|
280
291
|
createDiagnosticCollection(name?: string): theia.DiagnosticCollection {
|
|
292
|
+
let owner: string;
|
|
281
293
|
if (!name) {
|
|
282
294
|
do {
|
|
283
295
|
name = Diagnostics.GENERATED_DIAGNOSTIC_COLLECTION_NAME_PREFIX + this.getNextId();
|
|
284
296
|
} while (this.diagnosticCollections.has(name));
|
|
285
|
-
|
|
286
|
-
|
|
297
|
+
owner = name;
|
|
298
|
+
} else if (!this.diagnosticCollections.has(name)) {
|
|
299
|
+
owner = name;
|
|
300
|
+
} else {
|
|
301
|
+
console.warn(`Diagnostic collection with name '${name}' already exists.`);
|
|
302
|
+
do {
|
|
303
|
+
owner = name + this.nextOwnerSuffix++;
|
|
304
|
+
} while (this.diagnosticCollections.has(owner));
|
|
287
305
|
}
|
|
288
306
|
|
|
289
|
-
const diagnosticCollection = new DiagnosticCollection(name, Diagnostics.MAX_DIAGNOSTICS_PER_FILE, this.proxy, this.diagnosticsChangedEmitter);
|
|
307
|
+
const diagnosticCollection = new DiagnosticCollection(name, owner, Diagnostics.MAX_DIAGNOSTICS_PER_FILE, this.proxy, this.diagnosticsChangedEmitter);
|
|
290
308
|
diagnosticCollection.setOnDisposeCallback(() => {
|
|
291
|
-
this.diagnosticCollections.delete(
|
|
309
|
+
this.diagnosticCollections.delete(owner);
|
|
292
310
|
});
|
|
293
|
-
this.diagnosticCollections.set(
|
|
311
|
+
this.diagnosticCollections.set(owner, diagnosticCollection);
|
|
294
312
|
return diagnosticCollection;
|
|
295
313
|
}
|
|
296
314
|
|