/**
  * Find the class for the projection
  *
  * @param proj projection
  * @return corresponding ProjectionClass (or null if not found)
  */
 private ProjectionClass findProjectionClass(Projection proj) {
   Class want = proj.getClass();
   ComboBoxModel projClassList = projClassCB.getModel();
   for (int i = 0; i < projClassList.getSize(); i++) {
     ProjectionClass pc = (ProjectionClass) projClassList.getElementAt(i);
     if (want.equals(pc.projClass)) {
       return pc;
     }
   }
   return null;
 }
 /**
  * Data binding that returns all possible project names to be used in the project autocomplete.
  *
  * @return
  */
 public ComboBoxModel doFillProjectItems() {
   setGlobalConfiguration();
   ComboBoxModel names = new ComboBoxModel();
   try {
     Set<com.octopusdeploy.api.Project> projects = api.getAllProjects();
     for (com.octopusdeploy.api.Project proj : projects) {
       names.add(proj.getName());
     }
   } catch (Exception ex) {
     Logger.getLogger(OctopusDeployDeploymentRecorder.class.getName())
         .log(Level.SEVERE, null, ex);
   }
   return names;
 }