public class XMLFormattingOptions
extends org.eclipse.lsp4j.FormattingOptions
Modifier and Type | Class and Description |
---|---|
static class |
XMLFormattingOptions.EmptyElements
Options for formatting empty elements.
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
static EnforceQuoteStyle |
DEFAULT_ENFORCE_QUOTE_STYLE |
static boolean |
DEFAULT_PRESERVE_ATTR_LINE_BREAKS |
static int |
DEFAULT_PRESERVER_NEW_LINES |
static String |
DEFAULT_QUOTATION |
static int |
DEFAULT_SPLIT_ATTRIBUTES_INDENT_SIZE |
static int |
DEFAULT_TAB_SIZE |
static boolean |
DEFAULT_TRIM_TRAILING_SPACES |
Constructor and Description |
---|
XMLFormattingOptions() |
XMLFormattingOptions(boolean initializeDefaults)
Create an XMLFormattingOptions instance with the option to initialize default
values for all supported settings.
|
XMLFormattingOptions(org.eclipse.lsp4j.FormattingOptions options) |
XMLFormattingOptions(org.eclipse.lsp4j.FormattingOptions options,
boolean initializeDefaultSettings) |
XMLFormattingOptions(int tabSize,
boolean insertSpaces) |
XMLFormattingOptions(int tabSize,
boolean insertSpaces,
boolean initializeDefaultSettings) |
Modifier and Type | Method and Description |
---|---|
static XMLFormattingOptions |
create(org.eclipse.lsp4j.FormattingOptions options,
org.eclipse.lsp4j.FormattingOptions sharedFormattingOptions) |
XMLFormattingOptions.EmptyElements |
getEmptyElements() |
EnforceQuoteStyle |
getEnforceQuoteStyle() |
int |
getPreservedNewlines() |
int |
getSplitAttributesIndentSize()
Returns the value of splitAttributesIndentSize or zero if it was set to a negative value
|
boolean |
isEnabled() |
boolean |
isFormatComments() |
boolean |
isJoinCDATALines() |
boolean |
isJoinCommentLines() |
boolean |
isJoinContentLines() |
boolean |
isPreserveAttrLineBreaks()
Returns the value of preserveAttrLineBreaks
|
boolean |
isPreserveEmptyContent() |
boolean |
isSpaceBeforeEmptyCloseTag() |
boolean |
isSplitAttributes() |
boolean |
isTrimFinalNewlines()
Returns the value of trimFinalNewlines.
|
boolean |
isTrimTrailingWhitespace() |
XMLFormattingOptions |
merge(org.eclipse.lsp4j.FormattingOptions formattingOptions) |
void |
setEmptyElement(XMLFormattingOptions.EmptyElements emptyElement) |
void |
setEnabled(boolean enabled) |
void |
setEnforceQuoteStyle(EnforceQuoteStyle enforce) |
void |
setFormatComments(boolean formatComments) |
void |
setJoinCDATALines(boolean joinCDATALines) |
void |
setJoinCommentLines(boolean joinCommentLines) |
void |
setJoinContentLines(boolean joinContentLines) |
void |
setPreserveAttrLineBreaks(boolean preserveAttrLineBreaks)
Sets the value of preserveAttrLineBreaks
|
void |
setPreservedNewlines(int preservedNewlines) |
void |
setPreserveEmptyContent(boolean preserveEmptyContent) |
void |
setSpaceBeforeEmptyCloseTag(boolean spaceBeforeEmptyCloseTag) |
void |
setSplitAttributes(boolean splitAttributes) |
void |
setSplitAttributesIndentSize(int splitAttributesIndentSize)
Sets the value of splitAttributesIndentSize
|
void |
setTrimTrailingWhitespace(boolean newValue) |
getBoolean, getNumber, getProperties, getString, getTabSize, isInsertFinalNewline, isInsertSpaces, putBoolean, putNumber, putString, setInsertFinalNewline, setInsertSpaces, setProperties, setTabSize, setTrimFinalNewlines
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
public static final String DEFAULT_QUOTATION
public static final int DEFAULT_PRESERVER_NEW_LINES
public static final int DEFAULT_TAB_SIZE
public static final EnforceQuoteStyle DEFAULT_ENFORCE_QUOTE_STYLE
public static final boolean DEFAULT_PRESERVE_ATTR_LINE_BREAKS
public static final boolean DEFAULT_TRIM_TRAILING_SPACES
public static final int DEFAULT_SPLIT_ATTRIBUTES_INDENT_SIZE
public XMLFormattingOptions()
public XMLFormattingOptions(boolean initializeDefaults)
public XMLFormattingOptions(int tabSize, boolean insertSpaces, boolean initializeDefaultSettings)
public XMLFormattingOptions(int tabSize, boolean insertSpaces)
public XMLFormattingOptions(org.eclipse.lsp4j.FormattingOptions options, boolean initializeDefaultSettings)
public XMLFormattingOptions(org.eclipse.lsp4j.FormattingOptions options)
public boolean isSplitAttributes()
public void setSplitAttributes(boolean splitAttributes)
public boolean isJoinCDATALines()
public void setJoinCDATALines(boolean joinCDATALines)
public boolean isFormatComments()
public void setFormatComments(boolean formatComments)
public boolean isJoinCommentLines()
public void setJoinCommentLines(boolean joinCommentLines)
public boolean isJoinContentLines()
public void setJoinContentLines(boolean joinContentLines)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public void setSpaceBeforeEmptyCloseTag(boolean spaceBeforeEmptyCloseTag)
public boolean isSpaceBeforeEmptyCloseTag()
public void setPreserveEmptyContent(boolean preserveEmptyContent)
public boolean isPreserveEmptyContent()
public void setPreservedNewlines(int preservedNewlines)
public int getPreservedNewlines()
public void setEmptyElement(XMLFormattingOptions.EmptyElements emptyElement)
public XMLFormattingOptions.EmptyElements getEmptyElements()
public boolean isTrimFinalNewlines()
isTrimFinalNewlines
in class org.eclipse.lsp4j.FormattingOptions
public void setTrimTrailingWhitespace(boolean newValue)
setTrimTrailingWhitespace
in class org.eclipse.lsp4j.FormattingOptions
public boolean isTrimTrailingWhitespace()
isTrimTrailingWhitespace
in class org.eclipse.lsp4j.FormattingOptions
public void setEnforceQuoteStyle(EnforceQuoteStyle enforce)
public EnforceQuoteStyle getEnforceQuoteStyle()
public void setPreserveAttrLineBreaks(boolean preserveAttrLineBreaks)
public boolean isPreserveAttrLineBreaks()
public void setSplitAttributesIndentSize(int splitAttributesIndentSize)
splitAttributesIndentSize
- the new value for splitAttributesIndentSizepublic int getSplitAttributesIndentSize()
public XMLFormattingOptions merge(org.eclipse.lsp4j.FormattingOptions formattingOptions)
public static XMLFormattingOptions create(org.eclipse.lsp4j.FormattingOptions options, org.eclipse.lsp4j.FormattingOptions sharedFormattingOptions)
Copyright © 2021. All rights reserved.