提交 373829a4 编写于 作者: P Pine Wu

Allow tree label to be set

上级 e88e3f00
......@@ -213,6 +213,7 @@ namespace schema {
export interface IExplorer {
treeContentProviderId: string;
treeLabel: string;
icon: IUserFriendlyIcon;
}
......@@ -224,6 +225,10 @@ namespace schema {
description: localize('vscode.extension.contributes.explorer.treeContentProviderId', 'Unique id used to identify provider registered through vscode.workspace.registerTreeContentProvider'),
type: 'string'
},
treeLabel: {
description: localize('vscode.extension.contributes.explorer.treeLabel', 'Human readable string used to render the custom tree Viewlet'),
type: 'string'
},
icon: {
description: localize('vscode.extension.contributes.explorer.icon', 'Icon to put on activity bar'),
type: 'string'
......@@ -335,13 +340,13 @@ ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyM
ExtensionsRegistry.registerExtensionPoint<schema.IExplorer>('explorer', schema.explorerContribtion).setHandler(extensions => {
for (let extension of extensions) {
const { treeContentProviderId, icon } = extension.value;
const { treeContentProviderId, treeLabel, icon } = extension.value;
Registry.as<ViewletRegistry>(ViewletExtensions.Viewlets).registerViewlet(new ViewletDescriptor(
'vs/workbench/parts/explorers/browser/treeExplorerViewlet',
'TreeExplorerViewlet',
'workbench.view.customViewlet.' + treeContentProviderId,
treeContentProviderId,
treeLabel,
treeContentProviderId,
125
));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册