【发布时间】:2017-01-19 16:56:48
【问题描述】:
我必须从 Eclipse 3.8 迁移到 4.6。 我的问题是,在 4.6(或更早版本)中,Platform.getPlugin() 已被弃用,并且将始终返回 null。 使用捆绑包代替插件对我没有帮助,因为在这种情况下,我们将不得不破坏我们的公共 API。 你知道是否有办法从捆绑包中获取插件?
/**
* As the org.eclipse.core.runtime.compatibility plug-in has been removed in
* Eclipse 4.6 this method is not supported anymore.
*
*/
@Deprecated
public static Plugin getPlugin(String id) {
return null;
}
【问题讨论】:
-
好吧
Plugin扩展BundleActivator。捆绑包的BundleContext确实包含对 BundleActivator 的引用,但似乎没有任何接口可以访问它。
标签: java eclipse eclipse-neon