public static void prepareDotProject(File projectSourceFolder){
  File dotProject=new File(projectSourceFolder,".project");
  File dotProjectTemplate=new File(projectSourceFolder,"_project");
  if (dotProject.exists()) {
    if (!dotProjectTemplate.exists()) {
      throw new IllegalArgumentException("proband must rename the '.project' file to '_project'");
    }
  }
  if (dotProjectTemplate.exists()) {
    try {
      Files.copy(dotProjectTemplate.toPath(),dotProject.toPath(),StandardCopyOption.REPLACE_EXISTING);
    }
 catch (    IOException e) {
      throw new IllegalStateException("unable to prepare .project-file",e);
    }
    dotProject.deleteOnExit();
  }
}

public static void prepareDotProject ( File projectSourceFolder ) { File dotProject = new File ( projectSourceFolder , ".project" ) ; File dotProjectTemplate = new File ( projectSourceFolder , "_project" ) ; if ( dotProject . exists ( ) ) { if ( ! dotProjectTemplate . exists ( ) ) { throw new IllegalArgumentException ( "proband must rename the '.project' file to '_project'" ) ; } } if ( dotProjectTemplate . exists ( ) ) { try { Files . copy ( dotProjectTemplate . toPath ( ) , dotProject . toPath ( ) , StandardCopyOption . REPLACE_EXISTING ) ; } catch ( IOException e ) { throw new IllegalStateException ( "unable to prepare .project-file" , e ) ; } dotProject . deleteOnExit ( ) ; } }
for test - mocks copies over " _project " - files to " . project " files and supplies a delete - on - exit shutdown hook for them .
