boolean (@NotNull PsiElement matchedNode, int start, int end, @NotNull MatchContext context) { final String text = myNodeTextGenerator != null ? myNodeTextGenerator.getText(matchedNode) : StructuralSearchUtil.getMeaningfulText(matchedNode); boolean result = doMatch(text, start, end, context, matchedNode); if (!result) { matchedNode = StructuralSearchUtil.getParentIfIdentifier(matchedNode); final String alternativeText = StructuralSearchUtil.getAlternativeText(matchedNode, text); if (alternativeText != null) { result = doMatch(alternativeText, start, end, context, matchedNode); } } return result; }