public class Matcher
extends java.lang.Object
Constructor and Description |
---|
Matcher(Project project,
MatchOptions matchOptions) |
Modifier and Type | Method and Description |
---|---|
static Matcher |
buildMatcher(Project project,
LanguageFileType fileType,
java.lang.String constraint) |
boolean |
checkIfShouldAttemptToMatch(NodeIterator matchedNodes) |
void |
findMatches(MatchResultSink sink)
Finds the matches of given pattern starting from given tree element.
|
MatchContext |
getMatchContext() |
Project |
getProject() |
java.util.List<MatchResult> |
matchByDownUp(PsiElement element)
Tests if given element is matched by given pattern starting from target variable.
|
boolean |
matchNode(PsiElement element) |
void |
processMatchesInElement(NodeIterator matchedNodes) |
void |
testFindMatches(MatchResultSink sink)
Finds the matches of given pattern starting from given tree element.
|
java.util.List<MatchResult> |
testFindMatches(java.lang.String source,
boolean fileContext,
LanguageFileType sourceFileType,
boolean physicalSourceFile)
Finds the matches of given pattern starting from given tree element.
|
static void |
validate(Project project,
MatchOptions options) |
public Matcher(Project project, MatchOptions matchOptions)
public static Matcher buildMatcher(Project project, LanguageFileType fileType, java.lang.String constraint)
public static void validate(Project project, MatchOptions options)
public boolean checkIfShouldAttemptToMatch(NodeIterator matchedNodes)
public void processMatchesInElement(NodeIterator matchedNodes)
public boolean matchNode(PsiElement element)
public void findMatches(MatchResultSink sink) throws MalformedPatternException, UnsupportedPatternException
public MatchContext getMatchContext()
public Project getProject()
public java.util.List<MatchResult> testFindMatches(java.lang.String source, boolean fileContext, LanguageFileType sourceFileType, boolean physicalSourceFile) throws MalformedPatternException, UnsupportedPatternException
source
- string for searchMalformedPatternException
UnsupportedPatternException
public void testFindMatches(MatchResultSink sink) throws MalformedPatternException, UnsupportedPatternException
sink
- match result destinationMalformedPatternException
UnsupportedPatternException
public java.util.List<MatchResult> matchByDownUp(PsiElement element) throws MalformedPatternException, UnsupportedPatternException