level = Message.ERROR;
else if (cps.equals(CompilerProblemSeverity.WARNING))
level = Message.WARNING;
else
break; // skip if IGNORE?
CompilerMessage msg = new CompilerMessage(level,
prob.getSourcePath(),
prob.getLine() + 1,
prob.getColumn());
try
{
String errText = (String) aClass.getField("DESCRIPTION").get(aClass);
while (errText.contains("${"))
{
int start = errText.indexOf("${");
int end = errText.indexOf("}", start);
String token = errText.substring(start + 2, end);
String value = (String) aClass.getField(token).get(prob);
token = "${" + token + "}";
errText = errText.replace(token, value);
}
msg.setMessage(errText);
}
catch (IllegalArgumentException e1)
{
// TODO Auto-generated catch block
e1.printStackTrace();