private void parseDir ( final File dir ) { LOG . debug ( "Parse: {}" , dir ) ; final File [ ] files = getFiles ( dir ) ; if ( ( files == null ) || ( files . length == 0 ) ) { LOG . debug ( "No files found in directory: {}" , dir ) ; } else { for ( final File file : files ) { if ( file . isFile ( ) ) { final Resource resource = resourceSet . getResource ( URI . createFileURI ( Utils4J . getCanonicalPath ( file ) ) , true ) ; final EList < Diagnostic > diagnostics = resource . getErrors ( ) ; if ( diagnostics . size ( ) == 0 ) { LOG . debug ( "Parsed {}" , file ) ; } else { error = true ; LOG . error ( "Parsed {} with errors: {}" , file , diagnostics ) ; } } else { parseDir ( file ) ; } } } }
Parse the directory and it s sub directory .