1 11 package org.eclipse.team.internal.ccvs.ui.operations; 12 13 import org.eclipse.core.resources.IProject; 14 import org.eclipse.core.runtime.*; 15 import org.eclipse.team.internal.ccvs.core.CVSException; 16 import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder; 17 import org.eclipse.ui.IWorkbenchPart; 18 19 24 public class CheckoutMultipleProjectsOperation extends CheckoutProjectOperation { 25 26 boolean hasTargetLocation; 27 String workingSetName; 29 30 public CheckoutMultipleProjectsOperation(IWorkbenchPart part, ICVSRemoteFolder[] remoteFolders, String targetLocation) { 31 this(part,remoteFolders,targetLocation,null); 32 } 33 34 public CheckoutMultipleProjectsOperation(IWorkbenchPart part, ICVSRemoteFolder[] remoteFolders, String targetLocation, String wsName) { 35 super(part, remoteFolders, targetLocation); 36 hasTargetLocation = targetLocation != null; 37 setInvolvesMultipleResources(remoteFolders.length > 1); 38 this.workingSetName=wsName; 39 } 40 41 47 protected IPath getTargetLocationFor(IProject project) { 48 IPath targetLocation = super.getTargetLocationFor(project); 49 if (targetLocation == null) return null; 50 return targetLocation.append(project.getName()); 51 } 52 53 56 protected IStatus checkout(ICVSRemoteFolder folder, IProgressMonitor monitor) throws CVSException { 57 return checkout(folder, null, monitor); 58 } 59 60 protected String getWorkingSetName(){ 61 return workingSetName; 62 } 63 64 } 65 | Popular Tags |