Example #1
0
 @Override
 public void setVisible(boolean visible) {
   super.setVisible(visible);
   if (visible) {
     updateEnablement();
   }
 }
Example #2
0
  /*
   * Implements method from IDialogPage
   */
  @Override
  public void setVisible(boolean visible) {
    if (visible && fPattern != null) {
      if (fFirstTime) {
        fFirstTime = false;
        // Set item and text here to prevent page from resizing
        fPattern.setItems(getPreviousSearchPatterns());
        fExtensions.setItems(fPreviousExtensions);
        //				if (fExtensions.getItemCount() == 0) {
        //					loadFilePatternDefaults();
        //				}
        if (!initializePatternControl()) {
          fPattern.select(0);
          fExtensions.setText("*"); // $NON-NLS-1$
          handleWidgetSelected();
        }
      }
      fPattern.setFocus();
    }
    updateOKStatus();

    IEditorInput editorInput = getContainer().getActiveEditorInput();
    getContainer()
        .setActiveEditorCanProvideScopeSelection(
            editorInput != null && editorInput.getAdapter(IFile.class) != null);

    super.setVisible(visible);
  }
 /*
  * Implements method from IDialogPage
  */
 @Override
 public void setVisible(final boolean visible) {
   if (visible && fPattern != null) {
     if (fFirstTime) {
       fFirstTime = false;
       // Set item and text here to prevent page from resizing
       fPattern.setItems(getPreviousSearchPatterns());
       try {
         initSelections();
       } catch (final ErlModelException e) {
       }
     }
     fPattern.setFocus();
   }
   updateOKStatus();
   super.setVisible(visible);
 }