Class FoldingRange


  • public class FoldingRange
    extends java.lang.Object
    Represents a folding range.

    Since 3.10.0

    • Constructor Summary

      Constructors 
      Constructor Description
      FoldingRange()  
      FoldingRange​(int startLine, int endLine)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getCollapsedText()
      The text that the client should show when the specified range is collapsed.
      java.lang.Integer getEndCharacter()
      The zero-based character offset before the folded range ends.
      int getEndLine()
      The zero-based line number where the folded range ends.
      java.lang.String getKind()
      Describes the kind of the folding range such as FoldingRangeKind.Comment or FoldingRangeKind.Region.
      java.lang.Integer getStartCharacter()
      The zero-based character offset from where the folded range starts.
      int getStartLine()
      The zero-based line number from where the folded range starts.
      int hashCode()  
      void setCollapsedText​(java.lang.String collapsedText)
      The text that the client should show when the specified range is collapsed.
      void setEndCharacter​(java.lang.Integer endCharacter)
      The zero-based character offset before the folded range ends.
      void setEndLine​(int endLine)
      The zero-based line number where the folded range ends.
      void setKind​(java.lang.String kind)
      Describes the kind of the folding range such as FoldingRangeKind.Comment or FoldingRangeKind.Region.
      void setStartCharacter​(java.lang.Integer startCharacter)
      The zero-based character offset from where the folded range starts.
      void setStartLine​(int startLine)
      The zero-based line number from where the folded range starts.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • FoldingRange

        public FoldingRange()
      • FoldingRange

        public FoldingRange​(int startLine,
                            int endLine)
    • Method Detail

      • getStartLine

        public int getStartLine()
        The zero-based line number from where the folded range starts.
      • setStartLine

        public void setStartLine​(int startLine)
        The zero-based line number from where the folded range starts.
      • getEndLine

        public int getEndLine()
        The zero-based line number where the folded range ends.
      • setEndLine

        public void setEndLine​(int endLine)
        The zero-based line number where the folded range ends.
      • getStartCharacter

        public java.lang.Integer getStartCharacter()
        The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
      • setStartCharacter

        public void setStartCharacter​(java.lang.Integer startCharacter)
        The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
      • getEndCharacter

        public java.lang.Integer getEndCharacter()
        The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
      • setEndCharacter

        public void setEndCharacter​(java.lang.Integer endCharacter)
        The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
      • setKind

        public void setKind​(java.lang.String kind)
        Describes the kind of the folding range such as FoldingRangeKind.Comment or FoldingRangeKind.Region. The kind is used to categorize folding ranges and used by commands like 'Fold all comments'. See FoldingRangeKind for an enumeration of standardized kinds.
      • getCollapsedText

        public java.lang.String getCollapsedText()
        The text that the client should show when the specified range is collapsed. If not defined or not supported by the client, a default will be chosen by the client.

        Since 3.17.0

      • setCollapsedText

        public void setCollapsedText​(java.lang.String collapsedText)
        The text that the client should show when the specified range is collapsed. If not defined or not supported by the client, a default will be chosen by the client.

        Since 3.17.0

      • 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