docs: private void loadFileSources(final File directory, final String project) {
          //clear source sequence
  
          if (!directory.isDirectory()) {
              logger.warn("Not a directory: " + directory);
          }
          //get supported parser extensions
          final Set<String> exts = new HashSet<String>(
              framework.getResourceFormatParserService().listSupportedFileExtensions());
          final File[] files = directory.listFiles(new FilenameFilter() {
              public boolean accept(final File file, final String s) {
                  return exts.contains(
                      ResourceFormatParserService.getFileExtension(s));
              }
          });
  
          //set of previously cached file sources by file
          if (null != files) {
              //sort on filename
              Arrays.sort(files, null);
              synchronized (sourceCache) {
                  final HashSet<File> trackedFiles = new HashSet<File>(sourceCache.keySet());
                  for (final File file : files) {
                      //remove file that we want to keep
                      trackedFiles.remove(file);
                      if (!sourceCache.containsKey(file)) {
                          logger.debug("Adding new resources file to cache: " + file.getAbsolutePath());
                          try {
                              final ResourceModelSource source = createFileSource(project, file);
                              sourceCache.put(file, source);
  
                          } catch (ExecutionServiceException e) {
                              e.printStackTrace();
                              logger.debug("Failed adding file " + file.getAbsolutePath() + ": " + e.getMessage(), e);
                          }
                      }
                  }
                  //remaining trackedFiles are files that have been removed from the dir
                  for (final File oldFile : trackedFiles) {
                      logger.debug("Removing from cache: " + oldFile.getAbsolutePath());
                      sourceCache.remove(oldFile);
                  }
              }
          }
      }