1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-20 22:55:51 +02:00

[216351] Improve cancellation of SystemFetchOperation for files

This commit is contained in:
Martin Oberhuber 2008-01-23 22:35:25 +00:00
parent 2fb3d273bb
commit 8d33e75d67
2 changed files with 9 additions and 8 deletions

View file

@ -1,5 +1,5 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2006, 2007 IBM Corporation and others. All rights reserved. * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms * This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html * available at http://www.eclipse.org/legal/epl-v10.html
@ -69,6 +69,7 @@
* David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
* Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND * Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
* David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
* Martin Oberhuber (Wind River) - [216351] Improve cancellation of SystemFetchOperation for files
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.services.files.ftp; package org.eclipse.rse.internal.services.files.ftp;
@ -115,6 +116,7 @@ import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.rse.services.files.IHostFilePermissions; import org.eclipse.rse.services.files.IHostFilePermissions;
import org.eclipse.rse.services.files.IHostFilePermissionsContainer; import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
import org.eclipse.rse.services.files.RemoteFileCancelledException; import org.eclipse.rse.services.files.RemoteFileCancelledException;
import org.eclipse.rse.services.files.RemoteFileException;
import org.eclipse.rse.services.files.RemoteFileIOException; import org.eclipse.rse.services.files.RemoteFileIOException;
import org.eclipse.rse.services.files.RemoteFileSecurityException; import org.eclipse.rse.services.files.RemoteFileSecurityException;
@ -1066,7 +1068,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
return hasSucceeded; return hasSucceeded;
} }
private boolean internalDelete(FTPClient ftpClient, String parentPath, String fileName, boolean isFile, IProgressMonitor monitor) throws RemoteFileIOException, IOException private boolean internalDelete(FTPClient ftpClient, String parentPath, String fileName, boolean isFile, IProgressMonitor monitor) throws RemoteFileException, IOException
{ {
if(monitor.isCanceled()) if(monitor.isCanceled())
{ {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2007 IBM Corporation and others. * Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -12,20 +12,19 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * Martin Oberhuber (Wind River) - [216351] Improve cancellation of SystemFetchOperation for files
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.services.files; package org.eclipse.rse.services.files;
import org.eclipse.rse.services.clientserver.messages.IndicatorException; import org.eclipse.rse.services.clientserver.messages.IndicatorException;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
/** /**
* Exception thrown when attempting a file operation and the user * Exception thrown when attempting a file operation and the user
* canceled it before it could be completed. * canceled it before it could be completed.
*/ */
public class RemoteFileCancelledException extends RemoteFileIOException { public class RemoteFileCancelledException extends RemoteFileException {
/** /**
* A serialVersionUID is recommended for all serializable classes. * A serialVersionUID is recommended for all serializable classes.
@ -39,7 +38,7 @@ public class RemoteFileCancelledException extends RemoteFileIOException {
* Constructor * Constructor
*/ */
public RemoteFileCancelledException() { public RemoteFileCancelledException() {
super(new SystemMessageException(getMyMessage())); super(getMyMessage());
} }
/* /*