Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-05-02 21:20:50 -0400
committerMichael Valenta2004-05-02 21:20:50 -0400
commita22863d4b2f947b745dbe9bf84118d11df424e83 (patch)
treec5120caf0a29d713a4956a17aa480bce3f47235e
parent8aa6298d85bda371db23a0482736057d9fe06a48 (diff)
downloadeclipse.platform.team-a22863d4b2f947b745dbe9bf84118d11df424e83.tar.gz
eclipse.platform.team-a22863d4b2f947b745dbe9bf84118d11df424e83.tar.xz
eclipse.platform.team-a22863d4b2f947b745dbe9bf84118d11df424e83.zip
45590: Merge cancellation happens in main UI thread
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
index 1ddf87c28..84129e4ea 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
@@ -10,11 +10,15 @@
*******************************************************************************/
package org.eclipse.team.internal.ui.synchronize.actions;
+import java.lang.reflect.InvocationTargetException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.Action;
+import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.team.internal.ui.Policy;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.ui.TeamUI;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
+import org.eclipse.ui.PlatformUI;
/**
* Action to remove the given participant from the synchronize manager.
@@ -35,7 +39,18 @@ public class RemoveSynchronizeParticipantAction extends Action {
}
public void run() {
- TeamUI.getSynchronizeManager().removeSynchronizeParticipants(
- new ISynchronizeParticipant[] {participant});
+ try {
+ PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor)
+ throws InvocationTargetException, InterruptedException {
+ TeamUI.getSynchronizeManager().removeSynchronizeParticipants(
+ new ISynchronizeParticipant[] {participant});
+ }
+ });
+ } catch (InvocationTargetException e) {
+ Utils.handle(e);
+ } catch (InterruptedException e) {
+ // Cancelled. Just ignore
+ }
}
}

Back to the top