コード例 #1
0
 @Override
 public void setVisible(boolean visible) {
   super.setVisible(visible);
   if (visible) {
     updateEnablement();
   }
 }
コード例 #2
0
ファイル: TextSearchPage.java プロジェクト: ermh/Dart
  /*
   * 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);
  }
コード例 #3
0
 /*
  * 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);
 }