eclipse rcp如何获取扩展名?

| 我的plugin.xml中有这样的扩展元素 如何获得扩展元素的名称属性?我看到IExtension接口没有提供获取名称或获取属性的方法。
<extension id=\"report\" name=\"报表库\" point=\"com.amarsoft.sysconfig.ep.dbtype\">
    <functions>
       <function entryPage=\"com.amarsoft.sysconfig.report.EntryPage\" id=\"ReportMng\" name=\"报表设置\">
       </function>
    </functions>
 </extension>
    
已邀请:
        您可以使用以下代码获取扩展名的name = \“ foo \”属性:
IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID);

for (IConfigurationElement element : elements) {
    IExtension ext = (IExtension) element.getParent();
    System.out.println(\"name=\" + ext.getLabel());
}
    

要回复问题请先登录注册