FileFilter () { FileFilter baseFilter = super.createFileFilter(); final JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(getTarget().getModule().getProject()); final JavadocSnippetsSkipFilter snippetsSkipFilter = new JavadocSnippetsSkipFilter(getRootFile()); return file -> baseFilter.accept(file) && configuration.isResourceFile(file, getRootFile()) && snippetsSkipFilter.accept(file); }