* with default parameters
* @throws CoreException
*/
private void checkAndAddBuilder() throws CoreException{
ArrayList<ICommand> commandList=new ArrayList<ICommand>();
ICommand hdlCommand=null;
IProjectDescription description;
description = getProject().getDescription();
for(ICommand command: description.getBuildSpec()){
//try to find an existing builder in the list of builders
if(command.getBuilderName().startsWith(SIMULATOR_ID)){
hdlCommand=command;
}
commandList.add(command);
}
//if no hdl command was found
if(hdlCommand==null){
//make a new one
hdlCommand = description.newCommand();
hdlCommand.setBuilderName(SIMULATOR_ID);
//add it to the list of builders
commandList.add(hdlCommand);
//set the arguments
Map<String,String> args=BuildConfig.encodeArgs(new BuildConfig[]{new BuildConfig()});
hdlCommand.setArguments(args);
//set the builders
description.setBuildSpec(commandList.toArray(new ICommand[0]));
getProject().setDescription(description, null);
}