public interface IFormatterParticipant
| Modifier and Type | Method and Description |
|---|---|
default boolean |
formatAttributeValue(DOMAttr attr,
XMLFormatterDocument formatterDocument,
XMLFormattingConstraints parentConstraints,
XMLFormattingOptions formattingOptions,
List<org.eclipse.lsp4j.TextEdit> edits)
Format the given attribute value.
|
default boolean |
formatAttributeValue(String name,
String valueWithoutQuote,
Character quote,
DOMAttr attr,
XMLBuilder xml)
Format the given attribute value.
|
default FormatElementCategory |
getFormatElementCategory(DOMElement element,
XMLFormattingConstraints parentConstraints,
Map<String,Collection<CMDocument>> formattingContext,
SharedSettings sharedSettings)
Returns the format element category for the given DOM element and null
otherwise.
|
default boolean |
shouldCollapseEmptyElement(DOMElement element,
SharedSettings sharedSettings)
Returns true if the given element can be collapsed according to grammar
constraints.
|
default boolean formatAttributeValue(String name, String valueWithoutQuote, Character quote, DOMAttr attr, XMLBuilder xml)
The formatter must take care of to generate attribute value with quote.
name - the attribute name.valueWithoutQuote - the attribute value without quote.quote - the quote and null otherwise. null quote means that
the formatter must not generate a quote in the xml
builder.attr - the DOM attribute and null otherwise.xml - the XML builder.default boolean formatAttributeValue(DOMAttr attr, XMLFormatterDocument formatterDocument, XMLFormattingConstraints parentConstraints, XMLFormattingOptions formattingOptions, List<org.eclipse.lsp4j.TextEdit> edits)
formatterDocument - the formatter documentindentLevel - the current indent level of the attributeformattingOptions - the formatting options that contain the settingsattr - the attribute nodeedits - the text edit listdefault FormatElementCategory getFormatElementCategory(DOMElement element, XMLFormattingConstraints parentConstraints, Map<String,Collection<CMDocument>> formattingContext, SharedSettings sharedSettings)
element - the DOM element.parentConstraints - the parent constraints.sharedSettings - the shared settings.default boolean shouldCollapseEmptyElement(DOMElement element, SharedSettings sharedSettings)
element - the DOM element.sharedSettings - the shared settings.Copyright © 2023. All rights reserved.