/** Carga los controles (combos y cajas de texto) */
  public void inicializar() {
    // Clean
    lbIconConcepto.setVisible(false);
    lbIconRubro.setVisible(false);

    txConcepto.setText("");
    rubros = contable.getAllRubros();

    cbRubro.removeAll();
    for (Rubro r : rubros) {
      cbRubro.add(r.getRubro());
    }
    if (cbRubro.getItemCount() > 0) cbRubro.select(0);

    // Load. Si está editando, carga los campos del concepto

    if (concepto != null) {
      if (concepto.getConcepto() != null) txConcepto.setText(concepto.getConcepto());
      if (concepto.getCosto() != null) {
        for (int i = 0; i < rubros.size(); i++) {
          if (rubros.get(i).getRubro().equals(concepto.getCosto().getRubro())) {
            cbRubro.select(i);
            break;
          }
        }
      }
    }

    txConcepto.setFocus();
  }
 private void initRefinesButton() {
   if (composer.refines()) {
     buttonRefines.setVisible(true);
     labelRefines.setVisible(true);
   } else {
     buttonRefines.setVisible(false);
     labelRefines.setVisible(false);
   }
 }
 private void initTextModulename() {
   if (composer.hasCustomFilename()) {
     textModulename.setVisible(true);
     labelModulename.setVisible(true);
   } else {
     textModulename.setVisible(false);
     labelModulename.setVisible(false);
   }
 }
