Package io.deephaven.lang.parse
Class LspTools
java.lang.Object
io.deephaven.lang.parse.LspTools
LspTools:
This class is where we'll dump all the static "manipulate lsp-related objects".
These methods used to be instance methods on hand-maintained mutable objects,
Now, they are static utilities operating on grpc-generated immutable objects/builders.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Position
static int
extend
(Position.Builder p, PositionOrBuilder requested) static int
getOffsetFromPosition
(String document, Position position) static int
getOffsetFromPosition
(String document, PositionOrBuilder position) static Position.Builder
getPositionFromOffset
(String document, int offset) static boolean
static boolean
static boolean
isInside
(DocumentRangeOrBuilder range, PositionOrBuilder innerStart, PositionOrBuilder innerEnd) static boolean
lessOrEqual
(PositionOrBuilder p, PositionOrBuilder start) static boolean
lessThan
(PositionOrBuilder p, PositionOrBuilder start) static Position
static Position
static DocumentRange.Builder
rangeFromSource
(String source, int start, int length)
-
Constructor Details
-
LspTools
public LspTools()
-
-
Method Details
-
getOffsetFromPosition
-
lessThan
-
lessOrEqual
-
greaterThan
-
greaterOrEqual
-
extend
-
plus
-
minus
-
copy
-
isInside
public static boolean isInside(DocumentRangeOrBuilder range, PositionOrBuilder innerStart, PositionOrBuilder innerEnd) -
rangeFromSource
-
getOffsetFromPosition
-
getPositionFromOffset
-