Class IndentationStyle

java.lang.Object
io.jenkins.plugins.xmleditor.core.edit.IndentationStyle

public final class IndentationStyle extends Object
Indentation conventions of a document, used only to lay out new content.
  • Method Details

    • detect

      public static IndentationStyle detect(LDocument doc)
      Detects the indentation unit as the most frequent difference between a parent's and a child's indent.
    • unit

      public String unit()
    • indentOf

      public static String indentOf(LNode node)
      The whitespace before node on its line when the node starts a line, otherwise null. The root element and top-level nodes at the start of the file have an empty indentation.
    • childIndent

      public String childIndent(LElement parent)
      Indentation for children of parent: the one of its existing children, or the parent's plus a unit.