[英]How to add dependencies from Ivy to the Eclipse PDE Target Platform?
[英]Eclipse PDE : Programmatically read the contents of the target platform
在我的应用程序中,目标平台设置为包含除 eclipse 插件之外的一些自定义插件。 在应用程序的使用过程中,我想根据已安装的文件夹检查目标平台的内容,该文件夹应该包含我的自定义插件。
实际上,我想获得目标平台中所有包的列表(Eclipse 插件 + 我的自定义插件)。
我已经尝试在 ResourcesPlugin 和 PDEPlugin 中使用 getBundleContext() 但它只返回 eclipse bas 插件而不是我的自定义插件。
ITargetPlatformService service = PDECore.getDefault().acquireService(ITargetPlatformService.class);
for (TargetBundle targetBundle: service.getWorkspaceTargetDefinition().getBundles()) {
//then get name of plugin via targetBundle.getBundleInfo().getSymbolicName()
}
此代码的问题是您会收到类似于以下内容的警告:不鼓励访问:类型“PDECore”不是 API(限制所需库 '...\\eclipse-rcp-photon-R-win32-x86_64\\plugins\\org .eclipse.pde.core_3.12.0.v20180516-1159.jar')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.