Enum Class XMLFormattingOptions.SplitAttributes

java.lang.Object
java.lang.Enum<XMLFormattingOptions.SplitAttributes>
org.eclipse.lemminx.settings.XMLFormattingOptions.SplitAttributes
All Implemented Interfaces:
Serializable, Comparable<XMLFormattingOptions.SplitAttributes>, Constable
Enclosing class:
XMLFormattingOptions

public static enum XMLFormattingOptions.SplitAttributes extends Enum<XMLFormattingOptions.SplitAttributes>
Controls how attributes are wrapped across lines. Values follow the same naming convention as VS Code's html.format.wrapAttributes for consistency, so users familiar with HTML formatting will recognize the behavior.

Legacy values splitNewLine and alignWithFirstAttr are kept for backward compatibility but are deprecated in favor of the new names.

  • Enum Constant Details

  • Method Details

    • values

      public static XMLFormattingOptions.SplitAttributes[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static XMLFormattingOptions.SplitAttributes valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<XMLFormattingOptions.SplitAttributes>
    • fromString

      public static XMLFormattingOptions.SplitAttributes fromString(String value)
      Parse a string value into a XMLFormattingOptions.SplitAttributes, supporting both camelCase enum names and hyphenated JSON names.
    • isAlwaysSplit

      public boolean isAlwaysSplit()
      Returns true if attributes should always be split regardless of line width.
    • isExpandFirstAttribute

      public boolean isExpandFirstAttribute()
      Returns true if the first attribute should also be placed on a new line.
    • isAlignWithFirstAttr

      public boolean isAlignWithFirstAttr()
      Returns true if attributes should align with the first attribute.
    • isPreserve

      public boolean isPreserve()
      Returns true if this mode preserves existing line breaks.
    • isSplitOnOverflow

      public boolean isSplitOnOverflow()
      Returns true if splitting is conditional on maxLineWidth overflow.