예제 #1
0
  public static Job createWorkingBranch(
      final TeamWorkFlowArtifact teamArt, final TransactionRecord parentTransactionId, boolean pend)
      throws OseeCoreException {
    final String branchName =
        Strings.truncate(TeamWorkFlowManager.getBranchName(teamArt), 195, true);
    Conditions.checkNotNull(teamArt, "Parent Team Workflow");
    Conditions.checkNotNull(parentTransactionId, "Parent Branch");

    IExceptionableRunnable runnable =
        new IExceptionableRunnable() {

          @Override
          public IStatus run(IProgressMonitor monitor) throws OseeCoreException {
            teamArt.setWorkingBranchCreationInProgress(true);
            BranchManager.createWorkingBranch(parentTransactionId, branchName, teamArt);
            teamArt.setWorkingBranchCreationInProgress(false);
            performPostBranchCreationTasks(teamArt);
            return Status.OK_STATUS;
          }
        };

    //            Jobs.runInJob("Create Branch", runnable, Activator.class, Activator.PLUGIN_ID);
    Job job =
        Jobs.startJob(
            new CatchAndReleaseJob("Create Branch", runnable, Activator.class, Activator.PLUGIN_ID),
            true);
    if (pend) {
      try {
        job.join();
      } catch (InterruptedException ex) {
        throw new OseeWrappedException(ex);
      }
    }
    return job;
  }
예제 #2
0
 @Override
 public String getTaskEditorLabel(SearchType searchType) throws OseeCoreException {
   StringBuffer sb = new StringBuffer();
   Collection<IAtsTeamDefinition> teamDefs = getSelectedTeamDefinitions();
   if (teamDefs.size() > 0) {
     sb.append(" - Teams: ");
     sb.append(org.eclipse.osee.framework.jdk.core.util.Collections.toString(",", teamDefs));
   }
   if (getSelectedVersionArtifact() != null) {
     sb.append(" - Version: ");
     sb.append(getSelectedVersionArtifact());
   }
   if (getSelectedGroups().size() > 0) {
     sb.append(" - Groups: ");
     sb.append(Collections.toString(",", getSelectedGroups()));
   }
   if (getSelectedUser() != null) {
     sb.append(" - Assignee: ");
     sb.append(getSelectedUser());
   }
   if (getSelectedState() != null) {
     sb.append(" - State: ");
     sb.append(getSelectedState());
   }
   if (isIncludeCompletedCheckbox() && isIncludeCancelledCheckbox()) {
     sb.append(" - Include Completed/Cancelled");
   }
   if (isIncludeCompletedCheckbox()) {
     sb.append(" - Include Completed");
   }
   if (isIncludeCancelledCheckbox()) {
     sb.append(" - Include Cancelled");
   }
   return Strings.truncate("Tasks" + sb.toString(), TaskEditor.TITLE_MAX_LENGTH, true);
 }