I'm creating a C project programmatically using CDT:
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();
String projectName = projectNames[indices[i]];
IProject newProjectHandle = root.getProject(projectName.replace("Examples_", ""));
IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());
IProject project = CCorePlugin.getDefault().createCDTProject(description, newProjectHandle, new NullProgressMonitor());
ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
ICProjectDescription des = mngr.createProjectDescription(project, false);
ManagedProject mProj = new ManagedProject(des);
Configuration cfg = new Configuration(mProj, null, projectName + ".id", projectName);
cfg.setManagedBuildOn(false);
IBuilder bld = cfg.getEditableBuilder();
bld.setManagedBuildOn(false);
bld.setAutoBuildEnable(false);
CConfigurationData data = cfg.getConfigurationData();
des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
mngr.setProjectDescription(project, des);
This works exactly as creating a makefile project from the C wizard.
What I want now is to programatically untick the CDT builder from the project properties, or remove the builders from the Project properties.
Is there any easy way to do this by adding a line or two to my project creation code?
NOTE: Original post on Stack Overflow, http://stackoverflow.com/questions/40460427/programatically-disabling-the-cdt-builder-on-a-programatically-created-c-project, no conclusive answer as of yet.