Self (final ElementPattern<IElementType> pattern) { return with(new PatternCondition<T>("withElementType") { @Override public boolean accepts(final @NotNull T t, final ProcessingContext context) { final ASTNode node = t.getNode(); return node != null && pattern.accepts(node.getElementType()); } }); }