public void testIndexWithEmptyContent() throws Exception {
    File tmpDir = null;
    try {
      String src = "\n";

      // Generate some files to index!
      tmpDir =
          new File(
              FileUtil.getTempDirectory().toOSString(),
              "testIndexWithEmptyContent" + System.currentTimeMillis());
      tmpDir.mkdirs();

      File coffeeFile = new File(tmpDir, "index_me.coffee");
      IOUtil.write(new FileOutputStream(coffeeFile), src);

      IFileStore fileStore = EFS.getStore(coffeeFile.toURI());
      BuildContext context = new FileStoreBuildContext(fileStore);

      IProgressMonitor monitor = new NullProgressMonitor();
      indexer.index(context, null, monitor);
    } finally {
      // Clean up the generated files!
      FileUtil.deleteRecursively(tmpDir);
    }
  }
  private void cloneFromGit(
      String gitURL, final IProject projectHandle, final IProjectDescription projectDescription) {
    IPath path = mainPage.getLocationPath();
    // when default is used, getLocationPath() only returns the workspace root, so needs to append
    // the project name
    // to the path
    if (mainPage.useDefaults()) {
      path = path.append(projectDescription.getName());
    }

    // Wipe the destination directory if it already exists, or git clone will fail.
    File directory = path.toFile();
    if (directory.exists()) {
      FileUtil.deleteRecursively(directory);
    }

    // FIXME Run an IRunnableWithProgress in wizard container, have it just do job.run(monitor)!
    Job job = new CloneJob(gitURL, path.toOSString(), true, true);
    job.addJobChangeListener(
        new JobChangeAdapter() {

          @Override
          public void done(IJobChangeEvent event) {
            if (!event.getResult().isOK()) {
              return;
            }

            try {
              projectHandle.setDescription(projectDescription, null);
              projectHandle.refreshLocal(IResource.DEPTH_INFINITE, null);
            } catch (CoreException e) {
              IdeLog.logError(SamplesUIPlugin.getDefault(), e);
            }

            doPostProjectCreation(newProject);
          }
        });
    job.schedule(500);
  }