Example #4
0
  @Override
  public void refresh() {
    super.refresh();
    updateLanguageCombo();
    AllLanguages allLanguages = test.getAllLanguages();

    if (allLanguages.isEmpty()) {
      removeButton.setVisible(false);
      refreshButton.setVisible(false);
      openI18nFileButton.setVisible(false);
      selectLabel.setVisible(false);
      languageCombo.setVisible(false);

    } else {
      removeButton.setVisible(true);
      refreshButton.setVisible(true);
      openI18nFileButton.setVisible(true);
      selectLabel.setVisible(true);
      languageCombo.setVisible(true);
    }

    Language currentLanguage = allLanguages.getCurrentLanguage();
    if (currentLanguage != null) {
      if (currentLanguage.isEmpty()) {
        noI18nValuesLabel.setVisible(true);
        noObserversLabel.setVisible(false);
      } else if (!allLanguages.hasObservers()) {
        noI18nValuesLabel.setVisible(false);
        noObserversLabel.setVisible(true);
      } else {
        noI18nValuesLabel.setVisible(false);
        noObserversLabel.setVisible(false);
      }
    }
  }
  /**
   * Tries to resolve the value entered in the link target field as a variable, if the value is a
   * relative path. Displays the resolved value if the entered value is a variable.
   */
  private void resolveVariable() {
    IPathVariableManager pathVariableManager =
        RemoteResourcesPlugin.getWorkspace().getPathVariableManager();
    IPath path = new Path(linkTarget);
    IPath resolvedPath = pathVariableManager.resolvePath(path);

    if (path.equals(resolvedPath)) {
      resolvedPathLabelText.setVisible(false);
      resolvedPathLabelData.setVisible(false);
    } else {
      resolvedPathLabelText.setVisible(true);
      resolvedPathLabelData.setVisible(true);
    }
    resolvedPathLabelData.setText(resolvedPath.toOSString());
  }
  private void restoreFileVersion(FileVersion fileVersion) {
    // Set labels/status
    String shortFileName = shortenFileName(fileVersion.getPath());
    String versionStr = Long.toString(fileVersion.getVersion());

    restoreButton.setEnabled(false);
    restoreStatusIconComposite.setVisible(true);
    restoreStatusTextLabel.setVisible(true);

    restoreStatusIconComposite.setAnimatedImage(
        IMAGE_LOADING_SPINNER_RESOURCE, IMAGE_LOADING_SPINNER_FRAME_RATE);
    restoreStatusTextLabel.setText(
        I18n.getText(
            "org.syncany.gui.history.DetailPanel.label.fileRestoreOngoing",
            shortFileName,
            versionStr));
    restoreStatusTextLabel.setCursor(new Cursor(Display.getDefault(), SWT.CURSOR_ARROW));
    restoreStatusTextLabel.setToolTipText("");

    restoredFile = null;

    layout();

    // Send restore request
    RestoreOperationOptions restoreOptions = new RestoreOperationOptions();
    restoreOptions.setFileHistoryId(fileVersion.getFileHistoryId());
    restoreOptions.setFileVersion(fileVersion.getVersion().intValue());

    pendingRestoreRequest = new RestoreFolderRequest();
    pendingRestoreRequest.setRoot(historyModel.getSelectedRoot());
    pendingRestoreRequest.setOptions(restoreOptions);

    eventBus.post(pendingRestoreRequest);
  }
 private void disableSimpleFields() {
   countLbl.setVisible(false);
   count.setVisible(false);
   intervalLbl.setVisible(false);
   interval.setVisible(false);
   GridData gd = (GridData) count.getLayoutData();
   gd.exclude = true;
   GridData gdlbl = (GridData) countLbl.getLayoutData();
   gdlbl.exclude = true;
   GridData gdEvent = (GridData) interval.getLayoutData();
   gdEvent.exclude = true;
   GridData gdeventlbl = (GridData) intervalLbl.getLayoutData();
   gdeventlbl.exclude = true;
   triggerSection.setExpanded(false);
   triggerSection.setExpanded(true);
 }
 protected void setStatus(IStatus status) {
   if (status == null || status.isOK()) {
     errorLabel.setText("");
     errorImage.setImage(null);
   } else {
     errorLabel.setText(status.getMessage());
     errorLabel.setToolTipText(status.getMessage());
     Image toUse = null;
     switch (status.getSeverity()) {
       case IStatus.WARNING:
         toUse =
             PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
         break;
       case IStatus.ERROR:
         toUse =
             PlatformUI.getWorkbench()
                 .getSharedImages()
                 .getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
         break;
       case IStatus.INFO:
         toUse =
             PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK);
         break;
     }
     errorImage.setImage(toUse);
     errorImage.setVisible(true);
   }
 }
    protected void setValidationMessage(String message) {
      icon.setVisible(message != null);
      hintText.setVisible(message != null);
      hintText.setText(StringUtil.nullAsEmpty(message));

      topControl.getParent().layout();
    }
 protected void enableFields() {
   boolean enabled = wRunningInParallel.getSelection();
   wlFileType.setVisible(enabled);
   wlFileType.setEnabled(enabled);
   wFileType.setVisible(enabled);
   wFileType.setEnabled(enabled);
 }
  private void addAutoActivationSection(final Composite composite) {
    autoActivateButton = new Button(composite, SWT.CHECK);
    autoActivateButton.setText("&Enable auto activation");
    GridData gd;
    // gd = new GridData(SWT.FILL, SWT.FILL, true,
    // false, 3, 1);
    gd = new GridData();
    gd.horizontalSpan = 3;
    autoActivateButton.setLayoutData(gd);

    autoActivateButton.addSelectionListener(
        new SelectionAdapter() {
          @Override
          public void widgetSelected(final SelectionEvent e) {
            updateAutoActivationControls();
          }
        });

    delayText = addLabelledTextField(composite, "Auto activation dela&y:", 4, 0);
    erlangTriggersText =
        addLabelledTextField(composite, "Auto activation triggers for &Erlang:", 100, 4, 0);
    eDocTriggersText =
        addLabelledTextField(composite, "Auto activation triggers for E&Doc:", 100, 4, 0);
    eDocTriggersText.setVisible(false);
    labelControl.setVisible(false);
  }
 private void setVisibility() {
   if (type == Editor.DETAILS) {
     cancelButton.setVisible(false);
     statusBar.setVisible(false);
     butApply.setVisible(false);
   }
 }
