mirror of
https://github.com/sbt/sbt.git
synced 2026-09-03 01:23:37 +02:00
xsbti.Position: Also add {start,end}{Line,Column}
Positions in the Language Server Protocol and Build Server Protocol are line/column-based instead of offset-based, so this is more convenient. Computing the line/column from the offset is possible but requires reading the source file.
This commit is contained in:
@@ -22,4 +22,8 @@ public interface Position
|
||||
// Default values to avoid breaking binary compatibility
|
||||
default Optional<Integer> startOffset() { return Optional.empty(); }
|
||||
default Optional<Integer> endOffset() { return Optional.empty(); }
|
||||
default Optional<Integer> startLine() { return Optional.empty(); }
|
||||
default Optional<Integer> startColumn() { return Optional.empty(); }
|
||||
default Optional<Integer> endLine() { return Optional.empty(); }
|
||||
default Optional<Integer> endColumn() { return Optional.empty(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user