Module jEdit

Class ExplicitFoldHandler

java.lang.Object
org.gjt.sp.jedit.buffer.FoldHandler
org.gjt.sp.jedit.buffer.ExplicitFoldHandler

public class ExplicitFoldHandler extends FoldHandler
A fold handler that folds lines based on markers ("{{{" and "}}}") embedded in the text.
Since:
jEdit 4.0pre1
Version:
$Id: ExplicitFoldHandler.java 25193 2020-04-11 17:02:18Z kpouer $
Author:
Slava Pestov
  • Constructor Details

    • ExplicitFoldHandler

      public ExplicitFoldHandler()
  • Method Details

    • getFoldLevel

      public int getFoldLevel(JEditBuffer buffer, int lineIndex, Segment seg)
      Returns the fold level of the specified line.
      Specified by:
      getFoldLevel in class FoldHandler
      Parameters:
      buffer - The buffer in question
      lineIndex - The line index
      seg - A segment the fold handler can use to obtain any text from the buffer, if necessary
      Returns:
      The fold level of the specified line
      Since:
      jEdit 4.0pre1