1 11 package org.eclipse.team.internal.ccvs.core.client; 12 13 import org.eclipse.core.runtime.IProgressMonitor; 14 import org.eclipse.core.runtime.IStatus; 15 import org.eclipse.team.internal.ccvs.core.CVSException; 16 import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener; 17 18 21 public class CheckoutWithOverwrite extends Checkout { 22 23 27 public class CreatedResponseHandler extends UpdatedHandler { 28 public CreatedResponseHandler() { 29 super(UpdatedHandler.HANDLE_UPDATED); 30 } 31 public String getResponseID() { 32 return "Created"; } 34 } 35 36 39 protected IStatus doExecute( 40 Session session, 41 GlobalOption[] globalOptions, 42 LocalOption[] localOptions, 43 String [] arguments, 44 ICommandOutputListener listener, 45 IProgressMonitor monitor) 46 throws CVSException { 47 48 ResponseHandler newCreated = new CreatedResponseHandler(); 49 ResponseHandler oldCreated = session.getResponseHandler(newCreated.getResponseID()); 50 session.registerResponseHandler(newCreated); 51 try { 52 return super.doExecute( 53 session, 54 globalOptions, 55 localOptions, 56 arguments, 57 listener, 58 monitor); 59 } finally { 60 session.registerResponseHandler(oldCreated); 61 } 62 } 63 64 } 65 | Popular Tags |