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