Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Spungin2014-06-13 01:30:48 +0000
committerSteven Spungin2014-06-13 02:12:05 +0000
commit9a5d394dea914f35cbddac42c6a8e594d3004044 (patch)
treef4654e6dbc3339e81f875b297cbd88cfc1c3e08c
parent736627877db6d27e653fae7505d1724a00b0fa24 (diff)
downloadorg.eclipse.e4.tools-9a5d394dea914f35cbddac42c6a8e594d3004044.tar.gz
org.eclipse.e4.tools-9a5d394dea914f35cbddac42c6a8e594d3004044.tar.xz
org.eclipse.e4.tools-9a5d394dea914f35cbddac42c6a8e594d3004044.zip
Bug 437321 - [target platform search] Deadlock occurs if progress
monitor dialog is not closed before indexing is completed Change-Id: Iaab29624665aa84f70bc763b158e2a85a6c8c813 Signed-off-by: Steven Spungin <steven@spungin.tv>
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/FilteredContributionDialog.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/FilteredContributionDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/FilteredContributionDialog.java
index 3d2ce7f1..93b52811 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/FilteredContributionDialog.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/FilteredContributionDialog.java
@@ -387,13 +387,18 @@ public abstract class FilteredContributionDialog extends TitleAreaDialog {
public void onStatusChanged(final ProviderStatus status) {
FilteredContributionDialog.this.providerStatus = status;
try {
- getShell().getDisplay().asyncExec(new Runnable() {
+ getShell().getDisplay().syncExec(new Runnable() {
@Override
public void run() {
updateStatusMessage();
switch (status) {
case READY:
+ // This will deadlock if currentSearchThread is not null
+ currentSearchThread = null;
+ if (currentResultHandler != null) {
+ currentResultHandler.cancled = true;
+ }
refreshSearch();
break;
case CANCELLED:
@@ -409,10 +414,11 @@ public abstract class FilteredContributionDialog extends TitleAreaDialog {
}
});
collector.findContributions(filter, currentResultHandler);
- currentSearchThread = null;
+
monitor.done();
searching = false;
- getShell().getDisplay().asyncExec(new Runnable() {
+ currentSearchThread = null;
+ getShell().getDisplay().syncExec(new Runnable() {
@Override
public void run() {
@@ -423,7 +429,6 @@ public abstract class FilteredContributionDialog extends TitleAreaDialog {
}
};
-
currentSearchThread.schedule();
}

Back to the top