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();
}
});
When
updateLaunchConfigurationDialog
is called the framework triggers a call to your tab'sperformApply
method.performApply
is passed anILaunchConfigurationWorkingCopy
instance as an argument. WhenperformApply
returns thatILaunchConfigurationWorkingCopy
instance is compared with the original, unmodifiedILaunchConfiguration
. 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.