Eclipse 获取扩展点参与者的可读名称

Eclipse 获取扩展点参与者的可读名称,eclipse,eclipse-plugin,Eclipse,Eclipse Plugin,如何从IConfigurationElement获取人类可读的名称?我发现我可以使用element.getDeclaringExtension().getDeclaringPluginDescriptor().getLabel(),但是最后两个方法被标记为不推荐使用。有其他选择吗?假设元素是IConfigurationElement' 然后元素.getContributor().getName()让我们假设元素是IConfigurationElement' 然后element.getContri

如何从
IConfigurationElement
获取人类可读的名称?我发现我可以使用
element.getDeclaringExtension().getDeclaringPluginDescriptor().getLabel()
,但是最后两个方法被标记为不推荐使用。有其他选择吗?

假设元素是IConfigurationElement'
然后
元素.getContributor().getName()
让我们假设元素是IConfigurationElement'
然后
element.getContributor().getName()
要获取声明插件的名称(MANIFEST.MF中的捆绑包名称),请使用:

IConfigurationElement=。。。
字符串contributorName=element.getContributor().getName();
Bundle=Platform.getBundle(contributorName);
字符串bundleName=bundle.getHeaders().get(“bundle名称”);

要获取声明插件的名称(MANIFEST.MF中的捆绑包名称),请使用:

IConfigurationElement=。。。
字符串contributorName=element.getContributor().getName();
Bundle=Platform.getBundle(contributorName);
字符串bundleName=bundle.getHeaders().get(“bundle名称”);

是否需要
IConfigurationElement
本身的名称?或者声明它的插件的名称?或在该邻域中有许多
getName()
方法。您想要
IConfigurationElement
本身的名称吗?或者声明它的插件的名称?或在这个社区中有很多
getName()
方法。