/** OT: new method: OT specific project creation. Creates a IJavaProject. */
  public static IJavaProject createOTJavaProject(String projectName, String binFolderName)
      throws CoreException {
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    IProject project = root.getProject(projectName);
    if (!project.exists()) {
      project.create(null);
    } else {
      project.refreshLocal(IResource.DEPTH_INFINITE, null);
    }

    if (!project.isOpen()) {
      project.open(null);
    }

    IPath outputLocation;
    if (binFolderName != null && binFolderName.length() > 0) {
      IFolder binFolder = project.getFolder(binFolderName);
      if (!binFolder.exists()) {
        CoreUtility.createFolder(binFolder, false, true, null);
      }
      outputLocation = binFolder.getFullPath();
    } else {
      outputLocation = project.getFullPath();
    }

    if (!project.hasNature(JavaCore.NATURE_ID) && !project.hasNature(JavaCore.OTJ_NATURE_ID)) {
      addNatureToProject(project, JavaCore.NATURE_ID, null);
      // add OT nature to project
      addNatureToProject(project, JavaCore.OTJ_NATURE_ID, null);
    }
    IProjectDescription description = project.getDescription();
    // add OT build spec to project
    description.setBuildSpec(OTDTPlugin.createProjectBuildCommands(description));
    project.setDescription(description, null);

    IJavaProject jproject = JavaCore.create(project);

    jproject.setOutputLocation(outputLocation, null);
    jproject.setRawClasspath(new IClasspathEntry[0], null);

    OTREContainer.initializeOTJProject(project);

    return jproject;
  }