Example #13
0
  @Override
  public void createControl(Composite parent) {
    initializeDialogUnits(parent);
    readConfiguration();

    Composite result = new Composite(parent, SWT.NONE);
    result.setFont(parent.getFont());
    GridLayout layout = new GridLayout(2, false);
    result.setLayout(layout);

    addTextPatternControls(result);

    Label separator = new Label(result, SWT.NONE);
    separator.setVisible(false);
    GridData data = new GridData(GridData.FILL, GridData.FILL, false, false, 2, 1);
    data.heightHint = convertHeightInCharsToPixels(1) / 3;
    separator.setLayoutData(data);

    addFileNameControls(result);

    setControl(result);
    Dialog.applyDialogFont(result);
    PlatformUI.getWorkbench()
        .getHelpSystem()
        .setHelp(result, ISearchHelpContextIds.TEXT_SEARCH_PAGE);
  }
  public static void addEmptyLabel(Composite parent, int horizontalSpan) {
    Label label = new Label(parent, SWT.NONE);
    label.setVisible(false);

    GridData gd = new GridData();
    gd.horizontalSpan = horizontalSpan;
    label.setLayoutData(gd);
  }
  private void setResults(List<ExtractedEntry> entries, List<Exception> errors) {
    checkEntries(entries);

    allEntries.addAll(entries);
    tableViewer.setInput(allEntries);
    errorTableViewer.setInput(errors);

    for (ExtractedEntry entry : entries) {
      if (entry.getItem() instanceof Extractor.AccountTransferItem) {
        lblSecondaryAccount.setVisible(true);
        secondaryAccount.getControl().setVisible(true);
      } else if (entry.getItem() instanceof Extractor.PortfolioTransferItem) {
        lblSecondaryPortfolio.setVisible(true);
        secondaryPortfolio.getControl().setVisible(true);
      }
    }
  }
  private void validar() throws Exception {
    boolean hayError = false;

    if (cbRubro.getSelectionIndex() == -1) {
      lbIconRubro.setVisible(true);
      hayError = true;
      cbRubro.setFocus();
    } else lbIconRubro.setVisible(false);

    if (txConcepto.getText().length() <= 0) {
      lbIconConcepto.setVisible(true);
      hayError = true;
      txConcepto.setFocus();
    } else lbIconConcepto.setVisible(false);

    if (hayError)
      throw new Exception("Existe un error en los datos ingresados, siga las indicaciones");
  }
 private void disableCronFields() {
   cron.setVisible(false);
   cronLbl.setVisible(false);
   GridData gd = (GridData) cron.getLayoutData();
   gd.exclude = true;
   GridData gdlbl = (GridData) cronLbl.getLayoutData();
   gdlbl.exclude = true;
   triggerSection.setExpanded(false);
   triggerSection.setExpanded(true);
 }
