public class ContentModelFormatterParticipant extends Object implements IFormatterParticipant
FormatElementCategory
of a given element.
This participant is enabled when 'xml.format.grammarAwareFormatting' setting is set to true.
Constructor and Description |
---|
ContentModelFormatterParticipant(ContentModelManager contentModelManager) |
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
shouldCollapseEmptyElement(DOMElement element,
SharedSettings sharedSettings)
Returns true if the given element can be collapsed according to grammar
constraints.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
formatAttributeValue, formatAttributeValue
public ContentModelFormatterParticipant(ContentModelManager contentModelManager)
public FormatElementCategory getFormatElementCategory(DOMElement element, XMLFormattingConstraints parentConstraints, Map<String,Collection<CMDocument>> formattingContext, SharedSettings sharedSettings)
IFormatterParticipant
getFormatElementCategory
in interface IFormatterParticipant
element
- the DOM element.parentConstraints
- the parent constraints.sharedSettings
- the shared settings.public boolean shouldCollapseEmptyElement(DOMElement element, SharedSettings sharedSettings)
IFormatterParticipant
shouldCollapseEmptyElement
in interface IFormatterParticipant
element
- the DOM element.sharedSettings
- the shared settings.Copyright © 2022. All rights reserved.