boolean (@NotNull VirtualFile file) { //noinspection SimplifiableIfStatement if (myPatterns.isEmpty() || file.isDirectory() || !file.isValid()) return false; return myPatterns.stream().anyMatch(processor -> processor.process(myProject, file)); }