Self (final ElementPattern<? extends VirtualFile> vFilePattern) { return with(new PatternCondition<T>("withVirtualFile") { @Override public boolean accepts(@NotNull T file, ProcessingContext context) { return vFilePattern.accepts(file.getVirtualFile(), context); } }); }