Self (final ElementPattern<? extends PsiExpression> expressionPattern) { return with(new PatternCondition<T>("skipParentheses") { @Override public boolean accepts(@NotNull T t, ProcessingContext context) { PsiExpression expression = t; while (expression instanceof PsiParenthesizedExpression) { expression = ((PsiParenthesizedExpression)expression).getExpression(); } return expressionPattern.accepts(expression, context); } }); }