private static String[] constructChoices(
      final ConflictManagerExternal conflictManager, boolean allConflictsResolved) {
    String[] choices;
    boolean isAdmin = false;
    try {
      if (AccessControlManager.isOseeAdmin()) {
        isAdmin = true;
      }
    } catch (OseeCoreException ex) {
      isAdmin = false;
      OseeLog.log(Activator.class, Level.SEVERE, ex.toString(), ex);
    }

    if (allConflictsResolved) {
      choices = new String[] {"Commit", "Launch Merge Manager", "Delete Merge", "Cancel"};
    } else {
      if (isAdmin) {
        choices =
            new String[] {
              "Launch Merge Manager", "Delete Merge", "Cancel", "Force Commit (Admin Only)"
            };
      } else {
        choices = new String[] {"Launch Merge Manager", "Delete Merge", "Cancel"};
      }
    }
    return choices;
  }
示例#2
0
 @Override
 public boolean hasChildren(Object element) {
   if (element instanceof Collection<?>) {
     return true;
   }
   if (element instanceof String) {
     return false;
   }
   if (((Artifact) element).isDeleted()) {
     return false;
   }
   if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) {
     return true;
   }
   if (element instanceof AbstractWorkflowArtifact) {
     try {
       return hasAtsWorldChildren((AbstractWorkflowArtifact) element);
     } catch (OseeCoreException ex) {
       OseeLog.log(Activator.class, Level.SEVERE, ex.toString());
     }
   }
   return true;
 }