//get the number of errors
id = (String)rec.getParameters()[3];
int numbErrors = Integer.parseInt(id);
if(compiled){
return new DataBean(1, end - start, 1, start, end, 0, 0,0,0,0,0,0,0,0,0,0,0,0,0, EMPTY_BEAN);
}else{
return new DataBean(1, end - start, 0, start, end, 0, 0,0,0,0,0,0,0,0,0,0,0,0,0, EMPTY_BEAN);
}
}else if("SODBEANS_COMPILER_ERROR".equals(rec.getMessage())){
//get the type
String type = (String)rec.getParameters()[0];
DataBean.ErrorBean err;
if(type.equals("Cannot find symbol - variable")){
err= new DataBean.ErrorBean(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Expected closure")){
err = new DataBean.ErrorBean(1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Missing - return")){
err = new DataBean.ErrorBean(1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Cannot find symbol - method")){
err = new DataBean.ErrorBean(1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Missing main method")){
err = new DataBean.ErrorBean(1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Incompatible types")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Identifier expected")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Cannot find symbol - class")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Missing - if")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Missing - then")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Cannot find symbol - parent")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Cannot find symbol - package")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Invalid operator")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Unreachable statements")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Already defined")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("End of file error")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Circular inheritance")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Cannot inherit a from null")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Cannot override a private method")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Ambiguous inheritance")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Invalid overriding return type")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Ambigous method call")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Ambiguous used package")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Class already defined")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0);
}else if(type.equals("Invalid if expression")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0);
}else if(type.equals("Mismatched class template")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0);
}else if(type.equals("Cannot instantiate abstract class")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0);
}else if(type.equals("Cannot instantiate 'me'")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0);
}else if(type.equals("Cannot instantiate generic object")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0);
}else if(type.equals("Invalid error type")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0);
}else if(type.equals("Invalid return now")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0);
}else if(type.equals("Method already defined")){
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0);
}else{
err = new DataBean.ErrorBean(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1);
}
return new DataBean(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,err);
}else if("IDE_STARTUP".equals(rec.getMessage())){
return new DataBean(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, EMPTY_BEAN);
}else {
DataBean EMPTY = new DataBean(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, EMPTY_BEAN);
return EMPTY;
}
}