protected CharSequence getPositionString() { StringBuilder sb = new StringBuilder(); sb.append('['); CsmFile containingFile = _getFile(false); if (containingFile == null) { sb.append(" NO CONTAINER ").append(fileUID);// NOI18N } else { sb.append(containingFile.getName()); } sb.append(' '); Position pos; pos = getStartPosition(); sb.append(pos.getLine()); sb.append(':'); sb.append(pos.getColumn()); sb.append('-'); pos = getEndPosition(); sb.append(pos.getLine()); sb.append(':'); sb.append(pos.getColumn()); sb.append(']'); return sb; }
assert uid != null; if (!(uid instanceof SelfPersistent)) { String line = " ["+decl.getStartPosition().getLine()+":"+decl.getStartPosition().getColumn()+"-"+ // NOI18N decl.getEndPosition().getLine()+":"+decl.getEndPosition().getColumn()+"]"; // NOI18N new Exception("attempt to put local declaration " + decl + line).printStackTrace(System.err); // NOI18N
if (startPosition.getOffset() >= 0 && endPosition.getOffset() >= 0 && startPosition.getOffset() <= endPosition.getOffset() && offsetable.getContainingFile() != null && endPosition.getOffset() < offsetable.getContainingFile().getText().length()) { line = " [" + startPosition.getLine() + ":" + startPosition.getColumn() + "-" + // NOI18N endPosition.getLine() + ":" + endPosition.getColumn() + "]"; // NOI18N } else { line = " bad position! [" + startPosition.getOffset() + "-" + endPosition.getOffset() + "]"; // NOI18N
public DocOffsPositionImpl(CsmOffsetable.Position pos) { if (pos != null) { this.line = pos.getLine(); this.col = pos.getColumn(); this.offset = pos.getOffset(); } else { this.line = -1; this.col = -1; this.offset = 0; } this.doc = null; }
public LineColOffsPositionImpl(CsmOffsetable.Position pos) { if (pos != null) { this.line = pos.getLine(); this.col = pos.getColumn(); this.offset = pos.getOffset(); } else { this.line = 0; this.col = 0; this.offset = 0; } }