Class CodeLens


  • public class CodeLens
    extends java.lang.Object
    A code lens represents a 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 Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      Command getCommand()
      The command this code lens represents.
      java.lang.Object getData()
      A data entry field that is preserved on a code lens item between a code lens and a code lens resolve request.
      Range getRange()
      The range in which this code lens is valid.
      int hashCode()  
      void setCommand​(Command command)
      The command this code lens represents.
      void setData​(java.lang.Object data)
      A data entry field that is preserved on a code lens item between a code lens and a code lens resolve request.
      void setRange​(Range range)
      The range in which this code lens is valid.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CodeLens

        public CodeLens()
      • CodeLens

        public CodeLens​(Range range)
      • CodeLens

        public CodeLens​(Range range,
                        Command command,
                        java.lang.Object data)
    • Method Detail

      • getRange

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

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

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

        public void setCommand​(Command command)
        The command this code lens represents.
      • getData

        public java.lang.Object getData()
        A data entry field that is preserved on a code lens item between a code lens and a code lens resolve request.
      • setData

        public void setData​(java.lang.Object data)
        A data entry field that is preserved on a code lens item between a code lens and a code lens resolve request.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object