/**
   * Creates the Quartz controls.
   *
   * @param parent the parent
   * @param editorStyle true to use the editor style, false for wizards
   */
  public void createControls(final Composite parent, boolean editorStyle) {

    Label l =
        SwtFactory.createLabel(
            parent, Messages.cronExpression, "A CRON expression to schedule service invocations");
    if (editorStyle) l.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_DARK_BLUE));

    this.cronText = SwtFactory.createSimpleTextField(parent, true);

    Link cronLink = new Link(parent, SWT.NONE);
    cronLink.setText("<A>" + Messages.cronHelp + "</A>");
    cronLink.setLayoutData(new GridData(SWT.RIGHT, SWT.DEFAULT, true, false, 2, 1));
    cronLink.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(SelectionEvent e) {
            try {
              final IWebBrowser browser =
                  PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser();
              browser.openURL(
                  new URL(
                      "http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger"));

            } catch (Exception ex) {
              PetalsQuartzPlugin.log(ex, IStatus.ERROR);
              new ErrorDialog(
                      parent.getShell(),
                      Messages.couldNotOpenEditorTitle,
                      Messages.couldNotOpenEditorMessage,
                      new Status(IStatus.ERROR, PetalsQuartzPlugin.PLUGIN_ID, ex.getMessage()),
                      0)
                  .open();
            }
          }
        });

    // The message skeleton
    l =
        SwtFactory.createLabel(
            parent, Messages.content, "A XML message to send to the target service");
    GridDataFactory.swtDefaults().indent(0, 5).span(2, 1).applyTo(l);
    if (editorStyle) l.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_DARK_BLUE));

    this.msgText = SwtFactory.createXmlTextViewer(parent);
    GridDataFactory.swtDefaults()
        .align(SWT.FILL, SWT.FILL)
        .grab(true, true)
        .span(2, 1)
        .applyTo(this.msgText.getParent());
  }