private void createPlatformSpecificSection(FormToolkit toolkit, Composite parent) {
    fPlatformSectionControls = new ArrayList();
    // Create the section
    Section section = toolkit.createSection(parent, Section.EXPANDED | Section.TWISTIE);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 3;
    section.setText(SOAMessages.PlatformSpecificPropLabel);
    section.setLayoutData(gd);

    Composite separator = toolkit.createCompositeSeparator(section);
    gd = new GridData(GridData.FILL_BOTH);
    gd.heightHint = 3;
    separator.setLayoutData(gd);

    Composite client = toolkit.createComposite(section, SWT.WRAP);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    layout.marginWidth = 2;
    layout.marginHeight = 2;
    client.setLayout(layout);

    // Fill the section with components
    Composite fieldComposite = toolkit.createComposite(client);
    layout = new GridLayout(2, false);
    gd = new GridData(GridData.FILL_HORIZONTAL);
    fieldComposite.setLayout(layout);
    fieldComposite.setLayoutData(gd);

    Label cicsUriLabel = toolkit.createLabel(fieldComposite, SOAMessages.CICSURILabel);
    fPlatformSectionControls.add(cicsUriLabel);
    fCICSURIText = toolkit.createText(fieldComposite, "", SWT.SINGLE); // $NON-NLS-1$
    gd = new GridData(GridData.FILL_HORIZONTAL);
    fCICSURIText.setLayoutData(gd);
    fCICSURIText.addModifyListener(
        new ModifyListener() {
          public void modifyText(ModifyEvent e) {
            HandleCICSURIModified();
          }
        });
    fPlatformSectionControls.add(fCICSURIText);
    fSOAPServiceSectionControls.add(fCICSURIText);

    toolkit.paintBordersFor(fieldComposite);
    section.setClient(client);

    if (!EDTCoreIDEPlugin.SUPPORT_SOAP) {
      section.setExpanded(false);
      section.setVisible(false);
    }
  }
  protected void createRESTServicePropertiesSection(FormToolkit toolkit, Composite parent) {
    fRESTServiceSectionControls = new ArrayList();
    // Create the section
    Section section = toolkit.createSection(parent, Section.EXPANDED | Section.TWISTIE);
    section.setText(SOAMessages.TitleSectionRestService);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 3;
    section.setLayoutData(gd);

    Composite separator = toolkit.createCompositeSeparator(section);
    gd = new GridData(GridData.FILL_BOTH);
    gd.heightHint = 3;
    separator.setLayoutData(gd);

    Composite client = toolkit.createComposite(section, SWT.WRAP);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    layout.marginWidth = 2;
    layout.marginHeight = 2;
    client.setLayout(layout);

    // Fill the section with components
    Composite fieldComposite = toolkit.createComposite(client);
    int layoutColumn = 3;
    layout = new GridLayout(layoutColumn, false);
    gd = new GridData(GridData.FILL_HORIZONTAL);
    fieldComposite.setLayout(layout);
    fieldComposite.setLayoutData(gd);

    fRestUriLabel = toolkit.createLabel(fieldComposite, SOAMessages.LabelURI);
    fRESTServiceSectionControls.add(fRestUriLabel);
    fRestUri = toolkit.createText(fieldComposite, "", SWT.SINGLE); // $NON-NLS-1$
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = layoutColumn - 1;
    fRestUri.setLayoutData(gd);
    fRestUri.addModifyListener(
        new ModifyListener() {
          public void modifyText(ModifyEvent e) {
            HandleRestURIModified();
          }
        });
    fRESTServiceSectionControls.add(fRestUri);

    createSpacer(toolkit, fieldComposite, layoutColumn);
    toolkit.paintBordersFor(fieldComposite);

    section.setClient(client);
  }
  private void createFormMiscSection(final ScrolledForm form, FormToolkit toolkit) {
    /* Misc. Section */
    Section miscSection = toolkit.createSection(form.getBody(), Section.TWISTIE | Section.EXPANDED);
    miscSection.setActiveToggleColor(toolkit.getHyperlinkGroup().getActiveForeground());
    miscSection.setToggleColor(toolkit.getColors().getColor(FormColors.SEPARATOR));
    toolkit.createCompositeSeparator(miscSection);
    GridData miscSectionGridData = new GridData();
    miscSectionGridData.horizontalSpan = 3;
    miscSectionGridData.horizontalAlignment = GridData.FILL;
    miscSectionGridData.grabExcessHorizontalSpace = true;
    miscSection.setLayoutData(miscSectionGridData);
    miscSection.addExpansionListener(
        new ExpansionAdapter() {
          public void expansionStateChanged(ExpansionEvent e) {
            form.reflow(false);
          }
        });
    miscSection.setText(Messages.getString("ScheduledTaskPage.section.misc"));
    // miscSection.setLayoutData(new TableWrapData(TableWrapData.FILL));

    Composite miscSectionClient = toolkit.createComposite(miscSection);
    miscSectionClient.setLayout(new GridLayout());

    toolkit.createLabel(miscSectionClient, "Pinned Servers");
    GridData taskGroupGridData = new GridData();
    taskGroupGridData.horizontalSpan = 3;
    taskGroupGridData.horizontalAlignment = GridData.FILL;
    taskGroupGridData.grabExcessHorizontalSpace = true;
    pinnedServers = toolkit.createText(miscSectionClient, "");
    pinnedServers.setBackground(new Color(null, 229, 236, 253));
    pinnedServers.setLayoutData(taskGroupGridData);
    pinnedServers.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(ModifyEvent e) {
            setSave(true);
            updateDirtyState();
          }
        });

    miscSection.setClient(miscSectionClient);
  }
  /**
   * Creates the master part of the master-details block.
   *
   * @param managedForm managed for for toolkit reference
   * @param parent composite parent for the part; we put a new composite on it
   */
  protected void createMasterPart(final IManagedForm managedForm, Composite parent) {
    // final ScrolledForm form = managedForm.getForm();
    FormToolkit toolkit = managedForm.getToolkit();
    Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
    section.setText("Contributed Examples");
    section.setDescription("Select a category or example for details");
    section.marginWidth = 10;
    section.marginHeight = 5;
    toolkit.createCompositeSeparator(section);

    Composite client = toolkit.createComposite(section, SWT.WRAP);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    client.setLayout(layout);
    Tree t = toolkit.createTree(client, SWT.NULL);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.heightHint = 300;
    gd.widthHint = 200;
    t.setLayoutData(gd);
    toolkit.paintBordersFor(client);
    section.setClient(client);

    final SectionPart spart = new SectionPart(section);
    managedForm.addPart(spart);

    TreeViewer viewer = new TreeViewer(t);
    viewer.addSelectionChangedListener(
        new ISelectionChangedListener() {
          public void selectionChanged(SelectionChangedEvent event) {
            managedForm.fireSelectionChanged(spart, event.getSelection());
            wizardPage.setSelectedNode(event.getSelection());
          }
        });

    viewer.setContentProvider(new MasterContentProvider());
    viewer.setLabelProvider(new MasterLabelProvider());
    viewer.setInput(ec);
    viewer.expandAll();
  }
  private void createFormTriggerSection(final ScrolledForm form, final FormToolkit toolkit) {
    /* Trigger Information */
    triggerSection = toolkit.createSection(form.getBody(), Section.TWISTIE | Section.EXPANDED);
    triggerSection.setActiveToggleColor(toolkit.getHyperlinkGroup().getActiveForeground());
    triggerSection.setToggleColor(toolkit.getColors().getColor(FormColors.SEPARATOR));
    toolkit.createCompositeSeparator(triggerSection);
    GridData taskImplGridData = new GridData();
    taskImplGridData.horizontalSpan = 3;
    taskImplGridData.horizontalAlignment = GridData.FILL;
    taskImplGridData.grabExcessHorizontalSpace = true;
    triggerSection.addExpansionListener(
        new ExpansionAdapter() {
          public void expansionStateChanged(ExpansionEvent e) {
            form.reflow(false);
          }
        });
    triggerSection.setLayoutData(taskImplGridData);
    triggerSection.setText(Messages.getString("ScheduledTaskPage.section.trigger"));
    // triggerSection.setLayoutData(new TableWrapData(TableWrapData.FILL));

    final Composite triggerSectionClient = toolkit.createComposite(triggerSection);
    triggerSectionClient.setLayout(new GridLayout());

    toolkit.createLabel(triggerSectionClient, "Trigger Type");
    triggerType = new Combo(triggerSectionClient, SWT.READ_ONLY);
    triggerType.setLayoutData(new GridData(GridData.FILL_BOTH));
    // triggerType.setBackground(new Color(null, 229,236,253));
    String[] triggerTypes = {"Simple", "Cron"};
    triggerType.setItems(triggerTypes);

    cronLbl = toolkit.createLabel(triggerSectionClient, "Cron");
    cronLbl.setLayoutData(new GridData(GridData.FILL_BOTH));
    cron = toolkit.createText(triggerSectionClient, "");
    cron.setBackground(new Color(null, 229, 236, 253));
    GridData cronLabelGridData = new GridData();
    cronLabelGridData.horizontalSpan = 3;
    cronLabelGridData.horizontalAlignment = GridData.FILL;
    cronLabelGridData.grabExcessHorizontalSpace = true;
    cron.setLayoutData(cronLabelGridData);
    cron.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(ModifyEvent e) {
            setSave(true);
            updateDirtyState();
          }
        });
    disableCronFields();

    countLbl = toolkit.createLabel(triggerSectionClient, "Count");
    countLbl.setLayoutData(new GridData(GridData.FILL_BOTH));
    count = toolkit.createText(triggerSectionClient, "1");
    count.setBackground(new Color(null, 229, 236, 253));
    GridData countLabelGridData = new GridData();
    countLabelGridData.horizontalSpan = 3;
    countLabelGridData.horizontalAlignment = GridData.FILL;
    countLabelGridData.grabExcessHorizontalSpace = true;
    count.setLayoutData(countLabelGridData);
    count.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(ModifyEvent e) {
            setSave(true);
            updateDirtyState();
          }
        });

    intervalLbl = toolkit.createLabel(triggerSectionClient, "Interval");
    intervalLbl.setLayoutData(new GridData(GridData.FILL_BOTH));
    interval = toolkit.createText(triggerSectionClient, "0");
    interval.setBackground(new Color(null, 229, 236, 253));
    GridData intervalGridData = new GridData();
    intervalGridData.horizontalSpan = 3;
    intervalGridData.horizontalAlignment = GridData.FILL;
    intervalGridData.grabExcessHorizontalSpace = true;
    interval.setLayoutData(intervalGridData);
    interval.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(ModifyEvent e) {
            setSave(true);
            updateDirtyState();
          }
        });
    enableSimpleFields();

    triggerType.addSelectionListener(
        new SelectionListener() {

          @Override
          public void widgetSelected(SelectionEvent e) {
            if (triggerType.getSelectionIndex() == 0) {
              enableSimpleFields();
              disableCronFields();
            } else if (triggerType.getSelectionIndex() == 1) {
              enableCronFields();
              disableSimpleFields();
            }
            setSave(true);
            updateDirtyState();
          }

          @Override
          public void widgetDefaultSelected(SelectionEvent e) {
            // TODO Auto-generated method stub

          }
        });

    triggerSection.setClient(triggerSectionClient);
  }
  private void createFormImplSection(final ScrolledForm form, FormToolkit toolkit) {
    /* Task Implementation Section */
    Section implSection = toolkit.createSection(form.getBody(), Section.TWISTIE | Section.EXPANDED);
    implSection.setActiveToggleColor(toolkit.getHyperlinkGroup().getActiveForeground());
    implSection.setToggleColor(toolkit.getColors().getColor(FormColors.SEPARATOR));
    toolkit.createCompositeSeparator(implSection);
    GridData taskGroupGridData = new GridData();
    taskGroupGridData.horizontalSpan = 3;
    taskGroupGridData.horizontalAlignment = GridData.FILL;
    taskGroupGridData.grabExcessHorizontalSpace = true;
    implSection.setLayoutData(taskGroupGridData);
    implSection.addExpansionListener(
        new ExpansionAdapter() {
          public void expansionStateChanged(ExpansionEvent e) {
            form.reflow(false);
          }
        });
    implSection.setText(Messages.getString("ScheduledTaskPage.section.impl"));
    // implSection.setLayoutData(new TableWrapData(TableWrapData.FILL));

    Composite implSectionClient = toolkit.createComposite(implSection);
    implSectionClient.setLayout(new GridLayout());

    toolkit.createLabel(implSectionClient, "Task Implementation");
    GridData taskImplGridData = new GridData();
    taskImplGridData.horizontalSpan = 3;
    taskImplGridData.horizontalAlignment = GridData.FILL;
    taskImplGridData.grabExcessHorizontalSpace = true;
    taskImpl =
        toolkit.createText(implSectionClient, "org.apache.synapse.startup.tasks.MessageInjector");
    taskImpl.setLayoutData(taskImplGridData);
    taskImpl.setBackground(new Color(null, 229, 236, 253));
    taskImpl.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(ModifyEvent e) {
            setSave(true);
            updateDirtyState();
          }
        });
    // taskImpl.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

    Button taskImplButton =
        toolkit.createButton(implSectionClient, "Task Implementation Properties", SWT.PUSH);
    taskImplButton.addSelectionListener(
        new SelectionListener() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            Shell shell = Display.getDefault().getActiveShell();
            TaskPropertyDialog taskPropDialog =
                new TaskPropertyDialog(shell, getTaskImpl().getText(), getTaskPropertyList());
            taskPropDialog.setBlockOnOpen(true);
            taskPropDialog.open();
            taskPropertyList = taskPropDialog.getTaskPropertyList();
            setSave(true);
            updateDirtyState();
          }

          @Override
          public void widgetDefaultSelected(SelectionEvent e) {
            // TODO Auto-generated method stub

          }
        });

    setTaskPropertyList(taskPropertyList);

    implSection.setClient(implSectionClient);
  }
  private void createFormBasicSection(final ScrolledForm form, FormToolkit toolkit) {
    /* Basic Section */
    Section basicSection =
        toolkit.createSection(form.getBody(), Section.TWISTIE | Section.EXPANDED);
    basicSection.setActiveToggleColor(toolkit.getHyperlinkGroup().getActiveForeground());
    basicSection.setToggleColor(toolkit.getColors().getColor(FormColors.SEPARATOR));
    toolkit.createCompositeSeparator(basicSection);
    GridData samplegridData = new GridData();
    samplegridData.horizontalSpan = 3;
    samplegridData.horizontalAlignment = SWT.FILL;
    samplegridData.grabExcessHorizontalSpace = true;
    basicSection.addExpansionListener(
        new ExpansionAdapter() {
          public void expansionStateChanged(ExpansionEvent e) {
            form.reflow(false);
          }
        });
    basicSection.setLayoutData(samplegridData);
    basicSection.setText(Messages.getString("ScheduledTaskPage.section.basic"));
    // section.setLayoutData(new TableWrapData(TableWrapData.FILL));

    Composite basicSectionClient = toolkit.createComposite(basicSection);
    basicSectionClient.setLayout(new GridLayout());

    toolkit.createLabel(basicSectionClient, "Task Name");
    taskName = toolkit.createText(basicSectionClient, "");
    taskName.setBackground(new Color(null, 229, 236, 253));
    taskName.setSize(8000, 10);
    GridData taskNameGridData = new GridData();
    taskNameGridData.horizontalSpan = 3;
    taskNameGridData.horizontalAlignment = GridData.FILL;
    taskNameGridData.grabExcessHorizontalSpace = true;
    taskName.setLayoutData(taskNameGridData);
    taskName.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(ModifyEvent e) {
            setSave(true);
            updateDirtyState();
          }
        });

    toolkit.createLabel(basicSectionClient, "Task Group");
    taskGroup = toolkit.createText(basicSectionClient, "synapse.simple.quartz");
    taskGroup.setBackground(new Color(null, 229, 236, 253));
    GridData taskGroupGridData = new GridData();
    taskGroupGridData.horizontalSpan = 3;
    taskGroupGridData.horizontalAlignment = GridData.FILL;
    taskGroupGridData.grabExcessHorizontalSpace = true;
    taskGroup.setLayoutData(taskGroupGridData);
    taskGroup.addModifyListener(
        new ModifyListener() {
          @Override
          public void modifyText(ModifyEvent e) {
            setSave(true);
            updateDirtyState();
          }
        });

    basicSection.setClient(basicSectionClient);
  }
  protected void createSOAPServicePropertiesSection(FormToolkit toolkit, Composite parent) {
    fSOAPServiceSectionControls = new ArrayList();
    fSOAPWSDLControls = new ArrayList();
    // Create the section
    Section section = toolkit.createSection(parent, Section.EXPANDED | Section.TWISTIE);
    section.setText(SOAMessages.WebServiceProp);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.horizontalSpan = 3;
    section.setLayoutData(gd);

    Composite separator = toolkit.createCompositeSeparator(section);
    gd = new GridData(GridData.FILL_BOTH);
    gd.heightHint = 3;
    separator.setLayoutData(gd);

    Composite client = toolkit.createComposite(section, SWT.WRAP);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    layout.marginWidth = 2;
    layout.marginHeight = 2;
    client.setLayout(layout);

    // Fill the section with components
    Composite fieldComposite = toolkit.createComposite(client);
    int layoutColumn = 3;
    layout = new GridLayout(layoutColumn, false);
    gd = new GridData(GridData.FILL_HORIZONTAL);
    fieldComposite.setLayout(layout);
    fieldComposite.setLayoutData(gd);

    // createSpacer(toolkit, fieldComposite, layoutColumn);
    fUseExistingBtn = toolkit.createButton(fieldComposite, SOAMessages.UseExistingWSDL, SWT.CHECK);
    gd = new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_BEGINNING);
    gd.horizontalSpan = layoutColumn;
    fUseExistingBtn.setLayoutData(gd);
    fUseExistingBtn.addSelectionListener(
        new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
            HandleUseExistingPressed();
          }
        });
    fSOAPServiceSectionControls.add(fUseExistingBtn);

    fLabelStyle = toolkit.createLabel(fieldComposite, SOAMessages.StyleLabel);
    fSOAPServiceSectionControls.add(fLabelStyle);

    fComboStyle = new CCombo(fieldComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.FLAT);
    toolkit.adapt(fComboStyle, true, true);
    fComboStyle.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
    // initStyleComboItems();
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = nColumnSpan - 1;
    fComboStyle.setLayoutData(gd);
    fComboStyle.addSelectionListener(
        new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
            HandleStyleComboSelectionChanged();
          }
        });
    fComboStyle.addFocusListener(
        new FocusAdapter() {
          public void focusGained(FocusEvent e) {
            initStyleComboItems();
          }
        });
    fSOAPServiceSectionControls.add(fComboStyle);

    fLabelWSDLFile = toolkit.createLabel(fieldComposite, SOAMessages.WSDLFileLabel);
    fSOAPServiceSectionControls.add(fLabelWSDLFile);
    fSOAPWSDLControls.add(fLabelWSDLFile);

    fWSDLFileText = toolkit.createText(fieldComposite, "", SWT.READ_ONLY); // $NON-NLS-1$
    gd = new GridData(GridData.FILL_HORIZONTAL);
    fWSDLFileText.setLayoutData(gd);
    fSOAPServiceSectionControls.add(fWSDLFileText);
    fSOAPWSDLControls.add(fWSDLFileText);

    fBrowseBtn = toolkit.createButton(fieldComposite, "...", SWT.PUSH); // $NON-NLS-1$
    gd = new GridData();
    fBrowseBtn.setLayoutData(gd);
    fBrowseBtn.addSelectionListener(
        new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
            HandleBrowsePressed();
          }
        });
    fSOAPServiceSectionControls.add(fBrowseBtn);
    fSOAPWSDLControls.add(fBrowseBtn);

    fLabelService = toolkit.createLabel(fieldComposite, SOAMessages.WSDLServiceLabel);
    fSOAPServiceSectionControls.add(fLabelService);
    fSOAPWSDLControls.add(fLabelService);

    fComboService = new CCombo(fieldComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.FLAT);
    toolkit.adapt(fComboService, true, true);
    fComboService.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = layoutColumn - 1;
    fComboService.setLayoutData(gd);
    fComboService.addSelectionListener(
        new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
            HandleServiceComboSelectionChanged();
          }
        });
    fSOAPServiceSectionControls.add(fComboService);
    fSOAPWSDLControls.add(fComboService);

    fLabelPort = toolkit.createLabel(fieldComposite, SOAMessages.WSDLPortLabel);
    fSOAPServiceSectionControls.add(fLabelPort);
    fSOAPWSDLControls.add(fLabelPort);

    fComboPort = new CCombo(fieldComposite, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.FLAT);
    toolkit.adapt(fComboPort, true, true);
    fComboPort.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = layoutColumn - 1;
    fComboPort.setLayoutData(gd);
    fComboPort.addSelectionListener(
        new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
            HandlePortComboSelectionChanged();
          }
        });
    fSOAPServiceSectionControls.add(fComboPort);
    fSOAPWSDLControls.add(fComboPort);

    createSpacer(toolkit, fieldComposite, layoutColumn);
    toolkit.paintBordersFor(fieldComposite);

    section.setClient(client);

    if (!EDTCoreIDEPlugin.SUPPORT_SOAP) {
      section.setExpanded(false);
      section.setVisible(false);
    }
  }