Package org.eclipse.lemminx.settings
Class XMLSymbolExpressionFilter
- java.lang.Object
-
- org.eclipse.lemminx.settings.XMLSymbolExpressionFilter
-
public class XMLSymbolExpressionFilter extends Object
XML Symbol expression filter.
-
-
Constructor Summary
Constructors Constructor Description XMLSymbolExpressionFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetXpath()Returns the XPath expression.booleanisExcluded()Returns true if the filter which matches a node must exclude the node as symbol and false otherwise.booleanisFilterFor(IXPathNodeMatcher.MatcherType matcherType)Return true if the filter have is for the given type (element, attribute, text) and false otherwise.booleanisInlineAttribute()Returns true if the filter which matches an element attribute node must consider it an inline attribute and show it on the same line as the owning element and false otherwise.booleanisShowAttributeName()Returns true if the filter which matches an element attribute node should show the attribute name or not, the attribute value will always be shown, and false otherwise.booleanmatch(Node node)Returns true if the given node match the XPath expression and false otherwise.voidsetExcluded(boolean excluded)Set true if the filter which matches a node must exclude the node as symbol and false otherwise.voidsetInlineAttribute(boolean inlineAttribute)Set whether or not a matched filter for an element attribute must be considered an inline attribute and shown on the same line as the owning element.voidsetShowAttributeName(boolean showAttributeName)Set whether or not a matched filter for an element attribute should show the attribute name or not, the attribute value will always be shown.voidsetXpath(String xpath)Set the XPath expression.
-
-
-
Method Detail
-
getXpath
public String getXpath()
Returns the XPath expression.- Returns:
- the XPath expression.
-
setXpath
public void setXpath(String xpath)
Set the XPath expression.- Parameters:
xpath- the XPath expression.
-
isInlineAttribute
public boolean isInlineAttribute()
Returns true if the filter which matches an element attribute node must consider it an inline attribute and show it on the same line as the owning element and false otherwise.- Returns:
- true if the filter which matches an element attribute node must consider it an inline attribute and show it on the same line as the owning element and false otherwise.
-
setInlineAttribute
public void setInlineAttribute(boolean inlineAttribute)
Set whether or not a matched filter for an element attribute must be considered an inline attribute and shown on the same line as the owning element.- Parameters:
inlineAttribute- whether or not a matched filter for an element attribute must be considered an inline attribute and shown on the same line as the owning element.
-
isShowAttributeName
public boolean isShowAttributeName()
Returns true if the filter which matches an element attribute node should show the attribute name or not, the attribute value will always be shown, and false otherwise.- Returns:
- true if the filter which matches an element attribute node should show the attribute name or not, the attribute value will always be shown, and false otherwise.
-
setShowAttributeName
public void setShowAttributeName(boolean showAttributeName)
Set whether or not a matched filter for an element attribute should show the attribute name or not, the attribute value will always be shown.- Parameters:
showAttributeName- whether or not a matched filter for an element attribute should show the attribute name or not, the attribute value will always be shown.
-
isExcluded
public boolean isExcluded()
Returns true if the filter which matches a node must exclude the node as symbol and false otherwise.- Returns:
- true if the filter which matches a node must exclude the node as symbol and false otherwise.
-
setExcluded
public void setExcluded(boolean excluded)
Set true if the filter which matches a node must exclude the node as symbol and false otherwise.- Parameters:
excluded- true if the filter which matches a node must exclude the node as symbol and false otherwise.
-
match
public boolean match(Node node)
Returns true if the given node match the XPath expression and false otherwise.- Parameters:
node- the DOM node.- Returns:
- true if the given node match the XPath expression and false otherwise.
-
isFilterFor
public boolean isFilterFor(IXPathNodeMatcher.MatcherType matcherType)
Return true if the filter have is for the given type (element, attribute, text) and false otherwise.- Parameters:
matcherType- the matcher type.- Returns:
- true if the filter have is for the given type (element, attribute, text) and false otherwise.
-
-