package de.retest.recheck.ignore;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class SearchFilterFiles {

	public static final String FILES_ENDING = ".filter";
	private static final String BASIC_FILTER_DIR = "/filter/";
	private static final String WEB_FILTER_DIR = BASIC_FILTER_DIR + "web/";
	private static final List<String> defaultWebFilter =
			Arrays.asList( WEB_FILTER_DIR + "positioning.filter", WEB_FILTER_DIR + "visibility.filter" );

	private SearchFilterFiles() {}

	public static List<File> getDefaultFilterFiles() {
		return defaultWebFilter.stream() //
				.map( filter -> SearchFilterFiles.class.getResource( filter ) ) //
				.filter( Objects::nonNull ) //
				.map( resource -> new File( resource.getFile() ) ) //
				.collect( Collectors.toList() ); //
	}

	public static List<File> getProjectFilterFiles() throws IOException {
		if ( !resolveFilterPath().toFile().exists() ) {
			return Collections.emptyList();
		}
		try ( Stream<Path> paths = Files.walk( resolveFilterPath() ) ) {
			return paths.filter( Files::isRegularFile ) //
					.filter( file -> file.toString().endsWith( FILES_ENDING ) ) //
					.map( Path::toFile ) //
					.collect( Collectors.toList() ); //
		}
	}
}

@@ -28,16 +28,99 @@
 gnore;%0A%0A
+import static de.retest.recheck.configuration.ProjectConfiguration.FILTER_FOLDER;%0A%0A
 import j
@@ -132,16 +132,16 @@
 o.File;%0A
-
 import j
@@ -388,16 +388,78 @@
 tream;%0A%0A
+import de.retest.recheck.configuration.ProjectConfiguration;%0A%0A
 public c
@@ -823,16 +823,16 @@
 er%22 );%0A%0A
-
 %09private
@@ -856,16 +856,159 @@
 s() %7B%7D%0A%0A
+%09private static Path resolveFilterPath() %7B%0A%09%09return ProjectConfiguration.getInstance().findProjectConfigFolder().resolve( FILTER_FOLDER );%0A%09%7D%0A%0A
 %09public 

Create a method to search for the filter path