Example #18
0
 /**
  * setzt den Text des Verifiziert-Labels in Abhängigkeit von b: wenn b true ist, wird der Text in
  * grün ausgegeben, ansonsten in rot
  *
  * @param b gibt an, ob Bob das Ergebnis verifiziert hat oder nicht
  */
 public void setVerifiziert(boolean b) {
   if (b) {
     verifiziert.setText(Messages.GParamsBob_3);
     verifiziert.setForeground(group.getDisplay().getSystemColor(SWT.COLOR_DARK_GREEN));
   } else {
     verifiziert.setText(Messages.GParamsBob_4);
     verifiziert.setForeground(group.getDisplay().getSystemColor(SWT.COLOR_RED));
   }
   verifiziert.setVisible(true);
 }
  /**
   * Creates the controls to show error message.
   *
   * @param parent The parent composite
   */
  private void createErrorMessageControls(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout(2, false);
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    errorImageLabel = new Label(composite, SWT.NONE);
    errorImageLabel.setImage(getErrorImage());
    errorImageLabel.setVisible(false);

    errorMessageLabel = new Label(composite, SWT.READ_ONLY | SWT.WRAP);
    errorMessageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  }
  /**
   * Create the composite for the resolved path.
   *
   * @param locationGroup
   * @param indent
   */
  private void createResolvedPathGroup(Composite locationGroup, int indent) {
    GridLayout layout;
    GridData data;
    Composite resolvedPathGroup = new Composite(locationGroup, SWT.NONE);
    layout = new GridLayout();
    layout.numColumns = 2;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    resolvedPathGroup.setLayout(layout);
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalIndent = indent;
    resolvedPathGroup.setLayoutData(data);

    resolvedPathLabelText = new Label(resolvedPathGroup, SWT.SINGLE);
    resolvedPathLabelText.setText(IDEWorkbenchMessages.CreateLinkedResourceGroup_resolvedPathLabel);
    resolvedPathLabelText.setVisible(false);

    resolvedPathLabelData = new Label(resolvedPathGroup, SWT.SINGLE);
    data = new GridData(GridData.FILL_HORIZONTAL);
    resolvedPathLabelData.setLayoutData(data);
    resolvedPathLabelData.setVisible(false);
  }
  private void initialize() {
    nameText.setText(annotation.getName());
    nameText.setSelection(0, nameText.getText().length());
    snapToTrace.setSelection(!annotation.isFree());
    xAxisLabel.setText(
        snapToTrace.getSelection() ? Messages.Annotation_Trace : Messages.Annotation_XAxis);
    xAxisOrTraceCombo.removeAll();
    if (!annotation.isFree()) {
      for (Trace trace : xyGraph.getPlotArea().getTraceList())
        xAxisOrTraceCombo.add(trace.getName());
      xAxisOrTraceCombo.select(xyGraph.getPlotArea().getTraceList().indexOf(annotation.getTrace()));
    } else {
      for (Axis axis : xyGraph.getXAxisList()) xAxisOrTraceCombo.add(axis.getTitle());
      xAxisOrTraceCombo.select(xyGraph.getXAxisList().indexOf(annotation.getXAxis()));
    }
    for (Axis axis : xyGraph.getYAxisList()) yAxisCombo.add(axis.getTitle());
    yAxisCombo.select(xyGraph.getYAxisList().indexOf(annotation.getYAxis()));
    yAxisLabel.setVisible(!snapToTrace.getSelection());
    yAxisCombo.setVisible(!snapToTrace.getSelection());
    useDefaultColorButton.setSelection(annotation.getAnnotationColor() == null);
    colorLabel.setVisible(!useDefaultColorButton.getSelection());
    colorSelector.getButton().setVisible(annotation.getAnnotationColor() != null);
    colorSelector.setColorValue(
        annotation.getAnnotationColor() == null
            ? annotation.getYAxis().getForegroundColor().getRGB()
            : annotation.getAnnotationColor().getRGB());

    fontLabel.setText(
        Messages.Annotation_Font
            + (font == null ? Messages.Annotation_SystemDefault : font.getFontData()[0].getName()));
    fontLabel.setFont(font);
    cursorLineCombo.select(annotation.getCursorLineStyle().getIndex());
    showNameButton.setSelection(annotation.isShowName());
    showSampleInfoButton.setSelection(annotation.isShowSampleInfo());
    showPositionButton.setSelection(annotation.isShowPosition());
  }
  /**
   * Validates the entered title name.
   *
   * @param text The entered text
   */
  void validate(String text) {
    String errorMessage = ""; // $NON-NLS-1$
    for (IMonitoredMXBeanGroup group : jvm.getMBeanServer().getMonitoredAttributeGroups()) {
      if (group.getName().equals(text) && !originalChartTitle.equals(text)) {
        errorMessage = Messages.chartTitleDuplicatedMsg;
        break;
      }
    }

    if (text.isEmpty()) {
      errorMessage = Messages.chartTitleEmptyMsg;
    }

    errorImageLabel.setVisible(!errorMessage.isEmpty());
    errorMessageLabel.setText(errorMessage);
    setOkButtonVisible(errorMessage.isEmpty());
  }
Example #23
0
  /** Performs layouting. */
  private void layout() {

    // Disable redrawing
    toolbar.setRedraw(false);

    // Adjust size of items and composite
    Rectangle bounds = toolbar.getBounds();
    int remaining = toolbar.getBounds().width;
    for (final ToolItem item : toolitems) {
      remaining -= item.getBounds().width;
    }
    remaining -= OFFSET;
    infoComposite.setSize(remaining, bounds.height);
    infoItem.setWidth(remaining);
    int locationY = (infoComposite.getBounds().height - labelSelected.getBounds().height) / 2;

    // Layout label
    int locationX = remaining - labelApplied.getSize().x;
    labelApplied.setLocation(locationX, locationY);
    if (locationX < 0) labelApplied.setVisible(false);
    else labelApplied.setVisible(true);

    // Layout label
    locationX -= labelSelected.getSize().x + OFFSET;
    labelSelected.setLocation(locationX, locationY);
    if (locationX < 0) labelSelected.setVisible(false);
    else labelSelected.setVisible(true);

    // Layout label
    locationX -= labelTransformations.getSize().x + OFFSET;
    labelTransformations.setLocation(locationX, locationY);
    if (locationX < 0) labelTransformations.setVisible(false);
    else labelTransformations.setVisible(true);

    // Layout label
    locationX -= labelAttribute.getSize().x + OFFSET;
    labelAttribute.setLocation(locationX, locationY);
    if (locationX < 0) labelAttribute.setVisible(false);
    else labelAttribute.setVisible(true);

    // Redraw
    toolbar.setRedraw(true);
  }
