From f169a74305dc1a55cae3ce49826e60f51a275000 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Tue, 14 Nov 2023 10:58:43 +0100 Subject: [PATCH] Async update in product editor to prevent deadlock Reported in #907 that loading of target platform and de-selecting it in the preference can lead to a deadlock. With this change the update of the ProductInfoSection happens with async. Fixes #907 --- .../pde/internal/ui/editor/product/ProductInfoSection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductInfoSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductInfoSection.java index df4b9ea8d6..adc9e22cca 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductInfoSection.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductInfoSection.java @@ -409,7 +409,7 @@ public void registryChanged(IRegistryChangeEvent event) { if (applicationDeltas.length + productDeltas.length == 0) { return; } - Display.getDefault().syncExec(() -> { + Display.getDefault().asyncExec(() -> { fAppCombo.handleExtensionDelta(applicationDeltas); fProductCombo.handleExtensionDelta(productDeltas); }); @@ -427,7 +427,7 @@ public void stateChanged(State newState) { System.arraycopy(apps, 0, finalApps, 0, apps.length); finalApps[apps.length] = ""; //$NON-NLS-1$ - Display.getDefault().syncExec(() -> { + Display.getDefault().asyncExec(() -> { fAppCombo.reload(finalApps); fProductCombo.reload(finalProducts); });