Exemplo n.º 1
0
 /** Creates a new empty project in a temp directory */
 public void test0CreateProject() {
   logger.info("test0CreateProject");
   ToolBox.setPlatform();
   FlexoLoggingManager.forceInitialize(-1, true, null, Level.INFO, null);
   try {
     File tempFile = File.createTempFile(TEST_CG, "");
     _projectDirectory = new File(tempFile.getParentFile(), tempFile.getName() + ".prj");
     tempFile.delete();
   } catch (IOException e) {
     fail();
   }
   logger.info("Project directory: " + _projectDirectory.getAbsolutePath());
   _projectIdentifier =
       _projectDirectory.getName().substring(0, _projectDirectory.getName().length() - 4);
   logger.info("Project identifier: " + _projectIdentifier);
   _editor = FlexoResourceManager.initializeNewProject(_projectDirectory, EDITOR_FACTORY, null);
   _project = _editor.getProject();
   logger.info("Project has been SUCCESSFULLY created");
 }