public Integer getLineNumber() { return text != null ? location.getLine() : null; }
public Integer getLineNumber() { return text != null ? location.getLine() : null; }
public void appendLineBreak(SectionType currentType, Location position) { this.pos = new Location(1, position.getLine() + 1); switch (currentType) { case SCRIPTLET: out.append(sep); lineNumber++; break; case EXPR: out.append(sep); lineNumber++; break; default: throw new AssertionError(); } }
public void appendLineBreak(SectionType currentType, Location position) { this.pos = new Location(1, position.getLine() + 1); switch (currentType) { case SCRIPTLET: out.append(sep); lineNumber++; break; case EXPR: out.append(sep); lineNumber++; break; default: throw new AssertionError(); } }
int line = error.getLocation().getLine(); int from = line - 2; int to = line + 3;
int line = error.getLocation().getLine(); int from = line - 2; int to = line + 3;
builder.append(entry.getKey()).append(':'). append("new ").append(Foo.class.getName()).append("("). append("new ").append(Location.class.getName()).append("(").append(location.getCol()).append(',').append(location.getLine()).append("),"). append("'"); Tools.escape(text.getValue(), builder);
int templateLineNumber; if (item != null) { templateLineNumber = item.getPosition().getLine(); if (firstItem == null) { firstItem = item;
builder.append(entry.getKey()).append(':'). append("new ").append(Foo.class.getName()).append("("). append("new ").append(Location.class.getName()).append("(").append(location.getCol()).append(',').append(location.getLine()).append("),"). append("'"); Tools.escape(text.getValue(), builder);
int templateLineNumber; if (item != null) { templateLineNumber = item.getPosition().getLine(); if (firstItem == null) { firstItem = item;
controller, templateModel.getPath().getCanonical(), location.getLine(), location.getCol()); } else {
controller, templateModel.getPath().getCanonical(), location.getLine(), location.getCol()); } else {
ASTNode.Section section = (ASTNode.Section)block; ctx.openSection(section.getType(), section.getBeginPosition()); int lineNumber = section.getBegin().getPosition().getLine(); int colNumber = section.getBegin().getPosition().getCol(); String text = section.getText();
ASTNode.Section section = (ASTNode.Section)block; ctx.openSection(section.getType(), section.getBeginPosition()); int lineNumber = section.getBegin().getPosition().getLine(); int colNumber = section.getBegin().getPosition().getCol(); String text = section.getText();
private void fail(String route, int expectedCode, int index) { try { RouteParser.parse(route, new Collector()); throw failure("Was expecting route to fail at " + index); } catch (SyntaxException e) { assertEquals(expectedCode, e.getCode()); assertNotNull(e.getLocation()); assertEquals(index, e.getLocation().getCol()); assertEquals(1, e.getLocation().getLine()); } }
private void fail(String route, int expectedCode, int index) { try { RouteParser.parse(route, new Collector()); throw failure("Was expecting route to fail at " + index); } catch (SyntaxException e) { assertEquals(expectedCode, e.getCode()); assertNotNull(e.getLocation()); assertEquals(index, e.getLocation().getCol()); assertEquals(1, e.getLocation().getLine()); } }