private Location getCurrentLocation() { return Location.create(this.fileName, this.locator.getLineNumber(), this.locator.getColumnNumber()); }
/** * Create a new {@link Location} with the given file path and line. * * @param path * path of the new {@link Location}. * @param line * the line number the new {@link Location}, must be * <code>>=0</code>. * @param column * column number the new {@link Location}, must be * <code>>=0</code>. * @return the new {@link Location}. */ public static Location create(final String path, final int line, final int column) { validateLine(line); validateColumn(column); return new Location(path, line, column); }
/** * Create a new {@link Location} with the given file path and line. * * @param path * path of the new {@link Location}. * @param line * line number of the new {@link Location}, must be * <code>>=0</code>. * @return the new {@link Location}. */ public static Location create(final String path, final int line) { validateLine(line); return new Location(path, line, NO_COLUMN); }
private void handleStartElement(final TreeElement elem) { this.listener.beginSpecificationItem(); this.locationBuilder = Location.builder() // .path(this.file.getPath()) // .line(elem.getLocation().getLine()); this.idBuilder = new SpecificationItemId.Builder() // .artifactType(this.defaultDoctype); this.handler.pushDelegate(new SingleSpecObjectsHandlerBuilder(this.listener, this.idBuilder, this.locationBuilder).build()); }
private static String format(final Location location, final boolean asSpan) { if ((location != null) && !location.getPath().isEmpty()) { return formatNonEmptyLocation(location, asSpan); } else { return ""; } }
/** * Build a {@link Location} instance * * @return the location */ public Location build() { return new Location(this); }
@Generated(value = "org.eclipse.Eclipse") @Override public final int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.comment == null) ? 0 : this.comment.hashCode()); result = prime * result + ((this.coveredIds == null) ? 0 : this.coveredIds.hashCode()); result = prime * result + ((this.dependOnIds == null) ? 0 : this.dependOnIds.hashCode()); result = prime * result + ((this.description == null) ? 0 : this.description.hashCode()); result = prime * result + (this.forwards ? 1231 : 1237); result = prime * result + ((this.id == null) ? 0 : this.id.hashCode()); result = prime * result + ((this.location == null) ? 0 : this.location.hashCode()); result = prime * result + ((this.needsArtifactTypes == null) ? 0 : this.needsArtifactTypes.hashCode()); result = prime * result + ((this.rationale == null) ? 0 : this.rationale.hashCode()); result = prime * result + ((this.status == null) ? 0 : this.status.hashCode()); result = prime * result + ((this.tags == null) ? 0 : this.tags.hashCode()); result = prime * result + ((this.title == null) ? 0 : this.title.hashCode()); return result; }
else if (!this.location.equals(other.location))
private void handleStartElement(final TreeElement elem) { this.listener.beginSpecificationItem(); this.locationBuilder = Location.builder() // .path(this.file.getPath()) // .line(elem.getLocation().getLine()); this.idBuilder = new SpecificationItemId.Builder() // .artifactType(this.defaultDoctype); this.handler.pushDelegate(new SingleSpecObjectsHandlerBuilder(this.listener, this.idBuilder, this.locationBuilder).build()); }
/** * Create a new {@link Location} with the given file path and line. * * @param path * path of the new {@link Location}. * @param line * line number of the new {@link Location}, must be * <code>>=0</code>. * @return the new {@link Location}. */ public static Location create(final String path, final int line) { validateLine(line); return new Location(path, line, NO_COLUMN); }
private static String format(final Location location, final boolean asSpan) { if ((location != null) && !location.getPath().isEmpty()) { return formatNonEmptyLocation(location, asSpan); } else { return ""; } }
/** * Build a {@link Location} instance * * @return the location */ public Location build() { return new Location(this); }
@Generated(value = "org.eclipse.Eclipse") @Override public final int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.comment == null) ? 0 : this.comment.hashCode()); result = prime * result + ((this.coveredIds == null) ? 0 : this.coveredIds.hashCode()); result = prime * result + ((this.dependOnIds == null) ? 0 : this.dependOnIds.hashCode()); result = prime * result + ((this.description == null) ? 0 : this.description.hashCode()); result = prime * result + (this.forwards ? 1231 : 1237); result = prime * result + ((this.id == null) ? 0 : this.id.hashCode()); result = prime * result + ((this.location == null) ? 0 : this.location.hashCode()); result = prime * result + ((this.needsArtifactTypes == null) ? 0 : this.needsArtifactTypes.hashCode()); result = prime * result + ((this.rationale == null) ? 0 : this.rationale.hashCode()); result = prime * result + ((this.status == null) ? 0 : this.status.hashCode()); result = prime * result + ((this.tags == null) ? 0 : this.tags.hashCode()); result = prime * result + ((this.title == null) ? 0 : this.title.hashCode()); return result; }
else if (!this.location.equals(other.location))
/** * Create a new {@link Location} with the given file path and line. * * @param path * path of the new {@link Location}. * @param line * the line number the new {@link Location}, must be * <code>>=0</code>. * @param column * column number the new {@link Location}, must be * <code>>=0</code>. * @return the new {@link Location}. */ public static Location create(final String path, final int line, final int column) { validateLine(line); validateColumn(column); return new Location(path, line, column); }
private Location getCurrentLocation() { return Location.create(this.fileName, this.locator.getLineNumber(), this.locator.getColumnNumber()); }
@Override public void setLocation(final String path, final int line) { this.setLocation(Location.create(path, line)); }