public long getPosition() { return d.getPosition(); }
@Override public long getPosition() { return delegate.getPosition(); }
public long getPosition() { return d.getPosition(); }
@Override public long getPosition() { long ret = this.delegate.getPosition(); if (delegate.hasFixedPositions()) { ret+=currentDelta; } return ret; }
public String formatPosition(JCDiagnostic d, PositionKind pk,Locale l) { Assert.check(d.getPosition() != Position.NOPOS); return String.valueOf(getPosition(d, pk)); } //where
public String formatPosition(JCDiagnostic d, PositionKind pk,Locale l) { Assert.check(d.getPosition() != Position.NOPOS); return String.valueOf(getPosition(d, pk)); } //where
@Override public void report( JCDiagnostic jcDiagnostic ) { if( jcDiagnostic. getCode().equals( "compiler.err.illegal.esc.char" ) ) { String source = getSource( jcDiagnostic ); int pos = (int)jcDiagnostic.getPosition(); char escaped = source.charAt( pos ); if( escaped == '$' ) { _escapedPos.add( pos ); return; } } prev.report( jcDiagnostic ); }
public String formatDiagnostic(JCDiagnostic d, Locale l) { try { StringBuilder buf = new StringBuilder(); if (d.getPosition() != Position.NOPOS) { buf.append(formatSource(d, false, null)); buf.append(':'); buf.append(formatPosition(d, LINE, null)); buf.append(':'); buf.append(formatPosition(d, COLUMN, null)); buf.append(':'); } else if (d.getSource() != null && d.getSource().getKind() == JavaFileObject.Kind.CLASS) { buf.append(formatSource(d, false, null)); buf.append(":-:-:"); } else buf.append('-'); buf.append(' '); buf.append(formatMessage(d, null)); if (displaySource(d)) { buf.append("\n"); buf.append(formatSourceLine(d, 0)); } return buf.toString(); } catch (Exception e) { //e.printStackTrace(); return null; } }
public String formatDiagnostic(JCDiagnostic d, Locale l) { try { StringBuilder buf = new StringBuilder(); if (d.getPosition() != Position.NOPOS) { buf.append(formatSource(d, false, null)); buf.append(':'); buf.append(formatPosition(d, LINE, null)); buf.append(':'); buf.append(formatPosition(d, COLUMN, null)); buf.append(':'); } else if (d.getSource() != null && d.getSource().getKind() == JavaFileObject.Kind.CLASS) { buf.append(formatSource(d, false, null)); buf.append(":-:-:"); } else buf.append('-'); buf.append(' '); buf.append(formatMessage(d, null)); if (displaySource(d)) { buf.append("\n"); buf.append(formatSourceLine(d, 0)); } return buf.toString(); } catch (Exception e) { //e.printStackTrace(); return null; } }