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