1 11 package org.eclipse.team.internal.ccvs.ui.operations; 12 13 import org.eclipse.core.resources.IProject; 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.core.runtime.IStatus; 16 import org.eclipse.team.internal.ccvs.core.CVSException; 17 import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder; 18 import org.eclipse.ui.IWorkbenchPart; 19 20 24 public class CheckoutSingleProjectOperation extends CheckoutProjectOperation { 25 26 private boolean preconfigured; 27 private IProject targetProject; 28 private String workingSetName; 29 30 public CheckoutSingleProjectOperation(IWorkbenchPart part, ICVSRemoteFolder remoteFolder, IProject targetProject, String targetLocation, boolean preconfigured) { 31 this(part,remoteFolder,targetProject,targetLocation,preconfigured,null); 32 } 33 34 public CheckoutSingleProjectOperation(IWorkbenchPart part, ICVSRemoteFolder remoteFolder, IProject targetProject, String targetLocation, boolean preconfigured, String wsName) { 35 super(part, new ICVSRemoteFolder[] { remoteFolder }, targetLocation); 36 this.targetProject = targetProject; 37 this.preconfigured = preconfigured; 38 this.workingSetName = wsName; 39 } 40 41 private boolean isPreconfigured() { 42 return preconfigured; 43 } 44 45 48 public boolean needsPromptForOverwrite(IProject project) { 49 if (isPreconfigured()) return false; 51 return super.needsPromptForOverwrite(project); 52 } 53 54 57 protected boolean performScrubProjects() { 58 return !isPreconfigured(); 60 } 61 62 65 protected IStatus checkout(ICVSRemoteFolder folder, IProgressMonitor monitor) throws CVSException { 66 return checkout(folder, targetProject, monitor); 67 } 68 69 protected String getWorkingSetName(){ 70 return workingSetName; 71 } 72 73 } 74 | Popular Tags |