Class ConditionalProcessGroup

java.lang.Object
org.eclipse.cdt.core.templateengine.process.ConditionalProcessGroup

public class ConditionalProcessGroup extends Object
ConditionalProcess encloses an <if condition="..."></if> block of the template. The currently supported conditions are equals and not equals operations performed on two Strings. The respective operators are == and !=. Any spaces will be treated as part of the operands. The two operands will be evaluated for simple String equals and not equals after performing a single pass replace of any replace markers with their values in the template's value store.
  • Constructor Details

    • ConditionalProcessGroup

      public ConditionalProcessGroup(TemplateCore template, Element conditionElement, int id)
      Constructs a ConditionalProcess element from the supplied conditionElement (<if>) while building Process objects out of each of the element's <process> children.
    • ConditionalProcessGroup

      public ConditionalProcessGroup(TemplateCore template, Element[] processElements)
      Constructs a ConditionalProcess element from the supplied process elements while building Process objects out of each of the supplied process elements (<process>). The condition in this case is evaluated to true. This Constructor is expected to be used to evaluate all those process elements that are children of the template root element.
  • Method Details

    • isReadyToProcess

      public boolean isReadyToProcess()
      Checks if this conditional process group is completely ready to be processed.
    • isConditionValueTrue

      public boolean isConditionValueTrue()
      Returns:
      boolean, true if Condition Value is True.
    • process

      public List<org.eclipse.core.runtime.IStatus> process(org.eclipse.core.runtime.IProgressMonitor monitor) throws ProcessFailureException
      Process and Returns the Status of the prosses as a List.
      Parameters:
      monitor -
      Returns:
      List contains the IStatus.
      Throws:
      ProcessFailureException
    • getMacros

      public Set<String> getMacros()
      Returns the Macros as a Set.
      Returns:
      Set, contains macros
    • getAllMacros

      public Set<String> getAllMacros()
      Returns:
      the union of all macros used in the child processes