protected void makeStartCommandControlsVisible(StartCommandType typeToMakeVisible) {
    StartCommandPart part = startCommandAreas.get(typeToMakeVisible);
    Control areaToMakeVisible = part != null ? part.getComposite() : null;

    if (areaToMakeVisible != null && !areaToMakeVisible.isDisposed()) {

      GridData data = (GridData) areaToMakeVisible.getLayoutData();
      GridDataFactory.createFrom(data).exclude(false).applyTo(areaToMakeVisible);
      areaToMakeVisible.setVisible(true);

      // Hide the other sections
      // If hiding, exclude from layout as to not take up space when it is
      // made invisible
      for (StartCommandType otherTypes : startCommandAreas.keySet()) {
        if (!otherTypes.equals(typeToMakeVisible)) {
          StartCommandPart otherArea = startCommandAreas.get(otherTypes);

          if (otherArea != null) {
            Control otherAreaComposite = otherArea.getComposite();

            if (!otherAreaComposite.isDisposed()) {
              data = (GridData) otherAreaComposite.getLayoutData();
              GridDataFactory.createFrom(data).exclude(true).applyTo(otherAreaComposite);

              otherAreaComposite.setVisible(false);
            }
          }
        }
      }

      // Recalculate layout
      areaToMakeVisible.getParent().layout(true, true);
    }
  }
  /**
   * @param commandTypes
   * @param partFactory
   * @param parent
   * @return true if start command area was created. False otherwise.
   */
  protected boolean createStartCommandArea(
      List<StartCommandType> commandTypes, StartCommandPartFactory partFactory, Composite parent) {

    if (commandTypes.isEmpty()) {
      return false;
    }

    int columnNumber = commandTypes.size();

    Composite buttonSelectionArea = new Composite(parent, SWT.NONE);
    GridLayoutFactory.fillDefaults().numColumns(columnNumber).applyTo(buttonSelectionArea);
    GridDataFactory.fillDefaults().grab(true, false).applyTo(buttonSelectionArea);

    StartCommandType defaultStartCommandType = startCommand.getDefaultStartCommandType();

    // Create radio buttons for each start command type, which
    // allows users to
    // toggle between the different start command
    for (StartCommandType commandType : commandTypes) {

      // If no default start command type was specified, make
      // the first one encountered
      // the default start command type
      if (defaultStartCommandType == null) {
        defaultStartCommandType = commandType;
      }
      final Button radio = new Button(buttonSelectionArea, SWT.RADIO);
      radio.setText(commandType.name());
      radio.setToolTipText(commandType.getDescription());
      radio.setData(commandType);

      boolean isSelected = commandType.equals(defaultStartCommandType);
      radio.setSelection(isSelected);

      radio.addSelectionListener(
          new SelectionAdapter() {

            public void widgetSelected(SelectionEvent e) {
              if (radio.getSelection()) {
                StartCommandType type = (StartCommandType) radio.getData();

                makeStartCommandControlsVisible(type);
                StartCommandPart part = startCommandAreas.get(type);
                if (part != null) {
                  part.updateStartCommand();
                }
              }
            }
          });
    }

    // Create the start command type UI whose visibility is
    // controlled by the radio button
    Composite startCompositeArea = new Composite(parent, SWT.NONE);
    GridLayoutFactory.fillDefaults().numColumns(1).spacing(0, 0).applyTo(startCompositeArea);
    GridDataFactory.fillDefaults().grab(true, false).applyTo(startCompositeArea);

    for (StartCommandType commandType : commandTypes) {
      StartCommandPart commandPart =
          partFactory.createStartCommandTypePart(commandType, startCompositeArea);
      if (commandPart != null) {

        // Since the standalone part is a container of multiple
        // subparts, with only one subpart
        // ever visible at any given time, make sure the listener of any
        // part changes
        // (e.g, a wizard page) only receives ONE event originating from
        // the
        // container part, not from the individual
        // subparts. This is to avoid the listener from keeping track of
        // errors from non-visible subparts, as errors from non-visible
        // parts should
        // not prevent the completion of an operation, like deploying an
        // application.
        commandPart.addPartChangeListener(this);
        startCommandAreas.put(commandType, commandPart);
      }
    }

    // At this stage, at least one UI control has been created
    makeStartCommandControlsVisible(defaultStartCommandType);
    return true;
  }