Class ColorPresentation

java.lang.Object
org.graalvm.tools.lsp.server.types.JSONBase
org.graalvm.tools.lsp.server.types.ColorPresentation

public class ColorPresentation extends JSONBase
  • Method Details

    • getLabel

      public String getLabel()
      The label of this color presentation. It will be shown on the color picker header. By default this is also the text that is inserted when selecting this color presentation.
    • setLabel

      public ColorPresentation setLabel(String label)
    • getTextEdit

      public TextEdit getTextEdit()
      An [edit](#TextEdit) which is applied to a document when selecting this presentation for the color. When `falsy` the [label](#ColorPresentation.label) is used.
    • setTextEdit

      public ColorPresentation setTextEdit(TextEdit textEdit)
    • getAdditionalTextEdits

      public List<TextEdit> getAdditionalTextEdits()
      An optional array of additional [text edits](#TextEdit) that are applied when selecting this color presentation. Edits must not overlap with the main [edit](#ColorPresentation.textEdit) nor with themselves.
    • setAdditionalTextEdits

      public ColorPresentation setAdditionalTextEdits(List<TextEdit> additionalTextEdits)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • create

      public static ColorPresentation create(String label, TextEdit textEdit, List<TextEdit> additionalTextEdits)
      Creates a new ColorInformation literal.