From d9768bfa322c5776be82d7ed1f472c7de0836e84 Mon Sep 17 00:00:00 2001 From: fedejeanne <2205684+fedejeanne@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:52:46 +0200 Subject: [PATCH] Skip the method PluginsTab::performApply until after activation 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 98a58656a74bd163c8f4ad8f7a36dc492ac67e1c Fixes https://github.com/eclipse-pde/eclipse.pde/issues/1250 --- .../src/org/eclipse/pde/ui/launcher/PluginsTab.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java index 1775a15c1e0..8a9b45d6a16 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java @@ -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)) {