Community
Participate
Working Groups
I am using the following code: IPluginModelBase pluginModel = PluginRegistry.findModel(project); IBuildModel buildModel = pluginModel.getBuildModel(); buildModel is always null here. This is the only API I found to get IBuildModel. Am I missing something?
setBuildModel does not seem to be called from anywhere. This is also confirmed by bug 206051 (Unreferenced members report for org.eclipse.pde.core).
The method should have never been API. We do not keep an up to date build model, instead we create WorkspaceBuildModels internally when needed. There are no plans to change this behaviour. In 3.7 we should mark the method deprecated.
Created attachment 176128 [details] Patch The method is being used at org.eclipse.pde.internal.core - src - org.eclipse.pde.core ClasspathUtilCore getBuild(IPluginModelBase) org.eclipse.pde.internal.ui.wizards.imports - src - org.eclipse.pde.ui PluginImportWizardExpressPage addExtraPrerequisites(IPluginModelBase, ArrayList)
Created attachment 176177 [details] patch This patch adds API to PluginRegistry to create a new build model for a bundle (IPluginModelBase) in addition to deprecating the #getBuildModel() method. This avoids having to keep the build model and plug-in model in synch - clients may just create a build model on demand and manage it themselves.
Released. Fixed.