Example #24
0
  protected void createButtonArea(final Shell parent) {
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout(3, false));

    GridData gdLabel = new GridData();
    gdLabel.widthHint = 240;

    fErrorLabel = new Label(container, SWT.NONE);
    fErrorLabel.setLayoutData(gdLabel);
    fErrorLabel.setForeground(new Color(null, new RGB(255, 0, 0)));
    fErrorLabel.setText(Messages.getString("FilterDialog_PatternValidationError"));
    fErrorLabel.setVisible(false);

    GridData gdButton = new GridData();
    gdButton.widthHint = 75;

    fAddButton = new Button(container, SWT.PUSH);
    fAddButton.setText(Messages.getString("Common_AddButton"));
    fAddButton.setLayoutData(gdButton);
    fAddButton.addSelectionListener(
        new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
            try {
              fErrorLabel.setVisible(false);
              Pattern.compile(fAddText.getText());
              setChosenFilter(fAddText.getText());
              parent.dispose();
            } catch (PatternSyntaxException ex) {
              fErrorLabel.setVisible(true);
            }
          }
        });

    fCancelButton = new Button(container, SWT.PUSH);
    fCancelButton.setText(Messages.getString("Common_CancelButton"));
    fCancelButton.setLayoutData(gdButton);
    fCancelButton.addSelectionListener(
        new SelectionAdapter() {
          public void widgetSelected(SelectionEvent e) {
            parent.dispose();
          }
        });

    parent.setDefaultButton(fAddButton);
  }
 private void validateCamelVersion() {
   if (getSelectedCamelVersion() != null && !isCamelVersionValid(getSelectedCamelVersion())) {
     if (!Widgets.isDisposed(camelInfoText)) {
       camelInfoText.setText(
           NLS.bind(
               Messages.newProjectWizardRuntimePageCamelVersionInvalidWarning,
               getSelectedCamelVersion()));
       setPageComplete(false);
     }
   } else {
     if (!Widgets.isDisposed(camelInfoText)) {
       camelInfoText.setText(""); // $NON-NLS-1$
     }
   }
   if (!Widgets.isDisposed(warningIconLabel) && !Widgets.isDisposed(camelInfoText)) {
     warningIconLabel.setVisible(camelInfoText.getText().length() > 0);
   }
 }
