In my application, the target platform is set to contain some of my custom plugins apart from the eclipse plugins. During the application's usage, I want to check the contents of the target platform against an installed folder which is supposed to contain my custom plugins.
Effectively, I would like to get a list of all the bundles in the target platform (Eclipse plugins + my custom plugins).
I have tried using getBundleContext() in both ResourcesPlugin and PDEPlugin but that returns only the eclipse bas plugins and not my custom plugins.
ITargetPlatformService service = PDECore.getDefault().acquireService(ITargetPlatformService.class);
for (TargetBundle targetBundle: service.getWorkspaceTargetDefinition().getBundles()) {
//then get name of plugin via targetBundle.getBundleInfo().getSymbolicName()
}
The problem with this code is that you get a warning similar to: Discouraged access: The type 'PDECore' is not API (restriction on required library '...\\eclipse-rcp-photon-R-win32-x86_64\\plugins\\org.eclipse.pde.core_3.12.0.v20180516-1159.jar')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.