this.notifier = notifier;
this.debuglev = debuglev;
}
public void report(int kind, String message, SourceElement ...anchors) {
SourceElement anchor = anchors != null && anchors.length > 0 ? anchors[0] : null;
switch(kind) {
case KIND_FATAL:
case KIND_ERROR:
if(anchor != null && anchor.getResourceName() != null) {
notifier.error(anchor.getResourceName() + "," + anchor.getLine() + ": ");
}
notifier.error(message + "\n");
break;
case KIND_WARN:
if(anchor != null && anchor.getResourceName() != null) {
notifier.warn(anchor.getResourceName() + "," + anchor.getLine() + ": ");
}
notifier.warn(message + "\n");
break;
}
}