From 8d33e75d6782145c17257dd6a685cbed25aca6bc Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Wed, 23 Jan 2008 22:35:25 +0000 Subject: [PATCH] [216351] Improve cancellation of SystemFetchOperation for files --- .../rse/internal/services/files/ftp/FTPService.java | 8 +++++--- .../rse/services/files/RemoteFileCancelledException.java | 9 ++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java index f72406b15c8..f26927c1e91 100644 --- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java +++ b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java @@ -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 * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -68,7 +68,8 @@ * Javier Montalvo Orus (Symbian) - [208912] Cannot expand /C on a VxWorks SSH Server * David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants * 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; @@ -115,6 +116,7 @@ import org.eclipse.rse.services.files.IHostFile; import org.eclipse.rse.services.files.IHostFilePermissions; import org.eclipse.rse.services.files.IHostFilePermissionsContainer; 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.RemoteFileSecurityException; @@ -1066,7 +1068,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT 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()) { diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java index 0c6a019bc74..c1b6c434912 100644 --- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java +++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/RemoteFileCancelledException.java @@ -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 * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,20 +12,19 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [216351] Improve cancellation of SystemFetchOperation for files *******************************************************************************/ package org.eclipse.rse.services.files; import org.eclipse.rse.services.clientserver.messages.IndicatorException; 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 * 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. @@ -39,7 +38,7 @@ public class RemoteFileCancelledException extends RemoteFileIOException { * Constructor */ public RemoteFileCancelledException() { - super(new SystemMessageException(getMyMessage())); + super(getMyMessage()); } /*