public class XMLSymbolFilter extends PathPatternMatcher
"xml.symbols.filters": [ // Declaration of symbols filter for maven 'pom.xml' to show all text nodes in the Outline. { "pattern": "pom.xml", "expressions" :[ { "xpath": "//text()" } ] }, // Declaration of symbols filter for Spring beans to show all @id of the elements in the Outline. { "pattern": "bean*.xml", "expressions" :[ { "xpath": "//@id" } ] }, // Declaration of symbols filter for ant/phing build.xml files to show all target names and property // names/files in the Outline. { "pattern": "build*.xml", "expressions" :[ { // keep the value of the attribute "name" on the same line // as the "target" element, and only show the attribute value "xpath": "//target/@name", "inlineAttribute" : true, "showAttributeName": false }, // show "unless" and "depends" as nested attributes for // "target" elements { "xpath": "//target/@unless" }, { "xpath": "//target/@depends" }, { // keep the value of the attribute "name" on the same line // as the "property" element, and only show the attribute value "xpath": "//property/@name", "inlineAttribute" : true, "showAttributeName": false }, { // keep the value of the attribute "file" on the same line // as the "property" element, and show the attribute name // along with the value to distinguish it from the more common // "name" attribute "xpath": "//property/@file", "inlineAttribute" : true, "showAttributeName": true } } ]
Modifier and Type | Field and Description |
---|---|
static XMLSymbolFilter |
DEFAULT |
Constructor and Description |
---|
XMLSymbolFilter() |
Modifier and Type | Method and Description |
---|---|
XMLSymbolExpressionFilter[] |
getExpressions()
Returns the expression list filter.
|
XMLSymbolExpressionFilter |
getFilterForInlineAttr(DOMAttr attrNode)
Gets the first matched attribute node that is set as an
inline attribute for an element.
|
boolean |
hasFilterFor(IXPathNodeMatcher.MatcherType matcherType)
Returns true if the filter have an expression for the given type (element,
attribute, text) and false otherwise.
|
boolean |
isNodeSymbol(DOMNode node)
Returns true if the given node is a symbol and false otherwise.
|
void |
setExpressions(XMLSymbolExpressionFilter[] expressions)
Set the expression list filter.
|
equals, getPathMatcher, getPattern, matches, matches, setPathMatcher, setPattern
public static final XMLSymbolFilter DEFAULT
public void setExpressions(XMLSymbolExpressionFilter[] expressions)
expressions
- the expression list filter.public XMLSymbolExpressionFilter[] getExpressions()
public XMLSymbolExpressionFilter getFilterForInlineAttr(DOMAttr attrNode)
attrNode
- the DOMElement attribute node to check for.public boolean isNodeSymbol(DOMNode node)
node
- the DOM node.public boolean hasFilterFor(IXPathNodeMatcher.MatcherType matcherType)
matcherType
- the matcher type.Copyright © 2022. All rights reserved.