Beispiel #1
0
 /**
  * Process and Returns the Status of the prosses as a List.
  *
  * @param monitor
  * @return List contains the IStatus.
  * @throws ProcessFailureException
  */
 public List<IStatus> process(IProgressMonitor monitor) throws ProcessFailureException {
   if (!areMacrosForConditionEvaluationExpandable()) {
     throw new ProcessFailureException(getUnexpandableMacroMessage());
   }
   if (!isConditionValueTrue()) {
     List<IStatus> statuses = new ArrayList<IStatus>(1);
     statuses.add(
         new Status(
             IStatus.ERROR,
             CCorePlugin.PLUGIN_ID,
             IStatus.INFO,
             Messages.getString("ConditionalProcessGroup.notExecuting") + id,
             null)); //$NON-NLS-1$
     return statuses;
   }
   List<IStatus> statuses = new ArrayList<IStatus>(processes.size());
   for (Process process : processes) {
     try {
       statuses.add(process.process(monitor));
     } catch (ProcessFailureException e) {
       throw new ProcessFailureException(e.getMessage(), e, statuses);
     }
   }
   return statuses;
 }
Beispiel #2
0
 /**
  * @param monitor
  * @return IStatus, as an array of status info
  * @throws ProcessFailureException
  */
 public IStatus[] processAll(IProgressMonitor monitor) throws ProcessFailureException {
   List<IStatus> allStatuses = new ArrayList<IStatus>();
   for (ConditionalProcessGroup cpg : conditionalProcessGroupList) {
     try {
       allStatuses.addAll(cpg.process(monitor));
     } catch (ProcessFailureException e) {
       throw new ProcessFailureException(e.getMessage(), e, allStatuses);
     }
   }
   return allStatuses.toArray(new IStatus[allStatuses.size()]);
 }