Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-04-19 14:59:27 -0400
committerjames2002-04-19 14:59:27 -0400
commiteea3726acc1da9d4c91fc79eb9701306baf6b16b (patch)
treeaf8fb0ff54899884e85ca2c236556ce528387bf7
parentbbe748e98d0588208785d10de478b4be9f5aebd2 (diff)
downloadeclipse.platform.team-eea3726acc1da9d4c91fc79eb9701306baf6b16b.tar.gz
eclipse.platform.team-eea3726acc1da9d4c91fc79eb9701306baf6b16b.tar.xz
eclipse.platform.team-eea3726acc1da9d4c91fc79eb9701306baf6b16b.zip
Added progress monitor to project set creationSerializedReferencing
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetExportWizard.java6
3 files changed, 8 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java
index 8b33861e5..000d3d3c0 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java
@@ -34,9 +34,10 @@ public interface IProjectSetSerializer {
* @param providerProjects an array of projects that the serializer should create
* text references for
* @param context a UI context object
+ * @param monitor a progress monitor
* @return an array of serialized reference strings uniquely identifying the projects
*/
- public String[] asReference(IProject[] providerProjects, Object context) throws TeamException;
+ public String[] asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor) throws TeamException;
/**
* For every String in referenceStrings, create in the workspace a
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
index 5a43793da..7ae1b7b65 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
@@ -40,7 +40,7 @@ public class CVSProjectSetSerializer implements IProjectSetSerializer {
*
* "1.0,repoLocation,module,projectName[,tag]"
*/
- public String[] asReference(IProject[] providerProjects, Object context) throws TeamException {
+ public String[] asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor) throws TeamException {
String[] result = new String[providerProjects.length];
for (int i = 0; i < providerProjects.length; i++) {
StringBuffer buffer = new StringBuffer();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetExportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetExportWizard.java
index 1ef0859d3..af3be4c6b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetExportWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetExportWizard.java
@@ -25,6 +25,7 @@ import java.util.Map;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -106,6 +107,7 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
// For each provider id, do the writing
Shell shell = getShell();
Iterator it = map.keySet().iterator();
+ monitor.beginTask(null, 1000 * map.keySet().size());
while (it.hasNext()) {
String id = (String)it.next();
writer.write("\t<provider id=\""); //$NON-NLS-1$
@@ -115,7 +117,7 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
IProject[] projectArray = (IProject[])list.toArray(new IProject[list.size()]);
IProjectSetSerializer serializer = Team.getProjectSetSerializer(id);
if (serializer != null) {
- String[] references = serializer.asReference(projectArray, shell);
+ String[] references = serializer.asReference(projectArray, shell, new SubProgressMonitor(monitor, 1000));
for (int i = 0; i < references.length; i++) {
writer.write("\t\t<project reference=\""); //$NON-NLS-1$
writer.write(references[i]);
@@ -133,6 +135,8 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
throw new InvocationTargetException(e);
} catch (TeamException e) {
throw new InvocationTargetException(e);
+ } finally {
+ monitor.done();
}
}
});

Back to the top