protected void enableMinMax(boolean enable) {
   fMinOccurSpinner.setEnabled(enable);
   fMaxOccurSpinner.setEnabled(!fUnboundSelect.getSelection() && enable);
   fUnboundSelect.setEnabled(enable);
   fMinLabel.setEnabled(enable);
   fMaxLabel.setEnabled(enable);
 }
 /* (non-Javadoc)
  * @see org.eclipse.swt.widgets.Control#setEnabled(boolean)
  */
 public void setEnabled(boolean enabled) {
   fTree.getControl().setEnabled(enabled);
   if (enabled) {
     updateButtons();
   } else {
     fSelectButton.setEnabled(false);
     fSelectAllButton.setEnabled(false);
     fDeselectButton.setEnabled(false);
     fDeselectAllButton.setEnabled(false);
     fSelectRequiredButton.setEnabled(false);
     fCountLabel.setText(""); // $NON-NLS-1$
   }
   fModeLabel.setEnabled(enabled);
   fPluginModeButton.setEnabled(enabled);
   fFeaureModeButton.setEnabled(enabled);
   fShowLabel.setEnabled(enabled);
   fShowPluginsButton.setEnabled(enabled);
   fShowSourceButton.setEnabled(enabled);
   boolean isPluginMode = !fFeaureModeButton.getSelection();
   fGroupLabel.setEnabled(enabled && isPluginMode);
   if (fGroupCombo != null) {
     fGroupCombo.setEnabled(enabled && isPluginMode);
   } else {
     fGroupComboPart.setEnabled(enabled && isPluginMode);
   }
 }
 private void updateGroup(boolean enabled) {
   fKeystoreLabel.setEnabled(enabled);
   fKeystoreText.setEnabled(enabled);
   fBrowseButton.setEnabled(enabled);
   fAliasLabel.setEnabled(enabled);
   fAliasText.setEnabled(enabled);
   fPasswordLabel.setEnabled(enabled);
   fPasswordText.setEnabled(enabled);
   fKeypassLabel.setEnabled(enabled);
   fKeypassText.setEnabled(enabled);
 }
 @Override
 public void setEnabled(boolean enabled) {
   super.setEnabled(enabled);
   Label label = (Label) getTag(R.id.fab_label);
   if (label != null) {
     label.setEnabled(enabled);
   }
 }
  /** @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(ILaunchConfiguration) */
  public void initializeFrom(ILaunchConfiguration configuration) {
    serverCombo.setEnabled(true);
    // remove error message that other instances may have set
    setErrorMessage(null);

    try {
      String fileName = configuration.getAttribute(Server.FILE_NAME, ""); // $NON-NLS-1$
      String url = configuration.getAttribute(Server.BASE_URL, ""); // $NON-NLS-1$
      boolean isAutoGeneratedURL = configuration.getAttribute(AUTO_GENERATED_URL, true);

      initializeServerControl(configuration);

      if (isAutoGeneratedURL) {
        autoGeneratedURL.setSelection(true);
        String computedURL = computeURL(formatFileName(fileName));
        fURLLabel.setEnabled(false);
        updateURLComponents(computedURL);
        fURLPath.setEnabled(false);
      } else {
        autoGeneratedURL.setSelection(false);
        fURLLabel.setEnabled(true);
        updateURLComponents(url);
        fURLPath.setEnabled(true);
      }

      fFile.setText(fileName);

      updateFileEnabled(configuration);
      updateURLEnabled(configuration);
    } catch (CoreException e) {
      // ignore
    }

    initializeExtensionControls(configuration);

    isValid(configuration);
  }
  /**
   * Set the container to display in the tree or <code>null</code> to disable the tree
   *
   * @param input bundle container or <code>null</code>
   */
  public void setInput(ITargetDefinition input) {
    fTargetDefinition = input;

    // Update the cached data
    fFileBundleMapping = null;
    fAllBundles.clear();

    if (input == null || !input.isResolved()) {
      fTree.setInput(Messages.TargetContentsGroup_10);
      setEnabled(false);
      return;
    }

    IResolvedBundle[] allResolvedBundles = input.getAllBundles();
    if (allResolvedBundles == null || allResolvedBundles.length == 0) {
      fTree.setInput(Messages.TargetContentsGroup_11);
      setEnabled(false);
      return;
    }

    for (int i = 0; i < allResolvedBundles.length; i++) {
      fAllBundles.add(allResolvedBundles[i]);
    }

    boolean isFeatureMode =
        ((TargetDefinition) fTargetDefinition).getUIMode() == TargetDefinition.MODE_FEATURE;
    fFeaureModeButton.setSelection(isFeatureMode);
    fPluginModeButton.setSelection(!isFeatureMode);
    fGroupLabel.setEnabled(!isFeatureMode);

    fTree.getControl().setRedraw(false);
    fTree.setInput(fTargetDefinition);
    fTree.expandAll();
    updateCheckState();
    updateButtons();
    setEnabled(true);
    fTree.getControl().setRedraw(true);
  }