Class TextDocumentUtil

java.lang.Object
com.pnfsoftware.jeb.core.output.text.TextDocumentUtil

public class TextDocumentUtil extends Object
Utility methods for ITextDocument and ITextDocumentPart.
  • Method Details

    • getText

      public static String getText(ITextDocument doc)
      Get the text buffer of a text document.
      Parameters:
      doc - source document
      Returns:
      the complete textual contents of the document
    • buildText

      public static StringBuilder buildText(ITextDocument doc)
      Build the text buffer held in a text document.
      Parameters:
      doc - source document
      Returns:
      a newly built buffer containing the document text
    • buildText

      public static StringBuilder buildText(ITextDocument doc, int maxLineCount)
      Build the text buffer held in a text document.
      Parameters:
      doc - source document
      maxLineCount - maximum number of lines to include
      Returns:
      a newly built buffer containing the requested document text
    • buildText

      public static StringBuilder buildText(ITextDocumentPart part)
      Build the text buffer held in a document part.
      Parameters:
      part - source document part
      Returns:
      a newly built buffer containing the part text
    • buildText

      public static StringBuilder buildText(ITextDocumentPart part, int maxLineCount)
      Build the text buffer held in a document part.
      Parameters:
      part - source document part
      maxLineCount - maximum number of lines to include
      Returns:
      a newly built buffer containing the requested part text