@theia/plugin-ext 1.70.0-next.28 → 1.70.0-next.43
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 +6 -1
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc-model.js +2 -1
- package/lib/common/plugin-api-rpc-model.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +8 -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 +2 -0
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +7 -0
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/common/hosted-plugin.d.ts +3 -0
- package/lib/hosted/common/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/common/hosted-plugin.js +13 -0
- package/lib/hosted/common/hosted-plugin.js.map +1 -1
- package/lib/hosted/common/hosted-plugin.spec.d.ts +2 -0
- package/lib/hosted/common/hosted-plugin.spec.d.ts.map +1 -0
- package/lib/hosted/common/hosted-plugin.spec.js +308 -0
- package/lib/hosted/common/hosted-plugin.spec.js.map +1 -0
- package/lib/hosted/node/hosted-plugin-process.d.ts +2 -0
- package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.js +8 -0
- package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
- package/lib/hosted/node/plugin-host-navigator-override.d.ts +12 -0
- package/lib/hosted/node/plugin-host-navigator-override.d.ts.map +1 -0
- package/lib/hosted/node/plugin-host-navigator-override.js +37 -0
- package/lib/hosted/node/plugin-host-navigator-override.js.map +1 -0
- package/lib/hosted/node/plugin-host-navigator-override.spec.d.ts +2 -0
- package/lib/hosted/node/plugin-host-navigator-override.spec.d.ts.map +1 -0
- package/lib/hosted/node/plugin-host-navigator-override.spec.js +49 -0
- package/lib/hosted/node/plugin-host-navigator-override.spec.js.map +1 -0
- package/lib/hosted/node/plugin-host.js +3 -0
- package/lib/hosted/node/plugin-host.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts +1 -0
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +7 -0
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.spec.d.ts +2 -0
- package/lib/hosted/node/scanners/scanner-theia.spec.d.ts.map +1 -0
- package/lib/hosted/node/scanners/scanner-theia.spec.js +93 -0
- package/lib/hosted/node/scanners/scanner-theia.spec.js.map +1 -0
- package/lib/main/browser/languages-main.d.ts +2 -2
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/languages-main.js +8 -9
- package/lib/main/browser/languages-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 +26 -0
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/plugin-ext-widget.d.ts +1 -1
- package/lib/main/browser/plugin-ext-widget.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-widget.js +10 -3
- package/lib/main/browser/plugin-ext-widget.js.map +1 -1
- package/lib/main/browser/text-editor-main.js +2 -2
- package/lib/main/common/plugin-host-environment-preferences.d.ts +14 -0
- package/lib/main/common/plugin-host-environment-preferences.d.ts.map +1 -0
- package/lib/main/common/plugin-host-environment-preferences.js +43 -0
- package/lib/main/common/plugin-host-environment-preferences.js.map +1 -0
- package/lib/main/node/plugin-ext-backend-module.d.ts.map +1 -1
- package/lib/main/node/plugin-ext-backend-module.js +5 -0
- package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
- package/lib/main/node/plugin-host-navigator-state-initializer.d.ts +17 -0
- package/lib/main/node/plugin-host-navigator-state-initializer.d.ts.map +1 -0
- package/lib/main/node/plugin-host-navigator-state-initializer.js +53 -0
- package/lib/main/node/plugin-host-navigator-state-initializer.js.map +1 -0
- package/lib/plugin/file-system-event-service-ext-impl.d.ts +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.js +5 -1
- package/lib/plugin/file-system-ext-impl.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +2 -1
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/package.json +30 -30
- package/src/common/plugin-api-rpc-model.ts +10 -1
- package/src/common/plugin-protocol.ts +9 -1
- package/src/hosted/browser/hosted-plugin.ts +6 -0
- package/src/hosted/common/hosted-plugin.spec.ts +377 -0
- package/src/hosted/common/hosted-plugin.ts +18 -1
- package/src/hosted/node/hosted-plugin-process.ts +7 -0
- package/src/hosted/node/plugin-host-navigator-override.spec.ts +53 -0
- package/src/hosted/node/plugin-host-navigator-override.ts +34 -0
- package/src/hosted/node/plugin-host.ts +4 -0
- package/src/hosted/node/scanners/scanner-theia.spec.ts +112 -0
- package/src/hosted/node/scanners/scanner-theia.ts +8 -0
- package/src/main/browser/languages-main.ts +32 -51
- package/src/main/browser/plugin-ext-frontend-module.ts +31 -1
- package/src/main/browser/plugin-ext-widget.tsx +13 -3
- package/src/main/browser/style/plugin-sidebar.css +13 -0
- package/src/main/common/plugin-host-environment-preferences.ts +48 -0
- package/src/main/node/plugin-ext-backend-module.ts +5 -1
- package/src/main/node/plugin-host-navigator-state-initializer.ts +47 -0
- package/src/plugin/file-system-event-service-ext-impl.ts +1 -1
- package/src/plugin/file-system-ext-impl.ts +1 -2
- package/src/plugin/types-impl.ts +2 -1
|
@@ -177,9 +177,17 @@ export abstract class AbstractPluginScanner implements PluginScanner {
|
|
|
177
177
|
licenseUrl: this.getLicenseUrl(plugin),
|
|
178
178
|
readmeUrl: this.getReadmeUrl(plugin)
|
|
179
179
|
};
|
|
180
|
+
this.applyTrustExtraction(plugin, result);
|
|
180
181
|
return result;
|
|
181
182
|
}
|
|
182
183
|
|
|
184
|
+
protected applyTrustExtraction(plugin: PluginPackage, result: PluginModel): void {
|
|
185
|
+
const untrustedWorkspacesSupport = plugin.capabilities?.untrustedWorkspaces?.supported;
|
|
186
|
+
if (untrustedWorkspacesSupport !== undefined) {
|
|
187
|
+
result.untrustedWorkspacesSupport = untrustedWorkspacesSupport;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
183
191
|
protected getReadmeUrl(plugin: PluginPackage): string | undefined {
|
|
184
192
|
return this.getPluginRootFileUrl(plugin, ['readme.md', 'readme.txt', 'readme']);
|
|
185
193
|
}
|
|
@@ -87,15 +87,6 @@ import { CodeActionTriggerKind } from '../../plugin/types-impl';
|
|
|
87
87
|
import { IReadonlyVSDataTransfer } from '@theia/monaco-editor-core/esm/vs/base/common/dataTransfer';
|
|
88
88
|
import { FileUploadService } from '@theia/filesystem/lib/common/upload/file-upload';
|
|
89
89
|
|
|
90
|
-
/**
|
|
91
|
-
* @monaco-uplift The public API declares these functions as (languageId: string, service).
|
|
92
|
-
* Confirm that the functions delegate to a handler that accepts a LanguageSelector rather than just a string.
|
|
93
|
-
* Relevant code in node_modules/@theia/monaco-editor-core/src/vs/editor/standalone/browser/standaloneLanguages.ts
|
|
94
|
-
*/
|
|
95
|
-
interface RegistrationFunction<T> {
|
|
96
|
-
(languageId: MonacoLanguageSelector.LanguageSelector, service: T): Disposable;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
90
|
@injectable()
|
|
100
91
|
export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
101
92
|
|
|
@@ -175,7 +166,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
175
166
|
|
|
176
167
|
$registerCompletionSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], triggerCharacters: string[], supportsResolveDetails: boolean): void {
|
|
177
168
|
this.register(handle,
|
|
178
|
-
|
|
169
|
+
monaco.languages.registerCompletionItemProvider(this.toLanguageSelector(selector), {
|
|
179
170
|
triggerCharacters,
|
|
180
171
|
provideCompletionItems: (model, position, context, token) => this.provideCompletionItems(handle, model, position, context, token),
|
|
181
172
|
resolveCompletionItem: supportsResolveDetails
|
|
@@ -214,19 +205,19 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
214
205
|
$registerDefinitionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
215
206
|
const languageSelector = this.toLanguageSelector(selector);
|
|
216
207
|
const definitionProvider = this.createDefinitionProvider(handle);
|
|
217
|
-
this.register(handle,
|
|
208
|
+
this.register(handle, monaco.languages.registerDefinitionProvider(languageSelector, definitionProvider));
|
|
218
209
|
}
|
|
219
210
|
|
|
220
211
|
$registerDeclarationProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
221
212
|
const languageSelector = this.toLanguageSelector(selector);
|
|
222
213
|
const declarationProvider = this.createDeclarationProvider(handle);
|
|
223
|
-
this.register(handle,
|
|
214
|
+
this.register(handle, monaco.languages.registerDeclarationProvider(languageSelector, declarationProvider));
|
|
224
215
|
}
|
|
225
216
|
|
|
226
217
|
$registerReferenceProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
227
218
|
const languageSelector = this.toLanguageSelector(selector);
|
|
228
219
|
const referenceProvider = this.createReferenceProvider(handle);
|
|
229
|
-
this.register(handle,
|
|
220
|
+
this.register(handle, monaco.languages.registerReferenceProvider(languageSelector, referenceProvider));
|
|
230
221
|
}
|
|
231
222
|
|
|
232
223
|
protected createReferenceProvider(handle: number): monaco.languages.ReferenceProvider {
|
|
@@ -257,8 +248,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
257
248
|
$registerSignatureHelpProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], metadata: theia.SignatureHelpProviderMetadata): void {
|
|
258
249
|
const languageSelector = this.toLanguageSelector(selector);
|
|
259
250
|
const signatureHelpProvider = this.createSignatureHelpProvider(handle, metadata);
|
|
260
|
-
this.register(handle,
|
|
261
|
-
(languageSelector, signatureHelpProvider));
|
|
251
|
+
this.register(handle, monaco.languages.registerSignatureHelpProvider(languageSelector, signatureHelpProvider));
|
|
262
252
|
}
|
|
263
253
|
|
|
264
254
|
$clearDiagnostics(id: string): void {
|
|
@@ -277,8 +267,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
277
267
|
$registerImplementationProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
278
268
|
const languageSelector = this.toLanguageSelector(selector);
|
|
279
269
|
const implementationProvider = this.createImplementationProvider(handle);
|
|
280
|
-
this.register(handle,
|
|
281
|
-
(languageSelector, implementationProvider));
|
|
270
|
+
this.register(handle, monaco.languages.registerImplementationProvider(languageSelector, implementationProvider));
|
|
282
271
|
}
|
|
283
272
|
|
|
284
273
|
protected createImplementationProvider(handle: number): monaco.languages.ImplementationProvider {
|
|
@@ -314,8 +303,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
314
303
|
$registerTypeDefinitionProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
315
304
|
const languageSelector = this.toLanguageSelector(selector);
|
|
316
305
|
const typeDefinitionProvider = this.createTypeDefinitionProvider(handle);
|
|
317
|
-
this.register(handle,
|
|
318
|
-
(languageSelector, typeDefinitionProvider));
|
|
306
|
+
this.register(handle, monaco.languages.registerTypeDefinitionProvider(languageSelector, typeDefinitionProvider));
|
|
319
307
|
}
|
|
320
308
|
|
|
321
309
|
protected createTypeDefinitionProvider(handle: number): monaco.languages.TypeDefinitionProvider {
|
|
@@ -351,7 +339,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
351
339
|
$registerHoverProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
352
340
|
const languageSelector = this.toLanguageSelector(selector);
|
|
353
341
|
const hoverProvider = this.createHoverProvider(handle);
|
|
354
|
-
this.register(handle,
|
|
342
|
+
this.register(handle, monaco.languages.registerHoverProvider(languageSelector, hoverProvider));
|
|
355
343
|
}
|
|
356
344
|
|
|
357
345
|
protected createHoverProvider(handle: number): monaco.languages.HoverProvider {
|
|
@@ -375,7 +363,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
375
363
|
const languageSelector = this.toLanguageSelector(selector);
|
|
376
364
|
const evaluatableExpressionProvider = this.createEvaluatableExpressionProvider(handle);
|
|
377
365
|
this.register(handle,
|
|
378
|
-
(StandaloneServices.get(ILanguageFeaturesService).evaluatableExpressionProvider.register
|
|
366
|
+
(StandaloneServices.get(ILanguageFeaturesService).evaluatableExpressionProvider.register)
|
|
379
367
|
(languageSelector, evaluatableExpressionProvider));
|
|
380
368
|
}
|
|
381
369
|
|
|
@@ -394,7 +382,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
394
382
|
const languageSelector = this.toLanguageSelector(selector);
|
|
395
383
|
const inlineValuesProvider = this.createInlineValuesProvider(handle);
|
|
396
384
|
this.register(handle,
|
|
397
|
-
(StandaloneServices.get(ILanguageFeaturesService).inlineValuesProvider.register
|
|
385
|
+
(StandaloneServices.get(ILanguageFeaturesService).inlineValuesProvider.register)
|
|
398
386
|
(languageSelector, inlineValuesProvider));
|
|
399
387
|
}
|
|
400
388
|
|
|
@@ -420,8 +408,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
420
408
|
$registerDocumentHighlightProvider(handle: number, _pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
421
409
|
const languageSelector = this.toLanguageSelector(selector);
|
|
422
410
|
const documentHighlightProvider = this.createDocumentHighlightProvider(handle);
|
|
423
|
-
this.register(handle,
|
|
424
|
-
(languageSelector, documentHighlightProvider));
|
|
411
|
+
this.register(handle, monaco.languages.registerDocumentHighlightProvider(languageSelector, documentHighlightProvider));
|
|
425
412
|
}
|
|
426
413
|
|
|
427
414
|
protected createDocumentHighlightProvider(handle: number): monaco.languages.DocumentHighlightProvider {
|
|
@@ -476,7 +463,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
476
463
|
$registerDocumentLinkProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
477
464
|
const languageSelector = this.toLanguageSelector(selector);
|
|
478
465
|
const linkProvider = this.createLinkProvider(handle);
|
|
479
|
-
this.register(handle,
|
|
466
|
+
this.register(handle, monaco.languages.registerLinkProvider(languageSelector, linkProvider));
|
|
480
467
|
}
|
|
481
468
|
|
|
482
469
|
protected createLinkProvider(handle: number): monaco.languages.LinkProvider {
|
|
@@ -525,7 +512,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
525
512
|
lensProvider.onDidChange = emitter.event;
|
|
526
513
|
}
|
|
527
514
|
|
|
528
|
-
this.register(handle,
|
|
515
|
+
this.register(handle, monaco.languages.registerCodeLensProvider(languageSelector, lensProvider));
|
|
529
516
|
}
|
|
530
517
|
|
|
531
518
|
protected createCodeLensProvider(handle: number): monaco.languages.CodeLensProvider {
|
|
@@ -567,7 +554,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
567
554
|
$registerOutlineSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], displayName?: string): void {
|
|
568
555
|
const languageSelector = this.toLanguageSelector(selector);
|
|
569
556
|
const symbolProvider = this.createDocumentSymbolProvider(handle, displayName);
|
|
570
|
-
this.register(handle,
|
|
557
|
+
this.register(handle, monaco.languages.registerDocumentSymbolProvider(languageSelector, symbolProvider));
|
|
571
558
|
}
|
|
572
559
|
|
|
573
560
|
protected createDocumentSymbolProvider(handle: number, displayName?: string): monaco.languages.DocumentSymbolProvider {
|
|
@@ -672,8 +659,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
672
659
|
$registerDocumentFormattingSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
673
660
|
const languageSelector = this.toLanguageSelector(selector);
|
|
674
661
|
const documentFormattingEditSupport = this.createDocumentFormattingSupport(handle, pluginInfo);
|
|
675
|
-
this.register(handle,
|
|
676
|
-
(languageSelector, documentFormattingEditSupport));
|
|
662
|
+
this.register(handle, monaco.languages.registerDocumentFormattingEditProvider(languageSelector, documentFormattingEditSupport));
|
|
677
663
|
}
|
|
678
664
|
|
|
679
665
|
createDocumentFormattingSupport(handle: number, pluginInfo: PluginInfo): monaco.languages.DocumentFormattingEditProvider {
|
|
@@ -695,8 +681,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
695
681
|
$registerRangeFormattingSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
696
682
|
const languageSelector = this.toLanguageSelector(selector);
|
|
697
683
|
const rangeFormattingEditProvider = this.createRangeFormattingSupport(handle, pluginInfo);
|
|
698
|
-
this.register(handle,
|
|
699
|
-
(languageSelector, rangeFormattingEditProvider));
|
|
684
|
+
this.register(handle, monaco.languages.registerDocumentRangeFormattingEditProvider(languageSelector, rangeFormattingEditProvider));
|
|
700
685
|
}
|
|
701
686
|
|
|
702
687
|
createRangeFormattingSupport(handle: number, pluginInfo: PluginInfo): monaco.languages.DocumentRangeFormattingEditProvider {
|
|
@@ -718,8 +703,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
718
703
|
$registerOnTypeFormattingProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], autoFormatTriggerCharacters: string[]): void {
|
|
719
704
|
const languageSelector = this.toLanguageSelector(selector);
|
|
720
705
|
const onTypeFormattingProvider = this.createOnTypeFormattingProvider(handle, autoFormatTriggerCharacters);
|
|
721
|
-
this.register(handle,
|
|
722
|
-
(languageSelector, onTypeFormattingProvider));
|
|
706
|
+
this.register(handle, monaco.languages.registerOnTypeFormattingEditProvider(languageSelector, onTypeFormattingProvider));
|
|
723
707
|
}
|
|
724
708
|
|
|
725
709
|
protected createOnTypeFormattingProvider(
|
|
@@ -747,11 +731,9 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
747
731
|
);
|
|
748
732
|
}
|
|
749
733
|
|
|
750
|
-
createDocumentDropEditProvider(handle: number,
|
|
734
|
+
createDocumentDropEditProvider(handle: number, metadata?: DocumentDropEditProviderMetadata): DocumentDropEditProvider {
|
|
751
735
|
return {
|
|
752
|
-
|
|
753
|
-
// id?: string;
|
|
754
|
-
// dropMimeTypes: metadata?.dropMimeTypes ?? ['*/*'],
|
|
736
|
+
dropMimeTypes: metadata?.dropMimeTypes ?? ['*/*'],
|
|
755
737
|
provideDocumentDropEdits: async (model, position, dataTransfer, token) => this.provideDocumentDropEdits(handle, model, position, dataTransfer, token)
|
|
756
738
|
};
|
|
757
739
|
}
|
|
@@ -772,7 +754,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
772
754
|
provider.onDidChange = emitter.event;
|
|
773
755
|
}
|
|
774
756
|
|
|
775
|
-
this.register(handle,
|
|
757
|
+
this.register(handle, monaco.languages.registerFoldingRangeProvider(languageSelector, provider));
|
|
776
758
|
}
|
|
777
759
|
|
|
778
760
|
createFoldingRangeProvider(handle: number): monaco.languages.FoldingRangeProvider {
|
|
@@ -796,7 +778,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
796
778
|
$registerSelectionRangeProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
797
779
|
const languageSelector = this.toLanguageSelector(selector);
|
|
798
780
|
const provider = this.createSelectionRangeProvider(handle);
|
|
799
|
-
this.register(handle,
|
|
781
|
+
this.register(handle, monaco.languages.registerSelectionRangeProvider(languageSelector, provider));
|
|
800
782
|
}
|
|
801
783
|
|
|
802
784
|
protected createSelectionRangeProvider(handle: number): monaco.languages.SelectionRangeProvider {
|
|
@@ -813,7 +795,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
813
795
|
$registerDocumentColorProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
814
796
|
const languageSelector = this.toLanguageSelector(selector);
|
|
815
797
|
const colorProvider = this.createColorProvider(handle);
|
|
816
|
-
this.register(handle,
|
|
798
|
+
this.register(handle, monaco.languages.registerColorProvider(languageSelector, colorProvider));
|
|
817
799
|
}
|
|
818
800
|
|
|
819
801
|
createColorProvider(handle: number): monaco.languages.DocumentColorProvider {
|
|
@@ -864,7 +846,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
864
846
|
this.register(eventHandle, emitter);
|
|
865
847
|
inlayHintsProvider.onDidChangeInlayHints = emitter.event;
|
|
866
848
|
}
|
|
867
|
-
this.register(handle,
|
|
849
|
+
this.register(handle, monaco.languages.registerInlayHintsProvider(languageSelector, inlayHintsProvider));
|
|
868
850
|
|
|
869
851
|
}
|
|
870
852
|
|
|
@@ -923,11 +905,11 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
923
905
|
context: monaco.languages.InlineCompletionContext,
|
|
924
906
|
token: CancellationToken
|
|
925
907
|
): Promise<IdentifiableInlineCompletions | undefined> => this.proxy.$provideInlineCompletions(handle, model.uri, position, context, token),
|
|
926
|
-
|
|
908
|
+
disposeInlineCompletions: (completions: IdentifiableInlineCompletions): void => {
|
|
927
909
|
this.proxy.$freeInlineCompletionsList(handle, completions.pid);
|
|
928
910
|
}
|
|
929
911
|
};
|
|
930
|
-
this.register(handle,
|
|
912
|
+
this.register(handle, monaco.languages.registerInlineCompletionsProvider(languageSelector, provider));
|
|
931
913
|
}
|
|
932
914
|
|
|
933
915
|
$registerQuickFixProvider(
|
|
@@ -1005,7 +987,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
1005
987
|
$registerRenameProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], supportsResolveLocation: boolean): void {
|
|
1006
988
|
const languageSelector = this.toLanguageSelector(selector);
|
|
1007
989
|
const renameProvider = this.createRenameProvider(handle, supportsResolveLocation);
|
|
1008
|
-
this.register(handle,
|
|
990
|
+
this.register(handle, monaco.languages.registerRenameProvider(languageSelector, renameProvider));
|
|
1009
991
|
}
|
|
1010
992
|
|
|
1011
993
|
protected createRenameProvider(handle: number, supportsResolveLocation: boolean): monaco.languages.RenameProvider {
|
|
@@ -1140,12 +1122,12 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
1140
1122
|
event = emitter.event;
|
|
1141
1123
|
}
|
|
1142
1124
|
const provider = this.createDocumentSemanticTokensProvider(handle, legend, event);
|
|
1143
|
-
this.register(handle,
|
|
1144
|
-
(languageSelector, provider));
|
|
1125
|
+
this.register(handle, monaco.languages.registerDocumentSemanticTokensProvider(languageSelector, provider));
|
|
1145
1126
|
}
|
|
1146
1127
|
|
|
1147
1128
|
protected createDocumentSemanticTokensProvider(handle: number, legend: theia.SemanticTokensLegend, event?: Event<void>): monaco.languages.DocumentSemanticTokensProvider {
|
|
1148
1129
|
return {
|
|
1130
|
+
onDidChange: event,
|
|
1149
1131
|
releaseDocumentSemanticTokens: resultId => {
|
|
1150
1132
|
if (resultId) {
|
|
1151
1133
|
this.proxy.$releaseDocumentSemanticTokens(handle, parseInt(resultId, 10));
|
|
@@ -1193,14 +1175,14 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
1193
1175
|
event = emitter.event;
|
|
1194
1176
|
}
|
|
1195
1177
|
const provider = this.createDocumentRangeSemanticTokensProvider(handle, legend, event);
|
|
1196
|
-
this.register(handle,
|
|
1197
|
-
(languageSelector, provider));
|
|
1178
|
+
this.register(handle, monaco.languages.registerDocumentRangeSemanticTokensProvider(languageSelector, provider));
|
|
1198
1179
|
}
|
|
1199
1180
|
|
|
1200
1181
|
protected createDocumentRangeSemanticTokensProvider(
|
|
1201
|
-
handle: number, legend: theia.SemanticTokensLegend,
|
|
1182
|
+
handle: number, legend: theia.SemanticTokensLegend, event?: Event<void>
|
|
1202
1183
|
): monaco.languages.DocumentRangeSemanticTokensProvider {
|
|
1203
1184
|
return {
|
|
1185
|
+
onDidChange: event,
|
|
1204
1186
|
getLegend: () => legend,
|
|
1205
1187
|
provideDocumentRangeSemanticTokens: async (model, range, token) => {
|
|
1206
1188
|
const encodedDto = await this.proxy.$provideDocumentRangeSemanticTokens(handle, model.uri, range, token);
|
|
@@ -1219,7 +1201,6 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
1219
1201
|
}
|
|
1220
1202
|
throw new Error('Unexpected');
|
|
1221
1203
|
},
|
|
1222
|
-
// @monaco-uplift onDidChange property is not yet available with the current monaco version, probably with the next monaco update then
|
|
1223
1204
|
};
|
|
1224
1205
|
}
|
|
1225
1206
|
|
|
@@ -1251,7 +1232,7 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
1251
1232
|
const languageSelector = this.toLanguageSelector(selector);
|
|
1252
1233
|
const linkedEditingRangeProvider = this.createLinkedEditingRangeProvider(handle);
|
|
1253
1234
|
this.register(handle,
|
|
1254
|
-
|
|
1235
|
+
monaco.languages.registerLinkedEditingRangeProvider(languageSelector, linkedEditingRangeProvider)
|
|
1255
1236
|
);
|
|
1256
1237
|
}
|
|
1257
1238
|
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
noopWidgetStatusBarContribution,
|
|
27
27
|
WidgetStatusBarContribution
|
|
28
28
|
} from '@theia/core/lib/browser';
|
|
29
|
-
import { MaybePromise, CommandContribution, ResourceResolver, bindRootContributionProvider, URI, generateUuid, PreferenceContribution } from '@theia/core/lib/common';
|
|
29
|
+
import { MaybePromise, CommandContribution, ResourceResolver, bindRootContributionProvider, URI, generateUuid, PreferenceContribution, nls } from '@theia/core/lib/common';
|
|
30
30
|
import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging';
|
|
31
31
|
import { HostedPluginSupport } from '../../hosted/browser/hosted-plugin';
|
|
32
32
|
import { HostedPluginWatcher } from '../../hosted/browser/hosted-plugin-watcher';
|
|
@@ -91,8 +91,10 @@ import { WebviewSecondaryWindowSupport } from './webview/webview-secondary-windo
|
|
|
91
91
|
import { CustomEditorUndoRedoHandler } from './custom-editors/custom-editor-undo-redo-handler';
|
|
92
92
|
import { CustomEditorNavigationContribution } from './custom-editors/custom-editor-navigation-contribution';
|
|
93
93
|
import { bindWebviewPreferences } from '../common/webview-preferences';
|
|
94
|
+
import { bindPluginHostEnvironmentPreferences } from '../common/plugin-host-environment-preferences';
|
|
94
95
|
import { WebviewFrontendPreferenceContribution } from './webview/webview-frontend-preference-contribution';
|
|
95
96
|
import { PluginExtToolbarItemArgumentProcessor } from './plugin-ext-argument-processor';
|
|
97
|
+
import { WorkspaceRestriction, WorkspaceRestrictionContribution } from '@theia/workspace/lib/browser/workspace-trust-service';
|
|
96
98
|
|
|
97
99
|
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
98
100
|
|
|
@@ -183,6 +185,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
|
183
185
|
})).inSingletonScope();
|
|
184
186
|
|
|
185
187
|
bindWebviewPreferences(bind);
|
|
188
|
+
bindPluginHostEnvironmentPreferences(bind);
|
|
186
189
|
bind(WebviewFrontendPreferenceContribution).toSelf().inSingletonScope();
|
|
187
190
|
bind(PreferenceContribution).toService(WebviewFrontendPreferenceContribution);
|
|
188
191
|
bind(WebviewEnvironment).toSelf().inSingletonScope();
|
|
@@ -298,4 +301,31 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
|
298
301
|
bind(PluginExtToolbarItemArgumentProcessor).toSelf().inSingletonScope();
|
|
299
302
|
bind(ArgumentProcessorContribution).toService(PluginExtToolbarItemArgumentProcessor);
|
|
300
303
|
|
|
304
|
+
bind(WorkspaceRestrictionContribution).toDynamicValue(ctx => {
|
|
305
|
+
const hostedPlugin = ctx.container.get(HostedPluginSupport);
|
|
306
|
+
return {
|
|
307
|
+
getRestrictions(): WorkspaceRestriction[] {
|
|
308
|
+
if (hostedPlugin.disabledByTrust.size === 0) {
|
|
309
|
+
return [];
|
|
310
|
+
}
|
|
311
|
+
return [{
|
|
312
|
+
label: nls.localize('theia/plugin-ext/extensionsRestrictedMode',
|
|
313
|
+
'Some extensions are disabled in Restricted Mode'),
|
|
314
|
+
details: Array.from(hostedPlugin.disabledByTrust)
|
|
315
|
+
}];
|
|
316
|
+
},
|
|
317
|
+
requiresReloadOnTrustChange(newTrust: boolean): boolean {
|
|
318
|
+
if (newTrust) {
|
|
319
|
+
// Granting trust: reload only if plugins were actually blocked.
|
|
320
|
+
return hostedPlugin.disabledByTrust.size > 0;
|
|
321
|
+
}
|
|
322
|
+
// Revoking trust: reload only if any loaded plugin declares supported: false,
|
|
323
|
+
// meaning it must be stopped now that the workspace is no longer trusted.
|
|
324
|
+
return hostedPlugin.plugins.some(
|
|
325
|
+
p => p.model.untrustedWorkspacesSupport === false
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
}).inSingletonScope();
|
|
330
|
+
|
|
301
331
|
});
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import * as React from '@theia/core/shared/react';
|
|
18
18
|
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
19
19
|
import { Message } from '@theia/core/shared/@lumino/messaging';
|
|
20
|
-
import { PluginMetadata } from '../../common/plugin-protocol';
|
|
20
|
+
import { PluginIdentifiers, PluginMetadata } from '../../common/plugin-protocol';
|
|
21
21
|
import { ReactWidget } from '@theia/core/lib/browser/widgets/react-widget';
|
|
22
22
|
import { AlertMessage } from '@theia/core/lib/browser/widgets/alert-message';
|
|
23
23
|
import { HostedPluginSupport, PluginProgressLocation } from '../../hosted/browser/hosted-plugin';
|
|
@@ -87,11 +87,18 @@ export class PluginWidget extends ReactWidget {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
private renderPlugin(plugin: PluginMetadata): JSX.Element {
|
|
90
|
-
|
|
90
|
+
const unversionedId = PluginIdentifiers.componentsToUnversionedId(plugin.model);
|
|
91
|
+
const isRestrictedByTrust = this.pluginService.disabledByTrust.has(unversionedId);
|
|
92
|
+
return <div key={plugin.model.name} className={this.createPluginClassName(plugin, isRestrictedByTrust)}>
|
|
91
93
|
<div className='column flexcontainer pluginInformationContainer'>
|
|
92
94
|
<div className='row flexcontainer'>
|
|
93
95
|
<div className={codicon('list-selection')}></div>
|
|
94
96
|
<div title={plugin.model.name} className='pluginName noWrapInfo'>{plugin.model.name}</div>
|
|
97
|
+
{isRestrictedByTrust && (
|
|
98
|
+
<span className='pluginRestrictedBadge' title={nls.localizeByDefault('Disabled in Restricted Mode')}>
|
|
99
|
+
{nls.localizeByDefault('Restricted Mode')}
|
|
100
|
+
</span>
|
|
101
|
+
)}
|
|
95
102
|
</div>
|
|
96
103
|
<div className='row flexcontainer'>
|
|
97
104
|
<div className='pluginVersion'>{plugin.model.version}</div>
|
|
@@ -106,8 +113,11 @@ export class PluginWidget extends ReactWidget {
|
|
|
106
113
|
</div>;
|
|
107
114
|
}
|
|
108
115
|
|
|
109
|
-
protected createPluginClassName(plugin: PluginMetadata): string {
|
|
116
|
+
protected createPluginClassName(plugin: PluginMetadata, isRestrictedByTrust: boolean = false): string {
|
|
110
117
|
const classNames = ['pluginHeaderContainer'];
|
|
118
|
+
if (isRestrictedByTrust) {
|
|
119
|
+
classNames.push('pluginDisabledByTrust');
|
|
120
|
+
}
|
|
111
121
|
return classNames.join(' ');
|
|
112
122
|
}
|
|
113
123
|
|
|
@@ -71,3 +71,16 @@
|
|
|
71
71
|
.plugins-tab-icon::before {
|
|
72
72
|
content: "\f0fe";
|
|
73
73
|
}
|
|
74
|
+
|
|
75
|
+
.theia-plugins .pluginHeaderContainer.pluginDisabledByTrust {
|
|
76
|
+
opacity: 0.6;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.theia-plugins .pluginRestrictedBadge {
|
|
80
|
+
font-size: var(--theia-ui-font-size0);
|
|
81
|
+
color: var(--theia-statusBarItem-prominentForeground);
|
|
82
|
+
background-color: var(--theia-statusBarItem-prominentBackground);
|
|
83
|
+
border-radius: 2px;
|
|
84
|
+
padding: calc(var(--theia-ui-padding) / 3 * 2);
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 STMicroelectronics and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { interfaces } from '@theia/core/shared/inversify';
|
|
18
|
+
import { PreferenceContribution, PreferenceSchema } from '@theia/core/lib/common/preferences';
|
|
19
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
20
|
+
|
|
21
|
+
export const SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF = 'extensions.supportNodeGlobalNavigator';
|
|
22
|
+
|
|
23
|
+
export const PluginHostEnvironmentPreferenceSchema: PreferenceSchema = {
|
|
24
|
+
properties: {
|
|
25
|
+
[SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF]: {
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
description: nls.localize('theia/plugin-ext/supportNodeGlobalNavigator',
|
|
28
|
+
'If enabled, the global navigator object in the extension host will be defined as provided by Node.js. '
|
|
29
|
+
+ 'Extensions may use the presence of the navigator object as a hint that code is running in a browser. '
|
|
30
|
+
+ 'Disabling this (the default) undefines the navigator in the extension host to preserve this assumption.'),
|
|
31
|
+
default: false,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Mutable state holder for the navigator preference, injected as a constant value
|
|
38
|
+
* so it can be safely resolved in connection-scoped containers (no async dependencies).
|
|
39
|
+
*/
|
|
40
|
+
export const PluginHostNavigatorState = Symbol('PluginHostNavigatorState');
|
|
41
|
+
export interface PluginHostNavigatorState {
|
|
42
|
+
supportNodeGlobalNavigator: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function bindPluginHostEnvironmentPreferences(bind: interfaces.Bind): void {
|
|
46
|
+
bind(PreferenceContribution).toConstantValue({ schema: PluginHostEnvironmentPreferenceSchema });
|
|
47
|
+
bind(PluginHostNavigatorState).toConstantValue({ supportNodeGlobalNavigator: false });
|
|
48
|
+
}
|
|
@@ -47,6 +47,8 @@ import { RemoteCliContribution } from '@theia/core/lib/node/remote/remote-cli-co
|
|
|
47
47
|
import { PluginRemoteCopyContribution } from './plugin-remote-copy-contribution';
|
|
48
48
|
import { RemoteCopyContribution } from '@theia/core/lib/node/remote/remote-copy-contribution';
|
|
49
49
|
import { bindWebviewPreferences } from '../common/webview-preferences';
|
|
50
|
+
import { bindPluginHostEnvironmentPreferences } from '../common/plugin-host-environment-preferences';
|
|
51
|
+
import { PluginHostNavigatorStateInitializer } from './plugin-host-navigator-state-initializer';
|
|
50
52
|
|
|
51
53
|
export function bindMainBackend(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void {
|
|
52
54
|
bind(PluginApiContribution).toSelf().inSingletonScope();
|
|
@@ -104,5 +106,7 @@ export function bindMainBackend(bind: interfaces.Bind, unbind: interfaces.Unbind
|
|
|
104
106
|
|
|
105
107
|
rebind(LocalizationServerImpl).to(PluginLocalizationServer).inSingletonScope();
|
|
106
108
|
bindWebviewPreferences(bind);
|
|
107
|
-
|
|
109
|
+
bindPluginHostEnvironmentPreferences(bind);
|
|
110
|
+
bind(PluginHostNavigatorStateInitializer).toSelf().inSingletonScope();
|
|
111
|
+
bind(BackendApplicationContribution).toService(PluginHostNavigatorStateInitializer);
|
|
108
112
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 STMicroelectronics and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
|
+
import { PreferenceService } from '@theia/core/lib/common/preferences';
|
|
19
|
+
import { BackendApplicationContribution } from '@theia/core/lib/node';
|
|
20
|
+
import { PluginHostNavigatorState, SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF } from '../common/plugin-host-environment-preferences';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Keeps {@link PluginHostNavigatorState} in sync with the navigator preference.
|
|
24
|
+
*
|
|
25
|
+
* `PreferenceService` has async dependencies and cannot be injected in
|
|
26
|
+
* connection-scoped containers. This contribution runs in the root container
|
|
27
|
+
* and mutates the shared state object by reference so that
|
|
28
|
+
* `HostedPluginProcess` (connection-scoped) always sees the latest value.
|
|
29
|
+
*/
|
|
30
|
+
@injectable()
|
|
31
|
+
export class PluginHostNavigatorStateInitializer implements BackendApplicationContribution {
|
|
32
|
+
|
|
33
|
+
@inject(PreferenceService)
|
|
34
|
+
protected readonly preferences: PreferenceService;
|
|
35
|
+
|
|
36
|
+
@inject(PluginHostNavigatorState)
|
|
37
|
+
protected readonly state: PluginHostNavigatorState;
|
|
38
|
+
|
|
39
|
+
onStart(): void {
|
|
40
|
+
this.state.supportNodeGlobalNavigator = this.preferences.get<boolean>(SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF, false);
|
|
41
|
+
this.preferences.onPreferenceChanged(e => {
|
|
42
|
+
if (e.preferenceName === SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF) {
|
|
43
|
+
this.state.supportNodeGlobalNavigator = this.preferences.get<boolean>(SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF, false);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
import { Emitter, WaitUntilEvent, AsyncEmitter, WaitUntilData } from '@theia/core/lib/common/event';
|
|
32
32
|
import { IRelativePattern, parse } from '@theia/core/lib/common/glob';
|
|
33
|
-
import { UriComponents } from '
|
|
33
|
+
import { UriComponents } from '../common/uri-components';
|
|
34
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';
|
|
@@ -28,14 +28,13 @@
|
|
|
28
28
|
/* eslint-disable @typescript-eslint/tslint/config */
|
|
29
29
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
30
30
|
|
|
31
|
-
import { UriComponents } from '
|
|
31
|
+
import { Schemes as Schemas, UriComponents } from '../common/uri-components';
|
|
32
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
37
|
import * as typeConverter from './type-converters';
|
|
38
|
-
import { Schemes as Schemas } from '../common/uri-components';
|
|
39
38
|
import { State, StateMachine, LinkComputer, Edge } from '../common/link-computer';
|
|
40
39
|
import { commonPrefixLength } from '@theia/core/lib/common/strings';
|
|
41
40
|
import { CharCode } from '@theia/core/lib/common/char-code';
|
package/src/plugin/types-impl.ts
CHANGED
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
import { UUID } from '@theia/core/shared/@lumino/coreutils';
|
|
25
25
|
import { illegalArgument } from '../common/errors';
|
|
26
26
|
import type * as theia from '@theia/plugin';
|
|
27
|
-
import { URI as CodeURI
|
|
27
|
+
import { URI as CodeURI } from '@theia/core/shared/vscode-uri';
|
|
28
|
+
import { UriComponents } from '../common/uri-components';
|
|
28
29
|
import { relative } from '../common/paths-util';
|
|
29
30
|
import { startsWithIgnoreCase } from '@theia/core/lib/common/strings';
|
|
30
31
|
import { SymbolKind } from '../common/plugin-api-rpc-model';
|