From c2d2ad9ea07f5c09ed6431cecd3b1219ec00d433 Mon Sep 17 00:00:00 2001 From: "APAC\\LPT5KOR" Date: Mon, 18 Sep 2023 17:25:20 +0530 Subject: [PATCH] Run/ Debug Configurations tab Plug-ins issue #311 In Run/Debug configurations when changing Start Level/ Auto-Start for some plug-ins and apply the changes, and closing and reopening the popup will make changes to disappear provided "Only show selected" is selected. Fixes https://github.com/eclipse-pde/eclipse.pde/issues/311 --- .../eclipse/pde/internal/ui/launcher/AbstractPluginBlock.java | 2 +- .../pde/internal/ui/shared/CachedCheckboxTreeViewer.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/AbstractPluginBlock.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/AbstractPluginBlock.java index 6eb89f970c..e7059870e9 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/AbstractPluginBlock.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/AbstractPluginBlock.java @@ -1113,12 +1113,12 @@ protected void resetGroup(NamedElement group) { } protected final void initializePluginsState(Map selectedPlugins) { + fPluginTreeViewer.setCheckedElements(selectedPlugins.keySet().toArray()); for (Entry entry : selectedPlugins.entrySet()) { IPluginModelBase model = entry.getKey(); setText(model, entry.getValue()); } - fPluginTreeViewer.setCheckedElements(selectedPlugins.keySet().toArray()); countSelectedModels(); resetGroup(fWorkspacePlugins); resetGroup(fExternalPlugins); diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/CachedCheckboxTreeViewer.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/CachedCheckboxTreeViewer.java index 53e4236ebe..e71c64f4ab 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/CachedCheckboxTreeViewer.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/CachedCheckboxTreeViewer.java @@ -161,7 +161,7 @@ public boolean setChecked(Object element, boolean state) { @Override public void setCheckedElements(Object[] elements) { - super.setCheckedElements(elements); + if (checkState == null) { checkState = new HashSet<>(); } else { @@ -180,6 +180,7 @@ public void setCheckedElements(Object[] elements) { } } } + super.setCheckedElements(elements); } @Override