Class CompletionItem

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

@JsType(namespace="dh.lsp") public class CompletionItem extends Object implements Serializable
A completion suggestion for use by the IDE language tools.

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

See Also:
  • Field Details

    • label

      public String label
      The primary label to display for this completion item.
    • kind

      public int kind
      The kind of completion item (for example, method, variable, keyword), represented as an integer.
    • detail

      public String detail
      Additional detail text to display alongside label.
    • documentation

      public MarkupContent documentation
      Documentation for this completion item.
    • deprecated

      public boolean deprecated
      Whether this completion item is deprecated.
    • preselect

      public boolean preselect
      Whether this completion item should be preselected in completion UI.
    • textEdit

      public TextEdit textEdit
      The edit to apply to the document when this completion item is accepted.
    • sortText

      public String sortText
      Sort text for ordering completion items.
    • filterText

      public String filterText
      Filter text used to match this completion item against a query.
    • insertTextFormat

      public int insertTextFormat
      The insert text format (for example, plain text vs snippet), represented as an integer.
    • additionalTextEdits

      public elemental2.core.JsArray<TextEdit> additionalTextEdits
      Additional edits to apply when this completion item is accepted.
    • commitCharacters

      public elemental2.core.JsArray<String> commitCharacters
      Characters that commit this completion item if typed.
  • Constructor Details

    • CompletionItem

      public CompletionItem()
    • CompletionItem

      @JsIgnore public CompletionItem(int start, int length, String completion, String displayed, String source)
      This constructor matches CompletionFragment semantics; it is here to ease the transition to the LSP model.
    • CompletionItem

      @JsIgnore public CompletionItem(int start, int length, String completion, String displayed, DocumentRange range)
  • Method Details

    • sortText

      @JsIgnore public CompletionItem sortText(String sortText)
    • getStart

      @JsIgnore public int getStart()
      This is not used for monaco or lsp; it is only here for compatibility w/ swing autocomplete
    • setStart

      @JsIgnore public void setStart(int start)
    • getLength

      @JsIgnore public int getLength()
      This is not used for monaco or lsp; it is only here for compatibility w/ swing autocomplete
    • setLength

      @JsIgnore public void setLength(int length)
    • 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