private void doCreateProject(ProjectCandidate pc, IProgressMonitor monitor)
     throws CoreException, InterruptedException, InvocationTargetException {
   HybridProjectCreator projectCreator = new HybridProjectCreator();
   Widget w = pc.getWidget();
   String projectName = pc.getProjectName();
   URI location = null;
   if (!copyFiles) {
     location = pc.wwwLocation.getParentFile().toURI();
   }
   IProject project =
       projectCreator.createProject(
           projectName,
           location,
           w.getName(),
           w.getId(),
           HybridMobileEngineManager.getDefaultEngine(),
           monitor);
   if (copyFiles) {
     ImportOperation operation =
         new ImportOperation(
             project.getFullPath(),
             pc.wwwLocation.getParentFile(),
             FileSystemStructureProvider.INSTANCE,
             this);
     operation.setContext(getShell());
     operation.setOverwriteResources(true);
     operation.setCreateContainerStructure(false);
     operation.run(monitor);
     IStatus status = operation.getStatus();
     if (!status.isOK()) throw new InvocationTargetException(new CoreException(status));
   }
 }
 String getProjectName() {
   String projectName = getWidget().getId();
   if (widget.getName() != null) {
     projectName = getWidget().getName();
   }
   return projectName;
 }