1 11 package org.eclipse.team.internal.ccvs.core.client; 12 13 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.core.runtime.IStatus; 16 import org.eclipse.osgi.util.NLS; 17 import org.eclipse.team.internal.ccvs.core.*; 18 19 32 33 38 class RemoveEntryHandler extends ResponseHandler { 39 public String getResponseID() { 40 return "Remove-entry"; } 42 43 public void handle(Session session, String localDir, 44 IProgressMonitor monitor) throws CVSException { 45 String repositoryFile = session.readLine(); 47 48 String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); ICVSFolder mParent = session.getLocalRoot().getFolder(localDir); 51 ICVSFile mFile = mParent.getFile(fileName); 52 if (mFile.exists()) { 53 IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR, NLS.bind(CVSMessages.RemoveEntryHandler_2, new String [] { mFile.getRepositoryRelativePath() }),session.getLocalRoot()); 54 CVSProviderPlugin.log(status); 55 } else { 56 mFile.unmanage(null); 57 } 58 } 59 } 60 61 | Popular Tags |