PsiMatcherExpression (final String @NotNull ... texts) { return new PsiMatcherExpression() { @Override public Boolean match(PsiElement element) { String text = element.getText(); return ArrayUtil.find(texts, text) != -1; } }; }