2

I have the necessary extension points and my Tab class is extending AbstractLaunchConfigurationTab. I am doing nothing different to examples, such as, the CommonTab. I call updateLaunchConfigurationDialog() when a widget event is fired.

EDIT: The listener method for my widgets are definitely being called and the performApply method is being called. I am doing what the CommonTab class does with one of its radio buttons, for example:

fSharedRadioButton.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent evt) {
            handleSharedRadioButtonSelected();
        }
    });

/**
 * handles the shared radio button being selected
 */
private void handleSharedRadioButtonSelected() {
    setSharedEnabled(isShared());
    updateLaunchConfigurationDialog();
}

The only difference is that my widget is a spinner:

executionsSpinner.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            updateLaunchConfigurationDialog();
        }
    });
Lii
  • 11,553
  • 8
  • 64
  • 88
tgc92
  • 21
  • 2
  • We'll need more info, e.g what did you try, how did you try to debug it etc. – Scis Aug 04 '14 at 08:19
  • Your `performApply` method must update values in the working configuration copy using the various `setAttribute` methods. – greg-449 Aug 04 '14 at 09:18

1 Answers1

1

When updateLaunchConfigurationDialog is called the framework triggers a call to your tab's performApply method.

performApply is passed an ILaunchConfigurationWorkingCopy instance as an argument. When performApply returns that ILaunchConfigurationWorkingCopy instance is compared with the original, unmodified ILaunchConfiguration. If there are any differences then the Apply button is enabled.

You must hence make some modification to the argument of performApply for Apply to be enabled, just as Greg notices in their comment.

Lii
  • 11,553
  • 8
  • 64
  • 88