/*
   * (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);

    final TabbedPropertySheetWidgetFactory factory = getWidgetFactory();
    _panel = factory.createComposite(parent);
    _panel.setLayout(new GridLayout(3, false));

    _newBPELLink = new Link(_panel, SWT.NONE);
    _newBPELLink.setText("<a>BPEL File:</a>");
    _newBPELLink.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent event) {
            openFile();
          }
        });

    _bpelFileText = factory.createText(_panel, "", SWT.READ_ONLY);
    _bpelFileText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    _bpelFileText.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(ModifyEvent event) {
            final QName newValue =
                _bpelFileText.getText().length() == 0
                    ? null
                    : QName.valueOf(_bpelFileText.getText());
            if (!_updating
                && ((newValue == null && _implementation.getProcess() != null)
                    || (newValue != null && !newValue.equals(_implementation.getProcess())))) {
              wrapOperation(
                  new Runnable() {
                    public void run() {
                      _implementation.setProcess(newValue);
                    }
                  });
            }
          }
        });

    _browseBPELButton = factory.createButton(_panel, "Browse...", SWT.PUSH);
    _browseBPELButton.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent event) {
            handleBrowse();
          }
        });
  }
  @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);
  }
 @Override
 public void aboutToBeHidden() {
   _inUpdate = true;
   super.aboutToBeHidden();
 }
 @Override
 public void dispose() {
   removeDomainListener();
   super.dispose();
 }