protected Token makeToken(int t) { GroovySourceToken tok = new GroovySourceToken(t); tok.setColumn(inputState.getTokenStartColumn()); tok.setLine(inputState.getTokenStartLine()); tok.setColumnLast(inputState.getColumn()); tok.setLineLast(inputState.getLine()); return tok; }
public String toString() { return "[\"" + getText() + "\",<" + type + ">,"+ "line=" + line + ",col=" + col + ",lineLast=" + lineLast + ",colLast=" + colLast + "]"; }
private static List<String> getLinesFromToken(List<String> lines, GroovySourceToken gst) { List<String> newLines = new ArrayList<>(lines.subList(gst.getLine() - 1, gst.getLineLast())); int lastLineIndex = newLines.size() - 1; String lastLine = newLines.get(lastLineIndex).substring(0, gst.getColumnLast() - 1); newLines.set(lastLineIndex, lastLine); String firstLine = newLines.get(0).substring(gst.getColumn() - 1); newLines.set(0, firstLine); return newLines; }
GroovySourceToken gst = (GroovySourceToken) token; if (StringUtils.isNotBlank(text)) { tokens.add(new GroovyToken(token.getLine(), token.getColumn(), gst.getLineLast(), gst.getColumnLast(), getImage(token, text), typeOfText));
private int length(GroovySourceToken token) { int offset1 = codeArea.getDocument().position(token.getLine() - 1, token.getColumn() - 1).toOffset(); int offset2 = codeArea.getDocument().position(token.getLineLast() - 1, token.getColumnLast() - 1).toOffset(); return offset2 - offset1; }
protected Token makeToken(int t) { GroovySourceToken tok = new GroovySourceToken(t); tok.setColumn(inputState.getTokenStartColumn()); tok.setLine(inputState.getTokenStartLine()); tok.setColumnLast(inputState.getColumn()); tok.setLineLast(inputState.getLine()); return tok; }
public String toString() { return "[\"" + getText() + "\",<" + type + ">,"+ "line=" + line + ",col=" + col + ",lineLast=" + lineLast + ",colLast=" + colLast + "]"; }
protected Token makeToken(int t) { GroovySourceToken tok = new GroovySourceToken(t); tok.setColumn(inputState.getTokenStartColumn()); tok.setLine(inputState.getTokenStartLine()); tok.setColumnLast(inputState.getColumn()); tok.setLineLast(inputState.getLine()); return tok; }
public String toString() { return "[\"" + getText() + "\",<" + type + ">,"+ "line=" + line + ",col=" + col + ",lineLast=" + lineLast + ",colLast=" + colLast + "]"; }
protected Token makeToken(int t) { GroovySourceToken tok = new GroovySourceToken(t); tok.setColumn(inputState.getTokenStartColumn()); tok.setLine(inputState.getTokenStartLine()); tok.setColumnLast(inputState.getColumn()); tok.setLineLast(inputState.getLine()); return tok; }
public String toString() { return "[\"" + getText() + "\",<" + type + ">,"+ "line=" + line + ",col=" + col + ",lineLast=" + lineLast + ",colLast=" + colLast + "]"; }
protected Token makeToken(int t) { GroovySourceToken tok = new GroovySourceToken(t); tok.setColumn(inputState.getTokenStartColumn()); tok.setLine(inputState.getTokenStartLine()); tok.setColumnLast(inputState.getColumn()); tok.setLineLast(inputState.getLine()); return tok; }
public String toString() { return "[\"" + getText() + "\",<" + type + ">,"+ "line=" + line + ",col=" + col + ",lineLast=" + lineLast + ",colLast=" + colLast + "]"; }