private StringBuilder stackToString(int index) {
StringBuilder result = new StringBuilder();
if (stacks == null || stacks.size() == 0)
return result;
Expression expr = stacks.get(index);
if (expr == null)
return result;
int level = stacks.size() - index - 1;
result.append("<stack level=\"");
result.append(String.valueOf(level));
result.append("\" lineno=\"");
result.append(expr.getLine());
result.append("\" type=\"file\" filename=\"");
result.append(getFileuri(expr.getSource()));
result.append("\" ");
// +
// "where=\"\" " +
result.append("cmdbegin=\"");
result.append(expr.getLine());
result.append(":");
result.append(expr.getColumn());
result.append("\" />");
// "cmdend=\""+(expr.getLine())+":"+(expr.getColumn()+1)+"\"/>";
return result;
}