@Override @Pure public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Range other = (Range) obj; if (this.start == null) { if (other.start != null) return false; } else if (!this.start.equals(other.start)) return false; if (this.end == null) { if (other.end != null) return false; } else if (!this.end.equals(other.end)) return false; return true; }
@Override @Pure public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Range other = (Range) obj; if (this.start == null) { if (other.start != null) return false; } else if (!this.start.equals(other.start)) return false; if (this.end == null) { if (other.end != null) return false; } else if (!this.end.equals(other.end)) return false; return true; }
/** * {@code true} if the {@link Position position} is either inside or on the * border of the {@link Range range}. Otherwise, {@code false}. */ public static boolean containsPosition(Range range, Position position) { Preconditions.checkNotNull(range, "range"); Preconditions.checkNotNull(position, "position"); return (range.getStart().equals(position) || Positions.isBefore(range.getStart(), position) && (range.getEnd().equals(position) || Positions.isBefore(position, range.getEnd()))); }
@Override @Pure public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; if (!super.equals(obj)) return false; DocumentOnTypeFormattingParams other = (DocumentOnTypeFormattingParams) obj; if (this.position == null) { if (other.position != null) return false; } else if (!this.position.equals(other.position)) return false; if (this.ch == null) { if (other.ch != null) return false; } else if (!this.ch.equals(other.ch)) return false; return true; }
@Override @Pure public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; TextDocumentPositionParams other = (TextDocumentPositionParams) obj; if (this.textDocument == null) { if (other.textDocument != null) return false; } else if (!this.textDocument.equals(other.textDocument)) return false; if (this.uri == null) { if (other.uri != null) return false; } else if (!this.uri.equals(other.uri)) return false; if (this.position == null) { if (other.position != null) return false; } else if (!this.position.equals(other.position)) return false; return true; }
@Override @Pure public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; if (!super.equals(obj)) return false; DocumentOnTypeFormattingParams other = (DocumentOnTypeFormattingParams) obj; if (this.position == null) { if (other.position != null) return false; } else if (!this.position.equals(other.position)) return false; if (this.ch == null) { if (other.ch != null) return false; } else if (!this.ch.equals(other.ch)) return false; return true; }
/** * {@code true} if the {@link Position position} is either inside or on the * border of the {@link Range range}. Otherwise, {@code false}. */ public static boolean containsPosition(Range range, Position position) { Preconditions.checkNotNull(range, "range"); Preconditions.checkNotNull(position, "position"); return (range.getStart().equals(position) || Positions.isBefore(range.getStart(), position) && (range.getEnd().equals(position) || Positions.isBefore(position, range.getEnd()))); }
@Override @Pure public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; TextDocumentPositionParams other = (TextDocumentPositionParams) obj; if (this.textDocument == null) { if (other.textDocument != null) return false; } else if (!this.textDocument.equals(other.textDocument)) return false; if (this.uri == null) { if (other.uri != null) return false; } else if (!this.uri.equals(other.uri)) return false; if (this.position == null) { if (other.position != null) return false; } else if (!this.position.equals(other.position)) return false; return true; }
@Override @Pure public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; RenameParams other = (RenameParams) obj; if (this.textDocument == null) { if (other.textDocument != null) return false; } else if (!this.textDocument.equals(other.textDocument)) return false; if (this.position == null) { if (other.position != null) return false; } else if (!this.position.equals(other.position)) return false; if (this.newName == null) { if (other.newName != null) return false; } else if (!this.newName.equals(other.newName)) return false; return true; }
@Override @Pure public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; RenameParams other = (RenameParams) obj; if (this.textDocument == null) { if (other.textDocument != null) return false; } else if (!this.textDocument.equals(other.textDocument)) return false; if (this.position == null) { if (other.position != null) return false; } else if (!this.position.equals(other.position)) return false; if (this.newName == null) { if (other.newName != null) return false; } else if (!this.newName.equals(other.newName)) return false; return true; }
boolean emptyRange = problem.getRange().getStart().equals(problem.getRange().getEnd()); String actualBadSnippet = emptyRange ? getCharAt(problem.getRange().getStart())