ParserError parserError = (ParserError) error;
// TODO try to retrieve character start-end
markers.add( new DroolsBuildMarker( parserError.getMessage(),
parserError.getRow() ) );
} else if ( error instanceof FunctionError ) {
FunctionError functionError = (FunctionError) error;
// TODO add line to function error
// TODO try to retrieve character start-end
if ( functionError.getObject() instanceof CompilationProblem[] ) {
CompilationProblem[] problems = (CompilationProblem[]) functionError.getObject();
for ( int j = 0; j < problems.length; j++ ) {
markers.add( new DroolsBuildMarker( problems[j].getMessage(),
functionError.getErrorLines()[j] ) );
}
} else {
markers.add( new DroolsBuildMarker( functionError.getFunctionDescr().getName() + ":" + functionError.getMessage(),
-1 ) );
}
} else if ( error instanceof FieldTemplateError ) {
markers.add( new DroolsBuildMarker( error.getMessage(),
((FieldTemplateError) error).getLine() ) );