Example #26
0
  /**
   * Konstruktor, der die graphischen Komponenten erstellt und eingefügt. Die Group besteht aus
   * einem Label, das den Namen enthält und je einem CombiLabel für den Wert vom Attribut b
   * darstellen.
   */
  public GParamsBob(GBob bob, Composite parent) {
    super(parent);
    // group.setSize(30, 121);
    group.setText(Messages.GParamsBob_0);

    this.bob = bob;

    b = new GCombiLabel(Messages.GParamsBob_1, false, group);
    b.getComp().setLocation(90, 25);

    verifiziert = new Label(group, 0);
    verifiziert.setFont(FontService.getNormalBoldFont());
    verifiziert.setText(Messages.GParamsBob_2);
    // verifiziert.setBounds(100, 90, 130, 20);
    verifiziert.setVisible(false);
    GridData gridData = new GridData();
    gridData.widthHint = 200;
    verifiziert.setLayoutData(gridData);
    setVisible(true);
  }
  private void updateRestoreStatus(
      RestoreFolderRequest restoreRequest, RestoreFolderResponse restoreResponse) {
    RestoreOperationResult restoreResult = restoreResponse.getResult();
    RestoreResultCode restoreResultCode = restoreResult.getResultCode();

    // Set labels/status
    restoreButton.setEnabled(true);
    restoreStatusIconComposite.setVisible(true);
    restoreStatusTextLabel.setVisible(true);

    if (restoreResultCode == RestoreResultCode.ACK) {
      String shortFileName = shortenFileName(restoreResult.getTargetFile().getAbsolutePath());
      logger.log(
          Level.INFO,
          "Detail panel: Restore successful, file restored to "
              + restoreResult.getTargetFile().toString());

      restoreStatusIconComposite.setImage(
          SWTResourceManager.getImage(String.format(IMAGE_RESOURCE_FORMAT, "success")));
      restoreStatusTextLabel.setText(
          I18n.getText(
              "org.syncany.gui.history.DetailPanel.label.fileRestoreSuccess", shortFileName));
      restoreStatusTextLabel.setCursor(new Cursor(Display.getDefault(), SWT.CURSOR_HAND));
      restoreStatusTextLabel.setToolTipText(restoreResult.getTargetFile().toString());

      restoredFile = restoreResult.getTargetFile();
    } else {
      logger.log(Level.WARNING, "Detail panel: Restore FAILED, error code " + restoreResultCode);

      restoreStatusIconComposite.setImage(
          SWTResourceManager.getImage(String.format(IMAGE_RESOURCE_FORMAT, "failure")));
      restoreStatusTextLabel.setText(
          I18n.getText("org.syncany.gui.history.DetailPanel.label.fileRestoreFailure"));
      restoreStatusTextLabel.setCursor(new Cursor(Display.getDefault(), SWT.CURSOR_ARROW));
      restoreStatusTextLabel.setToolTipText("");

      restoredFile = null;
    }

    layout();
  }
 /** エラー表示を更新 */
 private void updateErrorLabel() {
   int state = GlobalContext.getState();
   Label errorLabel = ApplicationMain.main.getErrorLabel();
   boolean printLabel = false;
   String errorText = "正常";
   if ((state != 0) && (state != 1)) {
     errorText = "データが不完全です(理由不明)";
     if (state == 2) {
       errorText = "艦これのリロードが必要です";
     } else if (state == 3) {
       errorText = "航海日誌の再起動が必要です\r\n(アカウントが変更されたため)";
     }
     printLabel = true;
   }
   if ((errorLabel.getText().equals(errorText) == false)
       || (errorLabel.getVisible() != printLabel)) {
     errorLabel.setText(errorText);
     LayoutLogic.hide(errorLabel, !printLabel);
     errorLabel.setVisible(printLabel);
     ApplicationMain.main.getMainComposite().layout();
   }
 }
  private Control createSearchFor(final Composite parent) {
    final Group result = new Group(parent, SWT.NONE);
    result.setText("Search For");
    result.setLayout(new GridLayout(2, true));

    fSearchFor =
        new Button[] {
          createRadioButton(result, "Function", SearchFor.FUNCTION),
          createRadioButton(result, "Record", SearchFor.RECORD),
          createRadioButton(result, "Macro", SearchFor.MACRO),
          createRadioButton(result, "Type", SearchFor.TYPE),
          createRadioButton(result, "Include", SearchFor.INCLUDE),
          createRadioButton(result, "Record field", SearchFor.RECORD_FIELD),
          createRadioButton(result, "Variable", SearchFor.VARIABLE)
        };

    // Fill with dummy radio buttons
    final Label filler = new Label(result, SWT.NONE);
    filler.setVisible(false);
    filler.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));

    return result;
  }
  @Override
  public void createControl(final Composite parent) {
    initializeDialogUnits(parent);
    readConfiguration();

    final Composite result = new Composite(parent, SWT.NONE);

    final GridLayout layout = new GridLayout(2, false);
    layout.horizontalSpacing = 10;
    result.setLayout(layout);

    final Control expressionComposite = createExpression(result);
    expressionComposite.setLayoutData(
        new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));

    final Label separator = new Label(result, SWT.NONE);
    separator.setVisible(false);
    final GridData data = new GridData(GridData.FILL, GridData.FILL, false, false, 2, 1);
    data.heightHint = convertHeightInCharsToPixels(1) / 3;
    separator.setLayoutData(data);

    final Control searchFor = createSearchFor(result);
    searchFor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 1, 1));

    final Control limitTo = createLimitTo(result);
    limitTo.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 1, 1));

    final Control includeMask = createIncludeMask(result);
    includeMask.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));

    setControl(result);

    Dialog.applyDialogFont(result);
    PlatformUI.getWorkbench()
        .getHelpSystem()
        .setHelp(result, IErlangHelpContextIds.ERLANG_SEARCH_PAGE);
  }