@Override
  public void createCompositeContent(
      Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
    parent.setLayout(new FillLayout(SWT.VERTICAL | SWT.V_SCROLL));
    super.createCompositeContent(parent, aTabbedPropertySheetPage);

    GridData layoutData;
    TabbedPropertySheetWidgetFactory toolkit = aTabbedPropertySheetPage.getWidgetFactory();
    Composite content = new LayoutComposite(parent);
    Composite outputComposite = toolkit.createFlatFormComposite(content);

    outputComposite.setLayout(new GridLayout(1, true));
    outputLocationPane.createControl(outputComposite, Messages.outputLocationPaneTitle, toolkit);
    layoutData =
        new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
    outputLocationPane.getControl().setLayoutData(layoutData);

    Composite root = new LayoutComposite(parent);
    Composite rootComposite = toolkit.createFlatFormComposite(root);
    rootComposite.setLayout(new GridLayout(1, true));
    createRootSection(rootComposite, toolkit);

    rootComposite.layout();
    outputComposite.layout();
  }
  /** Note: createControls is not called between selection PE of same type (e.g. transition). */
  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);

    valueLabel = factory.createCLabel(composite, "Condition:");
    nameTextVal = factory.createText(composite, "");

    allowedModes = factory.createCCombo(composite);

    addLayout(parent);

    nameTextVal.addModifyListener(
        new ModifyListener() {

          public void modifyText(ModifyEvent e) {
            // name = Misc.checkString(nameTextVal);
            name = nameTextVal.getText();

            if (listenerFlag) {
              if (!name.equals("") && updateDomainAndPE()) {
                nameTextVal.setBackground(null);
              } else {
                // show error indication
                Display display = Display.getCurrent();
                Color color = display.getSystemColor(SWT.COLOR_RED);
                nameTextVal.setBackground(color);
              }
            }
          }
        });
  }
  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
    FormData data;

    cancelActivityCombo = factory.createCCombo(composite, SWT.NONE);
    cancelActivityCombo.setItems((String[]) cancelFormats.toArray());
    data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
    cancelActivityCombo.setLayoutData(data);
    cancelActivityCombo.addFocusListener(listener);

    createLabel(composite, "Cancel activity", cancelActivityCombo, factory); // $NON-NLS-1$

    messageCombo = getWidgetFactory().createCCombo(composite, SWT.NONE);
    data = new FormData();
    data.left = new FormAttachment(0, 160);
    data.right = new FormAttachment(100, -HSPACE);
    data.top = new FormAttachment(cancelActivityCombo, VSPACE);
    messageCombo.setLayoutData(data);
    messageCombo.addFocusListener(listener);

    createLabel(composite, "Message ref", messageCombo, factory); // $NON-NLS-1$
  }
  public StereotypeImageEditor(Composite parent, int style) {

    TabbedPropertySheetWidgetFactory factory = AbstractEditor.factory;

    composite = factory.createFlatFormComposite(parent);
    FormData data;

    browseButton = factory.createButton(composite, "", SWT.PUSH); // $NON-NLS-1$
    browseButton.setImage(Activator.getDefault().getImage(addImagePath));
    removeButton = factory.createButton(composite, "", SWT.PUSH); // $NON-NLS-1$
    removeButton.setImage(Activator.getDefault().getImage("/icons/delete.gif")); // $NON-NLS-1$
    CLabel iconLabel = factory.createCLabel(composite, "Content: ");

    // browseButton layout
    data = new FormData();
    data.left = new FormAttachment(0, 85);
    data.top = new FormAttachment(0, ITabbedPropertyConstants.HSPACE);
    browseButton.setLayoutData(data);

    // removeButton layout
    data = new FormData();
    data.left = new FormAttachment(browseButton, ITabbedPropertyConstants.HSPACE);
    data.top = new FormAttachment(browseButton, 0, SWT.CENTER);
    removeButton.setLayoutData(data);

    // iconLabel layout
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.top = new FormAttachment(browseButton, 0, SWT.CENTER);
    iconLabel.setLayoutData(data);

    browseButton.addSelectionListener(this);

    removeButton.addSelectionListener(this);
  }
  /*
   * (non-Javadoc)
   *
   * @see
   * org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls
   * (org.eclipse.swt.widgets.Composite,
   * org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
   */
  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    _composite = new PageBook(parent, SWT.NONE);
    factory.adapt(_composite);

    _blank = factory.createFlatFormComposite(_composite);
    _composite.showPage(_blank);
  }
  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);

    initiatorText = createText(composite, factory, null);
    createLabel(composite, "Initiator", initiatorText, factory); // $NON-NLS-1$

    formKeyText = createText(composite, factory, initiatorText);
    createLabel(composite, "Form key:", formKeyText, factory); // $NON-NLS-1$
  }
  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    Composite composite = factory.createFlatFormComposite(parent);
    FormData data;

    Group transactionGroup = factory.createGroup(composite, "Policy Details");
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
    transactionGroup.setLayoutData(data);
    transactionGroup.setLayout(new FormLayout());

    _interactionCombo =
        factory.createCCombo(transactionGroup, SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);
    _interactionCombo.add("None");
    for (String label : _supportedInteractionPolicies) {
      _interactionCombo.add(label);
    }
    data = new FormData();
    data.left = new FormAttachment(5, 100);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
    _interactionCombo.setLayoutData(data);

    _interactionComboLabel = factory.createCLabel(transactionGroup, "Transaction Policy:");
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(_interactionCombo, -HSPACE);
    data.top = new FormAttachment(_interactionCombo, 0, SWT.CENTER);
    _interactionComboLabel.setLayoutData(data);

    _interactionCombo.addSelectionListener(new ComboSelectionListener());

    addDomainListener();
  }
  /** {@inheritDoc} */
  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    final TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    final Composite composite = factory.createFlatFormComposite(parent);
    FormData data;

    nameWidget = factory.createText(composite, "");
    data = new FormData();
    data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, VSPACE);
    nameWidget.setLayoutData(data);

    CLabel valueLabel = factory.createCLabel(composite, "Name");
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(nameWidget, -HSPACE);
    data.top = new FormAttachment(nameWidget, 0, SWT.CENTER);
    valueLabel.setLayoutData(data);
  }
  /**
   * Method createControls.
   *
   * @param parent Composite
   * @param aTabbedPropertySheetPage TabbedPropertySheetPage
   * @see org.eclipse.ui.views.properties.tabbed.ISection#createControls(Composite,
   *     TabbedPropertySheetPage)
   */
  @Override
  public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
    super.createControls(parent, aTabbedPropertySheetPage);

    // Tell element to build its own detailed tab layout
    final TabbedPropertySheetWidgetFactory widgetFactory =
        aTabbedPropertySheetPage.getWidgetFactory();
    final Composite composite = widgetFactory.createFlatFormComposite(parent);
    FormData data = null;

    // Position (read-only)
    widgetFactory.setBorderStyle(SWT.NULL);
    fPositionText = widgetFactory.createText(composite, "", SWT.NULL);
    data = new FormData();
    data.left = new FormAttachment(0, R4EUIConstants.TABBED_PROPERTY_LABEL_WIDTH);
    data.right = new FormAttachment(100, 0); // $codepro.audit.disable numericLiterals
    data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
    fPositionText.setEditable(false);
    fPositionText.setToolTipText(R4EUIConstants.CONTENTS_POSITION_TOOLTIP);
    fPositionText.setLayoutData(data);

    final CLabel positionLabel =
        widgetFactory.createCLabel(composite, R4EUIConstants.POSITION_LABEL);
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(fPositionText, -ITabbedPropertyConstants.HSPACE);
    data.top = new FormAttachment(fPositionText, 0, SWT.CENTER);

    positionLabel.setToolTipText(R4EUIConstants.CONTENTS_POSITION_TOOLTIP);
    positionLabel.setLayoutData(data);

    // Assigned To
    fAssignedToComposite = widgetFactory.createComposite(composite);
    data = new FormData();
    data.left = new FormAttachment(0, R4EUIConstants.TABBED_PROPERTY_LABEL_WIDTH);
    data.right = new FormAttachment(100, 0); // $codepro.audit.disable numericLiterals
    data.top = new FormAttachment(fPositionText, ITabbedPropertyConstants.VSPACE);
    fAssignedToComposite.setToolTipText(R4EUIConstants.ASSIGNED_TO_TOOLTIP);
    fAssignedToComposite.setLayoutData(data);
    fAssignedToComposite.setLayout(new GridLayout(3, false));

    widgetFactory.setBorderStyle(SWT.BORDER);
    fAssignedToText = widgetFactory.createText(fAssignedToComposite, "");
    fAssignedToText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    fAssignedToText.setEditable(false);
    fAssignedToButton =
        widgetFactory.createButton(fAssignedToComposite, R4EUIConstants.ADD_LABEL, SWT.NONE);
    fAssignedToButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
    fAssignedToButton.addListener(
        SWT.Selection,
        new Listener() {
          public void handleEvent(Event event) {
            ((R4EUIContent) fProperties.getElement()).addAssignees(UIUtils.getAssignParticipants());
            refresh();
            R4EUIModelController.getNavigatorView().getTreeViewer().refresh();
          }
        });

    fUnassignedFromButton =
        widgetFactory.createButton(fAssignedToComposite, R4EUIConstants.REMOVE_LABEL, SWT.NONE);
    fUnassignedFromButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
    fUnassignedFromButton.addListener(
        SWT.Selection,
        new Listener() {
          public void handleEvent(Event event) {
            ((R4EUIContent) fProperties.getElement())
                .removeAssignees(UIUtils.getUnassignParticipants(fProperties.getElement()));
            refresh();
            R4EUIModelController.getNavigatorView().getTreeViewer().refresh();
          }
        });

    final CLabel assignedToLabel =
        widgetFactory.createCLabel(composite, R4EUIConstants.ASSIGNED_TO_LABEL);
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(fAssignedToComposite, -ITabbedPropertyConstants.HSPACE);
    data.top = new FormAttachment(fAssignedToComposite, 0, SWT.CENTER);
    assignedToLabel.setToolTipText(R4EUIConstants.ASSIGNED_TO_TOOLTIP);
    assignedToLabel.setLayoutData(data);
  }