获取扩展点贡献者的人类可读名称
Get human readable name of extension point contributor
如何从 IConfigurationElement
中获取人类可读的名称?我发现我可以使用 lement.getDeclaringExtension().getDeclaringPluginDescriptor().getLabel()
但是最后两种方法被标记为已弃用。有其他选择吗?
假设元素是 IConfigurationElement '
然后 element.getContributor().getName()
要获取声明插件的名称(MANIFEST.MF 中的 Bundle-Name),请使用:
IConfigurationElement element = ...
String contributorName = element.getContributor().getName();
Bundle bundle = Platform.getBundle(contributorName);
String bundleName = bundle.getHeaders().get("Bundle-Name");
如何从 IConfigurationElement
中获取人类可读的名称?我发现我可以使用 lement.getDeclaringExtension().getDeclaringPluginDescriptor().getLabel()
但是最后两种方法被标记为已弃用。有其他选择吗?
假设元素是 IConfigurationElement '
然后 element.getContributor().getName()
要获取声明插件的名称(MANIFEST.MF 中的 Bundle-Name),请使用:
IConfigurationElement element = ...
String contributorName = element.getContributor().getName();
Bundle bundle = Platform.getBundle(contributorName);
String bundleName = bundle.getHeaders().get("Bundle-Name");