boolean (@NotNull PsiElement element) { final MatchContext matchContext = getMatchContext(); matchContext.clear(); final CollectingMatchResultSink sink = new CollectingMatchResultSink(); matchContext.setSink(new DuplicateFilteringResultSink(sink)); final CompiledPattern compiledPattern = matchContext.getPattern(); if (compiledPattern == null) { return false; } matchContext.setShouldRecursivelyMatch(false); visitor.matchContext(SingleNodeIterator.create(element)); return !sink.getMatches().isEmpty(); }