@theia/plugin-ext 1.24.0-next.3 → 1.24.0-next.6
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 +2 -1
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- 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 +4 -3
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/plugin/languages.d.ts +1 -1
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/languages.js +6 -2
- package/lib/plugin/languages.js.map +1 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +2 -2
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +2 -1
- package/lib/plugin/type-converters.js.map +1 -1
- package/package.json +23 -23
- package/src/common/plugin-api-rpc.ts +2 -1
- package/src/main/browser/languages-main.ts +4 -3
- package/src/plugin/languages.ts +8 -2
- package/src/plugin/plugin-context.ts +3 -2
- package/src/plugin/type-converters.ts +2 -1
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-ext",
|
|
3
|
-
"version": "1.24.0-next.
|
|
3
|
+
"version": "1.24.0-next.6+7fd85c0991f",
|
|
4
4
|
"description": "Theia - Plugin Extension",
|
|
5
5
|
"main": "lib/common/index.js",
|
|
6
6
|
"typings": "lib/common/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@theia/bulk-edit": "1.24.0-next.
|
|
9
|
-
"@theia/callhierarchy": "1.24.0-next.
|
|
10
|
-
"@theia/console": "1.24.0-next.
|
|
11
|
-
"@theia/core": "1.24.0-next.
|
|
12
|
-
"@theia/debug": "1.24.0-next.
|
|
13
|
-
"@theia/editor": "1.24.0-next.
|
|
14
|
-
"@theia/file-search": "1.24.0-next.
|
|
15
|
-
"@theia/filesystem": "1.24.0-next.
|
|
16
|
-
"@theia/markers": "1.24.0-next.
|
|
17
|
-
"@theia/messages": "1.24.0-next.
|
|
18
|
-
"@theia/monaco": "1.24.0-next.
|
|
19
|
-
"@theia/navigator": "1.24.0-next.
|
|
20
|
-
"@theia/output": "1.24.0-next.
|
|
21
|
-
"@theia/plugin": "1.24.0-next.
|
|
22
|
-
"@theia/preferences": "1.24.0-next.
|
|
23
|
-
"@theia/scm": "1.24.0-next.
|
|
24
|
-
"@theia/search-in-workspace": "1.24.0-next.
|
|
25
|
-
"@theia/task": "1.24.0-next.
|
|
26
|
-
"@theia/terminal": "1.24.0-next.
|
|
27
|
-
"@theia/timeline": "1.24.0-next.
|
|
28
|
-
"@theia/workspace": "1.24.0-next.
|
|
8
|
+
"@theia/bulk-edit": "1.24.0-next.6+7fd85c0991f",
|
|
9
|
+
"@theia/callhierarchy": "1.24.0-next.6+7fd85c0991f",
|
|
10
|
+
"@theia/console": "1.24.0-next.6+7fd85c0991f",
|
|
11
|
+
"@theia/core": "1.24.0-next.6+7fd85c0991f",
|
|
12
|
+
"@theia/debug": "1.24.0-next.6+7fd85c0991f",
|
|
13
|
+
"@theia/editor": "1.24.0-next.6+7fd85c0991f",
|
|
14
|
+
"@theia/file-search": "1.24.0-next.6+7fd85c0991f",
|
|
15
|
+
"@theia/filesystem": "1.24.0-next.6+7fd85c0991f",
|
|
16
|
+
"@theia/markers": "1.24.0-next.6+7fd85c0991f",
|
|
17
|
+
"@theia/messages": "1.24.0-next.6+7fd85c0991f",
|
|
18
|
+
"@theia/monaco": "1.24.0-next.6+7fd85c0991f",
|
|
19
|
+
"@theia/navigator": "1.24.0-next.6+7fd85c0991f",
|
|
20
|
+
"@theia/output": "1.24.0-next.6+7fd85c0991f",
|
|
21
|
+
"@theia/plugin": "1.24.0-next.6+7fd85c0991f",
|
|
22
|
+
"@theia/preferences": "1.24.0-next.6+7fd85c0991f",
|
|
23
|
+
"@theia/scm": "1.24.0-next.6+7fd85c0991f",
|
|
24
|
+
"@theia/search-in-workspace": "1.24.0-next.6+7fd85c0991f",
|
|
25
|
+
"@theia/task": "1.24.0-next.6+7fd85c0991f",
|
|
26
|
+
"@theia/terminal": "1.24.0-next.6+7fd85c0991f",
|
|
27
|
+
"@theia/timeline": "1.24.0-next.6+7fd85c0991f",
|
|
28
|
+
"@theia/workspace": "1.24.0-next.6+7fd85c0991f",
|
|
29
29
|
"@types/mime": "^2.0.1",
|
|
30
30
|
"decompress": "^4.2.1",
|
|
31
31
|
"escape-html": "^1.0.3",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"nyc": {
|
|
91
91
|
"extends": "../../configs/nyc.json"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "7fd85c0991f4adc4bb79dd749aa8495df2aff1a3"
|
|
94
94
|
}
|
|
@@ -1402,6 +1402,7 @@ export interface ProcessTaskDto extends TaskDto, CommandProperties {
|
|
|
1402
1402
|
export interface PluginInfo {
|
|
1403
1403
|
id: string;
|
|
1404
1404
|
name: string;
|
|
1405
|
+
displayName?: string;
|
|
1405
1406
|
}
|
|
1406
1407
|
|
|
1407
1408
|
export interface LanguagesExt {
|
|
@@ -1503,7 +1504,7 @@ export interface LanguagesMain {
|
|
|
1503
1504
|
$registerDocumentLinkProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
|
|
1504
1505
|
$registerCodeLensSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], eventHandle?: number): void;
|
|
1505
1506
|
$emitCodeLensEvent(eventHandle: number, event?: any): void;
|
|
1506
|
-
$registerOutlineSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
|
|
1507
|
+
$registerOutlineSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], displayName?: string): void;
|
|
1507
1508
|
$registerWorkspaceSymbolProvider(handle: number, pluginInfo: PluginInfo): void;
|
|
1508
1509
|
$registerFoldingRangeProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
|
|
1509
1510
|
$registerSelectionRangeProvider(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void;
|
|
@@ -459,14 +459,15 @@ export class LanguagesMainImpl implements LanguagesMain, Disposable {
|
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
-
$registerOutlineSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[]): void {
|
|
462
|
+
$registerOutlineSupport(handle: number, pluginInfo: PluginInfo, selector: SerializedDocumentFilter[], displayName?: string): void {
|
|
463
463
|
const languageSelector = this.toLanguageSelector(selector);
|
|
464
|
-
const symbolProvider = this.createDocumentSymbolProvider(handle);
|
|
464
|
+
const symbolProvider = this.createDocumentSymbolProvider(handle, displayName);
|
|
465
465
|
this.register(handle, monaco.modes.DocumentSymbolProviderRegistry.register(languageSelector, symbolProvider));
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
protected createDocumentSymbolProvider(handle: number): monaco.languages.DocumentSymbolProvider {
|
|
468
|
+
protected createDocumentSymbolProvider(handle: number, displayName?: string): monaco.languages.DocumentSymbolProvider {
|
|
469
469
|
return {
|
|
470
|
+
displayName,
|
|
470
471
|
provideDocumentSymbols: (model, token) => this.provideDocumentSymbols(handle, model, token)
|
|
471
472
|
};
|
|
472
473
|
}
|
package/src/plugin/languages.ts
CHANGED
|
@@ -531,9 +531,11 @@ export class LanguagesExtImpl implements LanguagesExt {
|
|
|
531
531
|
// ### Code Reference Provider end
|
|
532
532
|
|
|
533
533
|
// ### Document Symbol Provider begin
|
|
534
|
-
registerDocumentSymbolProvider(selector: theia.DocumentSelector, provider: theia.DocumentSymbolProvider, pluginInfo: PluginInfo
|
|
534
|
+
registerDocumentSymbolProvider(selector: theia.DocumentSelector, provider: theia.DocumentSymbolProvider, pluginInfo: PluginInfo,
|
|
535
|
+
metadata?: theia.DocumentSymbolProviderMetadata): theia.Disposable {
|
|
535
536
|
const callId = this.addNewAdapter(new OutlineAdapter(this.documents, provider));
|
|
536
|
-
|
|
537
|
+
const displayName = (metadata && metadata.label) || getPluginLabel(pluginInfo);
|
|
538
|
+
this.proxy.$registerOutlineSupport(callId, pluginInfo, this.transformDocumentSelector(selector), displayName);
|
|
537
539
|
return this.createDisposable(callId);
|
|
538
540
|
}
|
|
539
541
|
|
|
@@ -700,3 +702,7 @@ function serializeIndentation(indentationRules?: theia.IndentationRule): Seriali
|
|
|
700
702
|
unIndentedLinePattern: serializeRegExp(indentationRules.unIndentedLinePattern)
|
|
701
703
|
};
|
|
702
704
|
}
|
|
705
|
+
|
|
706
|
+
function getPluginLabel(pluginInfo: PluginInfo): string {
|
|
707
|
+
return pluginInfo.displayName || pluginInfo.name;
|
|
708
|
+
}
|
|
@@ -752,8 +752,9 @@ export function createAPIFactory(
|
|
|
752
752
|
registerReferenceProvider(selector: theia.DocumentSelector, provider: theia.ReferenceProvider): theia.Disposable {
|
|
753
753
|
return languagesExt.registerReferenceProvider(selector, provider, pluginToPluginInfo(plugin));
|
|
754
754
|
},
|
|
755
|
-
registerDocumentSymbolProvider(selector: theia.DocumentSelector, provider: theia.DocumentSymbolProvider
|
|
756
|
-
|
|
755
|
+
registerDocumentSymbolProvider(selector: theia.DocumentSelector, provider: theia.DocumentSymbolProvider,
|
|
756
|
+
metadata?: theia.DocumentSymbolProviderMetadata): theia.Disposable {
|
|
757
|
+
return languagesExt.registerDocumentSymbolProvider(selector, provider, pluginToPluginInfo(plugin), metadata);
|
|
757
758
|
},
|
|
758
759
|
registerColorProvider(selector: theia.DocumentSelector, provider: theia.DocumentColorProvider): theia.Disposable {
|
|
759
760
|
return languagesExt.registerColorProvider(selector, provider, pluginToPluginInfo(plugin));
|
|
@@ -1217,6 +1217,7 @@ export function pathOrURIToURI(value: string | URI): URI {
|
|
|
1217
1217
|
export function pluginToPluginInfo(plugin: Plugin): rpc.PluginInfo {
|
|
1218
1218
|
return {
|
|
1219
1219
|
id: plugin.model.id,
|
|
1220
|
-
name: plugin.model.name
|
|
1220
|
+
name: plugin.model.name,
|
|
1221
|
+
displayName: plugin.model.displayName
|
|
1221
1222
|
};
|
|
1222
1223
|
}
|