Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-09-08 16:28:41 -0400
committerMichael Valenta2003-09-08 16:28:41 -0400
commit679f67c92a8fd2985122c8a63432d3a098cb272c (patch)
treec524da52b42a2646e467e7a1be93c88996dbb011
parentaf0aa8bda728160c2a7dfd03841b226adf53d3c5 (diff)
downloadeclipse.platform.team-679f67c92a8fd2985122c8a63432d3a098cb272c.tar.gz
eclipse.platform.team-679f67c92a8fd2985122c8a63432d3a098cb272c.tar.xz
eclipse.platform.team-679f67c92a8fd2985122c8a63432d3a098cb272c.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
index 360aa3618..6a2f7c810 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
@@ -151,7 +151,7 @@ public abstract class CheckoutProjectOperation extends CheckoutOperation {
try {
// Obtain a scheduling rule on the projects were about to overwrite
Platform.getJobManager().beginRule(getSchedulingRule(targetProjects));
- IStatus result = performCheckout(session, resource, targetProjects, Policy.subMonitorFor(pm, 90));
+ IStatus result = performCheckout(session, resource, targetProjects, project != null, Policy.subMonitorFor(pm, 90));
return result;
} finally {
Platform.getJobManager().endRule();
@@ -175,7 +175,7 @@ public abstract class CheckoutProjectOperation extends CheckoutOperation {
}
}
- private IStatus performCheckout(Session session, ICVSRemoteFolder resource, IProject[] targetProjects, IProgressMonitor pm) throws CVSException {
+ private IStatus performCheckout(Session session, ICVSRemoteFolder resource, IProject[] targetProjects, boolean sendModuleName, IProgressMonitor pm) throws CVSException {
// Set the task name of the progress monitor to let the user know
// which project we're on. Don't use subTask since that will be
// changed when the checkout command is run.
@@ -200,7 +200,7 @@ public abstract class CheckoutProjectOperation extends CheckoutOperation {
// Determine if the target project is the same name as the remote folder
// in which case we'll use -d to flatten the directory structure
IProject project;
- if (targetProjects.length == 1 && targetProjects[0].getName().equals(resource.getName())) {
+ if (targetProjects.length == 1 && (sendModuleName || targetProjects[0].getName().equals(resource.getName()))) {
project = targetProjects[0];
} else {
project = null;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java
index 6c2f93c95..9b57d1958 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java
@@ -227,7 +227,7 @@ public class CheckoutAsProjectSelectionPage extends CVSWizardPage {
}
/**
- * Method getValidTargetProjects returns the et of projects that match the provided criteria.
+ * Method getValidTargetProjects returns the set of projects that match the provided criteria.
* @return IResource
*/
private IProject[] getProjects(String root, boolean unshared) throws CVSException {
@@ -245,7 +245,7 @@ public class CheckoutAsProjectSelectionPage extends CVSWizardPage {
} else if (provider != null && provider.getID().equals(CVSProviderPlugin.getTypeId())) {
ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(project);
FolderSyncInfo info = cvsFolder.getFolderSyncInfo();
- if (root != null && root.equals(info.getRoot())) {
+ if (root != null && info != null && root.equals(info.getRoot())) {
validTargets.add(project);
}
}

Back to the top