Class CodeLens

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

public class CodeLens extends JSONBase
A code lens represents a [command](#Command) that should be shown along with source text, like the number of references, a way to run tests, etc. A code lens is _unresolved_ when no command is associated to it. For performance reasons the creation of a code lens and resolving should be done to two stages.
  • Method Details

    • getRange

      public Range getRange()
      The range in which this code lens is valid. Should only span a single line.
    • setRange

      public CodeLens setRange(Range range)
    • getCommand

      public Command getCommand()
      The command this code lens represents.
    • setCommand

      public CodeLens setCommand(Command command)
    • getData

      public Object getData()
      An data entry field that is preserved on a code lens item between a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest] (#CodeLensResolveRequest).
    • setData

      public CodeLens setData(Object data)
    • equals

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

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

      public static CodeLens create(Range range, Object data)
      Creates a new CodeLens literal.