void addAndKeepDirtyStatus(Set<File> foldersToShare,Set<File> foldersToExclude){
  for (  File folder : foldersToShare) {
    directoryPanel.addRoot(folder);
  }
  directoryPanel.addFoldersToExclude(foldersToExclude);
}

void addAndKeepDirtyStatus ( Set < File > foldersToShare , Set < File > foldersToExclude ) { for ( File folder : foldersToShare ) { directoryPanel . addRoot ( folder ) ; } directoryPanel . addFoldersToExclude ( foldersToExclude ) ; }
adds a directory to the internal list , resetting ' dirty ' only if it wasn ' t dirty already .
