Package org.eclipse.lemminx.settings
Enum Class XMLFormattingOptions.MixedContent
java.lang.Object
java.lang.Enum<XMLFormattingOptions.MixedContent>
org.eclipse.lemminx.settings.XMLFormattingOptions.MixedContent
- All Implemented Interfaces:
Serializable,Comparable<XMLFormattingOptions.MixedContent>,Constable
- Enclosing class:
XMLFormattingOptions
public static enum XMLFormattingOptions.MixedContent
extends Enum<XMLFormattingOptions.MixedContent>
Controls how mixed content (text + child elements) is formatted.
normalize(default) — backward-compatible behavior. Collapses whitespace (including newlines) to single spaces within text nodes. Line breaks in whitespace-only gaps between sibling elements are preserved with normalized indentation. No block/inline element distinction. Use case:<p> text\n <b>bold</b> more </p>→<p> text <b>bold</b> more </p>(newline in text joined). Use case:<p> \n <b>bold</b>\n <i>more</i>\n </p>→ line breaks between elements preserved.reflow— smart wrapping. Collapses inline whitespace to a single space but preserves newlines within text nodes (unlikenormalizewhich collapses them). WhenmaxLineWidthis set, content soft-wraps at word and element boundaries. Block elements (those listed inblockElements) always start on their own line, and text after a block element starts on a new line. Use case:<p> text <b>bold</b> more </p>withmaxLineWidth=40→ wraps overflowing content to new lines.expand— always put each mixed content child on its own line (one child per line), regardless ofmaxLineWidth. Use case:<p> text <b>bold</b> </p>→<p> \n text\n <b>bold</b>\n </p>.preserve— don't reformat mixed content at all. Use case:<p> text <b>bold</b> more </p>→ unchanged.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static XMLFormattingOptions.MixedContent[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
normalize
-
reflow
-
expand
-
preserve
-
-
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
-