* builder with this MCSProjectNature.
*
* @throws org.eclipse.core.runtime.CoreException Never thrown at present
*/
public void configure() throws CoreException {
IProjectDescription desc = getProject().getDescription();
ICommand[] commands = desc.getBuildSpec();
boolean found = false;
for (int i = 0; !found && (i < commands.length); i++) {
if (commands[i].getBuilderName().equals(BUILDER_ID)) {
found = true;
}
}
if (!found) {
ICommand command = desc.newCommand();
command.setBuilderName(BUILDER_ID);
ICommand[] newCommands = new ICommand[commands.length + 1];
// Add it before other builders.
System.arraycopy(commands, 0, newCommands, 1, commands.length);
newCommands[0] = command;
desc.setBuildSpec(newCommands);
getProject().setDescription(desc, null);
}
}