Community
Participate
Working Groups
ManagedBuildManager has a static Map of IProject -> IManagedBuildInfo. This contains all the build state including IConfigurations for all open projects in the workspace. This, with the associated API, presents a number of problems: - No thread-safety / mutual exclusion. All clients of this API get the _same_ MBInfo with no way to safely edit the build configuration. - Synchronization with the project model is very complicated. There are enough call-backs / hooks (+ bugs) to confuse anyone. - Memory usage is unbounded. The cache never lets go of any of the build information, nor can it if users use this API - this is true even if users never build the project. - Editing the build info via the core model is the recommended way of doing this - and the way the MBS UI does it. Instead of editing the shared IConfiguration directly, plugins should do: ICProjectDescription desc = CoreModel.getDefault().getProjectDescription(IProject); ICConfigurationDescription cfgDesc = desc.getConfigurationById(id); ManagedBuildManager.getConfigurationForDescription(cfgDesc); ... <do some stuff with the IConfiguration> ... CoreModel.getDefault().setProjectDescription(IProject, desc);