Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-03-04 14:45:49 -0500
committerMichael Valenta2002-03-04 14:45:49 -0500
commitaae464d4770bb9c534ba638ab4e914002a839e5b (patch)
tree8f71230161ed7ac30e1270cfe50a2409cbd3bf44
parent85baffbe46447f95dcc9d77c685d2d0119190351 (diff)
downloadeclipse.platform.team-aae464d4770bb9c534ba638ab4e914002a839e5b.tar.gz
eclipse.platform.team-aae464d4770bb9c534ba638ab4e914002a839e5b.tar.xz
eclipse.platform.team-aae464d4770bb9c534ba638ab4e914002a839e5b.zip
10584: Merge needs progress
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java40
1 files changed, 30 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
index 2367ff9f9..0db1eac70 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
@@ -5,17 +5,21 @@ package org.eclipse.team.internal.ccvs.ui.merge;
* All Rights Reserved.
*/
+import java.lang.reflect.InvocationTargetException;
+
import org.eclipse.compare.CompareUI;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.team.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.wizards.*;
import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.model.IWorkbenchAdapter;
public class MergeWizard extends Wizard {
MergeWizardStartPage startPage;
@@ -23,13 +27,29 @@ public class MergeWizard extends Wizard {
IProject project;
public void addPages() {
- ImageDescriptor mergeImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_MERGE);
- startPage = new MergeWizardStartPage("startPage", Policy.bind("MergeWizard.start"), mergeImage);
- startPage.setProject(project);
- addPage(startPage);
- endPage = new MergeWizardEndPage("endPage", Policy.bind("MergeWizard.end"), mergeImage);
- endPage.setProject(project);
- addPage(endPage);
+ // Provide a progress monitor to indicate what is going on
+ try {
+ new ProgressMonitorDialog(getShell()).run(false, false, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ monitor.beginTask(Policy.bind("MergeWizard.preparing"), 100);
+ ImageDescriptor mergeImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_MERGE);
+ startPage = new MergeWizardStartPage("startPage", Policy.bind("MergeWizard.start"), mergeImage);
+ monitor.subTask(Policy.bind("MergeWizard.preparingStart"));
+ startPage.setProject(project);
+ monitor.worked(50);
+ addPage(startPage);
+ endPage = new MergeWizardEndPage("endPage", Policy.bind("MergeWizard.end"), mergeImage);
+ monitor.subTask(Policy.bind("MergeWizard.preparingEnd"));
+ endPage.setProject(project);
+ addPage(endPage);
+ monitor.done();
+ }
+ });
+ } catch (InvocationTargetException e) {
+ CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, 0, Policy.bind("internal"), e.getTargetException()));
+ } catch (InterruptedException e) {
+ // Ignore
+ }
}
/*

Back to the top