Package org.eclipse.lemminx.settings
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWrap when line exceedsmaxLineWidth, align with the first attribute.Deprecated.Wrap when line exceedsmaxLineWidth, indent withsplitAttributesIndentSize.Always wrap each attribute except the first, indent withsplitAttributesIndentSize.Always wrap each attribute except the first, align with the first attribute.Always wrap every attribute (including the first) onto its own line.Keep existing attribute layout; only wrap whenmaxLineWidthis exceeded.Preserve existing line breaks but align wrapped attributes with the first attribute.Deprecated.UseforceExpandMultilineinstead. -
Method Summary
Modifier and TypeMethodDescriptionfromString(String value) Parse a string value into aXMLFormattingOptions.SplitAttributes, supporting both camelCase enum names and hyphenated JSON names.booleanReturns true if attributes should align with the first attribute.booleanReturns true if attributes should always be split regardless of line width.booleanReturns true if the first attribute should also be placed on a new line.booleanReturns true if this mode preserves existing line breaks.booleanReturns true if splitting is conditional onmaxLineWidthoverflow.toString()Returns the enum constant of this class with the specified name.static XMLFormattingOptions.SplitAttributes[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
preserve
Keep existing attribute layout; only wrap whenmaxLineWidthis exceeded. -
splitNewLine
Deprecated.UseforceExpandMultilineinstead. -
alignWithFirstAttr
Deprecated.UseforceAlignedinstead. -
auto
Wrap when line exceedsmaxLineWidth, indent withsplitAttributesIndentSize. -
force
Always wrap each attribute except the first, indent withsplitAttributesIndentSize. -
forceAligned
Always wrap each attribute except the first, align with the first attribute. -
forceExpandMultiline
Always wrap every attribute (including the first) onto its own line. -
alignedMultiple
Wrap when line exceedsmaxLineWidth, align with the first attribute. -
preserveAligned
Preserve existing line breaks but align wrapped attributes with the first attribute.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<XMLFormattingOptions.SplitAttributes>
-
fromString
Parse a string value into aXMLFormattingOptions.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 onmaxLineWidthoverflow.
-
forceAlignedinstead.