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, waitformatAttributeValue, formatAttributeValuepublic ContentModelFormatterParticipant(ContentModelManager contentModelManager)
public FormatElementCategory getFormatElementCategory(DOMElement element, XMLFormattingConstraints parentConstraints, Map<String,Collection<CMDocument>> formattingContext, SharedSettings sharedSettings)
IFormatterParticipantgetFormatElementCategory in interface IFormatterParticipantelement - the DOM element.parentConstraints - the parent constraints.sharedSettings - the shared settings.public boolean shouldCollapseEmptyElement(DOMElement element, SharedSettings sharedSettings)
IFormatterParticipantshouldCollapseEmptyElement in interface IFormatterParticipantelement - the DOM element.sharedSettings - the shared settings.Copyright © 2024. All rights reserved.