public int getStartLine() { return context.getLine(startoffset); }
/** * Returns a multi line message that includes the manifest extract that gave * rise to the problem. * * @return a multi line string */ public String toStringWithContext() { int relevantLine = context.getLine(startoffset); String relevantLineData = context.getLineAsString(relevantLine); String theMessage = problemKind.format(context.getLine(startoffset), context.getColumn(startoffset), inserts); StringBuilder beautifulMessage = new StringBuilder(); beautifulMessage.append(relevantLineData); int scol = context.getColumn(startoffset); int ecol = context.getColumn(endoffset); int where = 0; for (where = 0; where < scol; where++) { beautifulMessage.append(' '); } beautifulMessage.append('^'); if (ecol != scol) { where++; for (; where < ecol; where++) { beautifulMessage.append(' '); } beautifulMessage.append('^'); } beautifulMessage.append('\n'); beautifulMessage.append(theMessage); return beautifulMessage.toString(); }
public int getEndLine() { return context.getLine(endoffset); }
@Override public String toString() { return problemKind.format(context.getLine(startoffset), context.getColumn(startoffset), inserts); }