Skip to content

Commit

Permalink
Skip the method PluginsTab::performApply until after activation
Browse files Browse the repository at this point in the history
If this method (or part of it) is run before the tab has been activated
then the default configuration passed as parameter will be modified and
incorrect values will be introduced.

This commit fixes a regression introduced in
98a5865

Fixes #1250
  • Loading branch information
fedejeanne committed Apr 24, 2024
1 parent 65942e1 commit d9768bf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,13 @@ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {

@Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
if (!fActivated) {
return;
}
int index = fSelectionCombo.getSelectionIndex();
configuration.setAttribute(IPDELauncherConstants.USE_DEFAULT, index == DEFAULT_SELECTION);
configuration.setAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, index == FEATURE_SELECTION);
if (fActivated) {
fBlock.performApply(configuration);
}
// clear default values for auto-start and start-level if default
String autoText = fDefaultAutoStart.getText();
if (Boolean.toString(false).equals(autoText)) {
Expand Down

0 comments on commit d9768bf

Please sign in to comment.