Class DocumentRange

java.lang.Object
io.deephaven.web.shared.ide.lsp.DocumentRange
All Implemented Interfaces:
Serializable

@JsType(namespace="dh.lsp", name="Range") public class DocumentRange extends Object implements Serializable
A range within a text document.

This is a JS-exposed model type (dh.lsp.Range) that closely follows the Language Server Protocol range shape.

See Also:
  • Field Details

    • start

      public Position start
      The start position of the range.
    • end

      public Position end
      The end position of the range.
  • Constructor Details

    • DocumentRange

      public DocumentRange()
    • DocumentRange

      @JsIgnore public DocumentRange(DocumentRange fixed)
    • DocumentRange

      @JsIgnore public DocumentRange(Position start, Position end)
    • DocumentRange

      @JsIgnore public DocumentRange(jsinterop.base.JsPropertyMap<Object> source)
  • Method Details

    • rangeFromSource

      @JsIgnore public static DocumentRange rangeFromSource(String source, int start, int length)
    • getOffsetFromPosition

      @JsIgnore public static int getOffsetFromPosition(String document, Position position)
    • getPositionFromOffset

      @JsIgnore public static Position getPositionFromOffset(String document, int offset)
    • toString

      @JsIgnore public String toString()
      Overrides:
      toString in class Object
    • equals

      @JsIgnore public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      @JsIgnore public int hashCode()
      Overrides:
      hashCode in class Object
    • decrementColumns

      @JsIgnore public void decrementColumns()
    • isInside

      public boolean isInside(Position innerStart, Position innerEnd)
      Checks whether the provided range is contained within this range.
      Parameters:
      innerStart - the start position to check
      innerEnd - the end position to check
      Returns:
      true if the provided range is inside this range