Class Positions

java.lang.Object
org.eclipse.jface.text.source.inlined.Positions

public class Positions extends Object
Utilities class to retrieve position.
Since:
3.13
  • Constructor Details

    • Positions

      public Positions()
  • Method Details

    • of

      public static Position of(int lineIndex, IDocument document, boolean leadingSpaces) throws BadLocationException
      Returns the line position by taking care or not of of leading spaces.
      Parameters:
      lineIndex - the line index
      document - the document
      leadingSpaces - true if line spacing must take care of and not otherwise.
      Returns:
      the line position by taking care of leading spaces.
      Throws:
      BadLocationException - if the line number is invalid in this document