private static CharSequence toString(CsmFunction func) { StringBuilder sb = new StringBuilder(); sb.append(func.getClass().getSimpleName()); sb.append(' '); sb.append(func.getQualifiedName()); sb.append(" ["); // NOI18N sb.append(func.getContainingFile().getName()); sb.append(':'); sb.append(func.getStartPosition().getLine()); sb.append(']'); return sb; } }
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; }
buf.append("\n<br> "); // NOI18N buf.append(inc.getContainingFile().getAbsolutePath()); buf.append(i18n("PathToHeaderLine", inc.getStartPosition().getLine())); // 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
int gotoLine = decl.getStartPosition().getLine(); String gotoFile = decl.getContainingFile().getName().toString(); if (first) {
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
private void appendInclStack(StringBuilder buf, List<CsmInclude> includeStack) { if (!includeStack.isEmpty()) { buf.append("<i>").append(i18n("PathToCurFile")).append("</i>\n"); // NOI18N for (CsmInclude inc : includeStack) { if (inc != null) { final CsmFile file = inc.getContainingFile(); CharSequence path = null; if (file != null) { path = file.getAbsolutePath(); } if (path == null) { path = "?"; //NOI18N } final CsmOffsetable.Position startPosition = inc.getStartPosition(); int line = -1; if (startPosition != null) { line = startPosition.getLine(); } if (file != null && startPosition != null){ String msg = i18n("PathToHeaderOnLine", path.toString(), line); // NOI18N buf.append(msg).append('\n'); } } } } }
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; }
IncludeInfoImpl(CsmInclude include, CharSequence path) { this.line = include.getStartPosition().getLine(); this.include = include; this.path = path; }
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; } }