Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2005-05-06 18:56:40 +0000
committerMichael Valenta2005-05-06 18:56:40 +0000
commit9df1b4f1c396aadb30220f28d8efe62b9fd326a5 (patch)
tree19119902f634709634cd849f240d684d1a896322
parentdcf1d4ef8c0debc894b3c9da424318de29e8b768 (diff)
downloadeclipse.platform.team-9df1b4f1c396aadb30220f28d8efe62b9fd326a5.tar.gz
eclipse.platform.team-9df1b4f1c396aadb30220f28d8efe62b9fd326a5.tar.xz
eclipse.platform.team-9df1b4f1c396aadb30220f28d8efe62b9fd326a5.zip
Bug 93584 Fetching Revisions from Revision Compare done in UI thread
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
index 2cdb76fe3..d91c0e5cc 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
@@ -43,10 +43,7 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.*;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.core.ICVSFile;
@@ -261,9 +258,9 @@ public class CVSCompareRevisionsInput extends CompareEditorInput implements ISav
getRevisionAction = new Action(CVSUIMessages.HistoryView_getRevisionAction) { //$NON-NLS-1$
public void run() {
try {
- new ProgressMonitorDialog(shell).run(false, true, new WorkspaceModifyOperation(null) {
+ final IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
+ new ProgressMonitorDialog(shell).run(true, true, new WorkspaceModifyOperation(null) {
protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
if (selection.size() != 1) return;
VersionCompareDiffNode node = (VersionCompareDiffNode)selection.getFirstElement();
ResourceEditionNode right = (ResourceEditionNode)node.getRight();
@@ -299,7 +296,11 @@ public class CVSCompareRevisionsInput extends CompareEditorInput implements ISav
TypedBufferedContent left = (TypedBufferedContent)node.getLeft();
left.fireChange();
// recompute the labels on the viewer
- viewer.refresh();
+ Display.getCurrent().syncExec(new Runnable() {
+ public void run() {
+ viewer.refresh();
+ }
+ });
}
};
getContentsAction = new Action(CVSUIMessages.HistoryView_getContentsAction) { //$NON-NLS-1$

Back to the top