public class SubstitutionHandler extends MatchingHandler
clearingVisitor, filter
Constructor and Description |
---|
SubstitutionHandler(java.lang.String name,
boolean target,
int minOccurs,
int maxOccurs,
boolean greedy) |
Modifier and Type | Method and Description |
---|---|
void |
addResult(PsiElement match,
int start,
int end,
MatchContext context) |
void |
addResult(PsiElement match,
MatchContext context) |
protected boolean |
doMatchSequentially(NodeIterator patternNodes,
NodeIterator matchNodes,
MatchContext context) |
protected boolean |
doMatchSequentiallyBySimpleHandler(NodeIterator patternNodes,
NodeIterator matchNodes,
MatchContext context) |
RegExpPredicate |
findRegExpPredicate() |
int |
getMaxOccurs() |
int |
getMinOccurs() |
java.lang.String |
getName() |
MatchResultImpl |
getNestedResult() |
MatchPredicate |
getPredicate() |
boolean |
handle(PsiElement match,
int start,
int end,
MatchContext context) |
boolean |
handle(PsiElement match,
MatchContext context) |
boolean |
isStrictSubtype() |
boolean |
isSubtype() |
boolean |
isTarget() |
boolean |
match(PsiElement node,
PsiElement match,
MatchContext context)
Matches given handler node against given value.
|
boolean |
matchSequentially(NodeIterator patternNodes,
NodeIterator matchNodes,
MatchContext context) |
void |
reset() |
void |
setMatchHandler(MatchingHandler matchHandler) |
void |
setNestedResult(MatchResultImpl nestedResult) |
void |
setPredicate(MatchPredicate handler) |
void |
setRepeatedVar(boolean repeatedVar) |
void |
setStrictSubtype(boolean strictSubtype) |
void |
setSubtype(boolean subtype) |
void |
setTarget(boolean target) |
boolean |
shouldAdvanceThePatternFor(PsiElement patternElement,
PsiElement matchedElement) |
boolean |
validate(PsiElement match,
int start,
int end,
MatchContext context) |
boolean |
validate(PsiElement match,
MatchContext context) |
canMatch, getFilter, getPinnedNode, isMatchSequentiallySucceeded, matchInAnyOrder, setFilter, setPinnedElement, shouldAdvanceTheMatchFor, validateSatisfactionOfHandlers
public SubstitutionHandler(java.lang.String name, boolean target, int minOccurs, int maxOccurs, boolean greedy)
public boolean isSubtype()
public boolean isStrictSubtype()
public void setStrictSubtype(boolean strictSubtype)
public void setSubtype(boolean subtype)
public void setPredicate(MatchPredicate handler)
public MatchPredicate getPredicate()
public RegExpPredicate findRegExpPredicate()
public void setRepeatedVar(boolean repeatedVar)
public boolean validate(PsiElement match, MatchContext context)
public boolean validate(PsiElement match, int start, int end, MatchContext context)
public boolean match(PsiElement node, PsiElement match, MatchContext context)
MatchingHandler
match
in class MatchingHandler
match
- for matchingcontext
- of the matchingpublic void addResult(PsiElement match, MatchContext context)
public void addResult(PsiElement match, int start, int end, MatchContext context)
public boolean handle(PsiElement match, MatchContext context)
public boolean handle(PsiElement match, int start, int end, MatchContext context)
public int getMinOccurs()
public int getMaxOccurs()
public boolean matchSequentially(NodeIterator patternNodes, NodeIterator matchNodes, MatchContext context)
matchSequentially
in class MatchingHandler
protected boolean doMatchSequentiallyBySimpleHandler(NodeIterator patternNodes, NodeIterator matchNodes, MatchContext context)
protected boolean doMatchSequentially(NodeIterator patternNodes, NodeIterator matchNodes, MatchContext context)
public void setTarget(boolean target)
public void setMatchHandler(MatchingHandler matchHandler)
public boolean isTarget()
public java.lang.String getName()
public void reset()
reset
in class MatchingHandler
public boolean shouldAdvanceThePatternFor(PsiElement patternElement, PsiElement matchedElement)
shouldAdvanceThePatternFor
in class MatchingHandler
public void setNestedResult(MatchResultImpl nestedResult)
public MatchResultImpl getNestedResult()