1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

[releng] Get rid of invalid clientserver -> rse.services dependency

This commit is contained in:
Martin Oberhuber 2008-05-07 09:31:16 +00:00
parent e76e3c2a5e
commit 6323f87393
8 changed files with 114 additions and 110 deletions

View file

@ -1,15 +1,15 @@
/******************************************************************************** /********************************************************************************
* Copyright (c) 2002, 2006 IBM Corporation. All rights reserved. * Copyright (c) 2002, 2006 IBM Corporation. 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
* *
* Initial Contributors: * Initial Contributors:
* The following IBM employees contributed to the Remote System Explorer * The following IBM employees contributed to the Remote System Explorer
* component that contains this file: David McKnight, Kushal Munir, * component that contains this file: David McKnight, Kushal Munir,
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
* 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. * {Name} (company) - description of contribution.
********************************************************************************/ ********************************************************************************/
@ -19,20 +19,25 @@ package org.eclipse.rse.services.clientserver;
/** /**
* Constants used by the Client and Server * Constants used by the Client and Server
*/ */
public interface IClientServerConstants { public interface IClientServerConstants {
/**
* PLUGIN_ID to use in SimpleSystemMessage for clientserver.
*
* @since 3.0
*/
public static final String PLUGIN_ID = "org.eclipse.rse.services"; //$NON-NLS-1$
// public static final String PLUGIN_ID ="org.eclipse.rse";
// public static final String PREFIX = PLUGIN_ID+"."; // public static final String PREFIX = PLUGIN_ID+".";
// // Resource Bundle ids // // Resource Bundle ids
// public static final String RESID_PREFIX = PREFIX+"ui."; // public static final String RESID_PREFIX = PREFIX+"ui.";
// // Messages // // Messages
// public static final String MSG_PREFIX = RESID_PREFIX+"msg."; // public static final String MSG_PREFIX = RESID_PREFIX+"msg.";
public static final String MSG_EXCEPTION_OCCURRED = "RSEG1003"; //$NON-NLS-1$ public static final String MSG_EXCEPTION_OCCURRED = "RSEG1003"; //$NON-NLS-1$
public static final String MSG_EXCEPTION_DELETING = "RSEG1063"; //""RSEG1004"; //$NON-NLS-1$ public static final String MSG_EXCEPTION_DELETING = "RSEG1063"; //""RSEG1004"; //$NON-NLS-1$
public static final String MSG_EXCEPTION_RENAMING = "RSEG1064"; //"RSEG1005"; //MSG_EXCEPTION_PREFIX + "Renaming"; //$NON-NLS-1$ public static final String MSG_EXCEPTION_RENAMING = "RSEG1064"; //"RSEG1005"; //MSG_EXCEPTION_PREFIX + "Renaming"; //$NON-NLS-1$
public static final String MSG_EXCEPTION_MOVING = "RSEG1065"; //MSG_EXCEPTION_PREFIX + "Moving"; //$NON-NLS-1$ public static final String MSG_EXCEPTION_MOVING = "RSEG1065"; //MSG_EXCEPTION_PREFIX + "Moving"; //$NON-NLS-1$
public static final String FILEMSG_DELETE_FILE_FAILED = "RSEF1300"; //$NON-NLS-1$ public static final String FILEMSG_DELETE_FILE_FAILED = "RSEF1300"; //$NON-NLS-1$
@ -58,11 +63,11 @@ public interface IClientServerConstants {
/** /**
* Flag to indicate "include files only, not folders" * Flag to indicate "include files only, not folders"
*/ */
public static final int INCLUDE_FOLDERS_ONLY = 4; public static final int INCLUDE_FOLDERS_ONLY = 4;
/** /**
* Flag to indicate "include files only, not folders" * Flag to indicate "include files only, not folders"
*/ */
public static final int INCLUDE_ALL = 8; public static final int INCLUDE_ALL = 8;
} }

View file

@ -28,6 +28,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import org.eclipse.rse.services.clientserver.IClientServerConstants;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException; import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException; import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException;
@ -42,8 +43,6 @@ import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperation
*/ */
public class ArchiveHandlerManager public class ArchiveHandlerManager
{ {
private static final String PLUGIN_ID = "clientserver"; //$NON-NLS-1$
/** /**
* The string that separates the virtual part of an absolute path from the * The string that separates the virtual part of an absolute path from the
* real part. * real part.
@ -111,7 +110,7 @@ public class ArchiveHandlerManager
if (virtualpath == null) virtualpath = ""; //$NON-NLS-1$ if (virtualpath == null) virtualpath = ""; //$NON-NLS-1$
ISystemArchiveHandler handler = getRegisteredHandler(file); ISystemArchiveHandler handler = getRegisteredHandler(file);
if (handler == null || !handler.exists()) { if (handler == null || !handler.exists()) {
throw new SystemUnsupportedOperationException(PLUGIN_ID, "No archive handler for " + file); //$NON-NLS-1$ throw new SystemUnsupportedOperationException(IClientServerConstants.PLUGIN_ID, "No archive handler for " + file); //$NON-NLS-1$
} }
return handler.getVirtualChildren(virtualpath, null); return handler.getVirtualChildren(virtualpath, null);
} }
@ -309,11 +308,11 @@ public class ArchiveHandlerManager
catch (InvocationTargetException e) catch (InvocationTargetException e)
{ {
//Throwable target = e.getCause(); //Throwable target = e.getCause();
throw new SystemOperationFailedException(PLUGIN_ID, "instantiate handler for " + file.getName(), e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "instantiate handler for " + file.getName(), e); //$NON-NLS-1$
} }
catch (Exception e) catch (Exception e)
{ {
throw new SystemOperationFailedException(PLUGIN_ID, "instantiate handler for " + file.getName(), e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "instantiate handler for " + file.getName(), e); //$NON-NLS-1$
} }
_handlers.put(file, handler); _handlers.put(file, handler);
return handler; return handler;
@ -508,7 +507,7 @@ public class ArchiveHandlerManager
{ {
if (!isRegisteredArchive(newFile.getName())) if (!isRegisteredArchive(newFile.getName()))
{ {
throw new SystemOperationFailedException(PLUGIN_ID, "Could not create new archive, because " //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive, because " //$NON-NLS-1$
+ newFile + " is not a registered type of archive."); //$NON-NLS-1$ + newFile + " is not a registered type of archive."); //$NON-NLS-1$
} }
@ -516,12 +515,12 @@ public class ArchiveHandlerManager
{ {
if (!newFile.isFile()) if (!newFile.isFile())
{ {
throw new SystemOperationFailedException(PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$
+ newFile + " is not a file."); //$NON-NLS-1$ + newFile + " is not a file."); //$NON-NLS-1$
} }
if (!newFile.delete()) if (!newFile.delete())
{ {
throw new SystemOperationFailedException(PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$
+ newFile + " could not be deleted."); //$NON-NLS-1$ + newFile + " could not be deleted."); //$NON-NLS-1$
} }
} }
@ -530,13 +529,13 @@ public class ArchiveHandlerManager
{ {
if (!newFile.createNewFile()) if (!newFile.createNewFile())
{ {
throw new SystemOperationFailedException(PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$
+ newFile + " could not be created."); //$NON-NLS-1$ + newFile + " could not be created."); //$NON-NLS-1$
} }
} }
catch (IOException e) catch (IOException e)
{ {
throw new SystemOperationFailedException(PLUGIN_ID, "Could not create new archive: " + newFile, e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create new archive: " + newFile, e); //$NON-NLS-1$
} }
ISystemArchiveHandler handler = getRegisteredHandler(newFile); ISystemArchiveHandler handler = getRegisteredHandler(newFile);

View file

@ -47,9 +47,9 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Vector; import java.util.Vector;
import org.eclipse.rse.internal.services.Activator;
import org.eclipse.rse.internal.services.clientserver.archiveutils.ITarConstants; import org.eclipse.rse.internal.services.clientserver.archiveutils.ITarConstants;
import org.eclipse.rse.internal.services.clientserver.archiveutils.SystemArchiveUtil; import org.eclipse.rse.internal.services.clientserver.archiveutils.SystemArchiveUtil;
import org.eclipse.rse.services.clientserver.IClientServerConstants;
import org.eclipse.rse.services.clientserver.ISystemFileTypes; import org.eclipse.rse.services.clientserver.ISystemFileTypes;
import org.eclipse.rse.services.clientserver.ISystemOperationMonitor; import org.eclipse.rse.services.clientserver.ISystemOperationMonitor;
import org.eclipse.rse.services.clientserver.SystemReentrantMutex; import org.eclipse.rse.services.clientserver.SystemReentrantMutex;
@ -937,7 +937,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
if (inStream == null) { if (inStream == null) {
destination.setLastModified(entry.getModificationTime()); destination.setLastModified(entry.getModificationTime());
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
} }
//Need to make sure destination file exists. //Need to make sure destination file exists.
if (!destination.exists()) if (!destination.exists())
@ -960,7 +960,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
} }
} }
catch (IOException e) { catch (IOException e) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
finally { finally {
@ -1009,12 +1009,12 @@ public class SystemTarHandler implements ISystemArchiveHandler {
if (!destinationParent.exists()) { if (!destinationParent.exists()) {
if (!destinationParent.mkdirs()) { if (!destinationParent.mkdirs()) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Create folder " + destinationParent); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Create folder " + destinationParent); //$NON-NLS-1$
} }
} }
// otherwise if the destination directory does exist, but is not a directory, then quit // otherwise if the destination directory does exist, but is not a directory, then quit
else if (!destinationParent.isDirectory()) { else if (!destinationParent.isDirectory()) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "No folder: " + destinationParent); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "No folder: " + destinationParent); //$NON-NLS-1$
} }
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName); fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
@ -1031,7 +1031,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
VirtualChild dir = vfs.getEntry(fullVirtualName); VirtualChild dir = vfs.getEntry(fullVirtualName);
if (dir == null || !dir.isDirectory) { if (dir == null || !dir.isDirectory) {
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
} }
if (destination == null) { if (destination == null) {
@ -1059,7 +1059,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
// if the directory does not exist, try to create it // if the directory does not exist, try to create it
if (!topDir.exists() && !topDir.mkdirs()) { if (!topDir.exists() && !topDir.mkdirs()) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Create folder " + topDir); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Create folder " + topDir); //$NON-NLS-1$
} }
else { else {
extractVirtualFile(fullVirtualName, topDir, archiveOperationMonitor); extractVirtualFile(fullVirtualName, topDir, archiveOperationMonitor);
@ -1092,7 +1092,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
} }
catch (IOException e) catch (IOException e)
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
finally finally
{ {
@ -1165,14 +1165,14 @@ public class SystemTarHandler implements ISystemArchiveHandler {
} }
catch (Exception e) catch (Exception e)
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
finally finally
{ {
releaseMutex(mutexLockStatus); releaseMutex(mutexLockStatus);
} }
setArchiveOperationMonitorStatusDone(archiveOperationMonitor); setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
} }
/** /**
@ -1220,7 +1220,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
if (!files[i].exists() || !files[i].canRead()) { if (!files[i].exists() || !files[i].canRead()) {
setArchiveOperationMonitorStatusDone(archiveOperationMonitor); setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Cannot read: " + files[i]); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Cannot read: " + files[i]); //$NON-NLS-1$
} }
// if the entry already exists, then we should do a replace // if the entry already exists, then we should do a replace
@ -1315,7 +1315,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
outputTempFile.delete(); outputTempFile.delete();
} }
setArchiveOperationMonitorStatusDone(archiveOperationMonitor); setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
finally finally
{ {
@ -1662,11 +1662,11 @@ public class SystemTarHandler implements ISystemArchiveHandler {
updateCache(); updateCache();
} }
catch (IOException e) { catch (IOException e) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
if (!file.exists() && !file.canRead()) { if (!file.exists() && !file.canRead()) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Cannot read " + file); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Cannot read " + file); //$NON-NLS-1$
} }
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName); fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
@ -1746,7 +1746,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
replaceFile(outputTempFile, false); replaceFile(outputTempFile, false);
} }
catch (IOException e) { catch (IOException e) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
} }
@ -1837,12 +1837,12 @@ public class SystemTarHandler implements ISystemArchiveHandler {
// we just did // we just did
replaceFile(outputTempFile, false); replaceFile(outputTempFile, false);
} else { } else {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch (IOException e) { catch (IOException e) {
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not delete " + fullVirtualName, e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not delete " + fullVirtualName, e); //$NON-NLS-1$
} }
finally finally
{ {
@ -1915,7 +1915,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
// if the virtual file to be renamed does not exist, then quit // if the virtual file to be renamed does not exist, then quit
if (!child.exists()) { if (!child.exists()) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Not exists: " + child); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Not exists: " + child); //$NON-NLS-1$
} }
// open a new temp file which will be our destination for the new tar file // open a new temp file which will be our destination for the new tar file
@ -2000,12 +2000,12 @@ public class SystemTarHandler implements ISystemArchiveHandler {
} }
else else
{ {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch (IOException e) { catch (IOException e) {
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not rename " + fullVirtualName, e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not rename " + fullVirtualName, e); //$NON-NLS-1$
} }
finally finally
{ {
@ -2152,7 +2152,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
extractVirtualFile(fullNames[i], files[i], archiveOperationMonitor); extractVirtualFile(fullNames[i], files[i], archiveOperationMonitor);
} }
catch (IOException e) { catch (IOException e) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
} }
@ -2250,7 +2250,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
// since we have already updated to the cache // since we have already updated to the cache
replaceFile(outputTempFile, false); replaceFile(outputTempFile, false);
} else { } else {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch (IOException e) { catch (IOException e) {
@ -2270,7 +2270,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
{ {
outputTempFile.delete(); outputTempFile.delete();
} }
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
finally finally
{ {
@ -2380,7 +2380,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
modTimeDuringCache = file.lastModified(); modTimeDuringCache = file.lastModified();
} }
catch (IOException e) { catch (IOException e) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
} }
@ -2425,7 +2425,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
} }
} }
catch (IOException e) { catch (IOException e) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
} }
@ -2598,7 +2598,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
public void add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText, public void add(InputStream stream, String virtualPath, String name, String sourceEncoding, String targetEncoding, boolean isText,
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException { ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
throw new SystemUnsupportedOperationException(Activator.PLUGIN_ID, "add"); //$NON-NLS-1$ throw new SystemUnsupportedOperationException(IClientServerConstants.PLUGIN_ID, "add"); //$NON-NLS-1$
} }
public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes typeRegistery, public void add(File file, String virtualPath, String name, String sourceEncoding, String targetEncoding, ISystemFileTypes typeRegistery,
@ -2608,7 +2608,7 @@ public class SystemTarHandler implements ISystemArchiveHandler {
public void replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText, public void replace(String fullVirtualName, InputStream stream, String name, String sourceEncoding, String targetEncoding, boolean isText,
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException { ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException {
throw new SystemUnsupportedOperationException(Activator.PLUGIN_ID, "replace"); //$NON-NLS-1$ throw new SystemUnsupportedOperationException(IClientServerConstants.PLUGIN_ID, "replace"); //$NON-NLS-1$
} }
/** /**

View file

@ -45,9 +45,9 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
import org.eclipse.rse.internal.services.Activator;
import org.eclipse.rse.internal.services.clientserver.archiveutils.SystemArchiveUtil; import org.eclipse.rse.internal.services.clientserver.archiveutils.SystemArchiveUtil;
import org.eclipse.rse.internal.services.clientserver.archiveutils.SystemUniversalZipEntry; import org.eclipse.rse.internal.services.clientserver.archiveutils.SystemUniversalZipEntry;
import org.eclipse.rse.services.clientserver.IClientServerConstants;
import org.eclipse.rse.services.clientserver.ISystemFileTypes; import org.eclipse.rse.services.clientserver.ISystemFileTypes;
import org.eclipse.rse.services.clientserver.ISystemOperationMonitor; import org.eclipse.rse.services.clientserver.ISystemOperationMonitor;
import org.eclipse.rse.services.clientserver.SystemEncodingUtil; import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
@ -555,13 +555,13 @@ public class SystemZipHandler implements ISystemArchiveHandler
return retVal; return retVal;
} }
} else { } else {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch (Exception e) catch (Exception e)
{ {
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
finally finally
{ {
@ -632,7 +632,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
catch (Exception e) catch (Exception e)
{ {
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
finally finally
{ {
@ -759,7 +759,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
try { try {
openZipFile(); openZipFile();
} catch (IOException ioe) { } catch (IOException ioe) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not open the ZipFile " + _file.toString(), ioe); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not open the ZipFile " + _file.toString(), ioe); //$NON-NLS-1$
} }
try { try {
safeGetEntry(fullVirtualName); safeGetEntry(fullVirtualName);
@ -855,7 +855,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
catch (IOException e) { catch (IOException e) {
if (closeZipFile) if (closeZipFile)
closeZipFile(); closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
} }
@ -885,7 +885,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
{ {
if (!_exists) if (!_exists)
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
int mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE); int mutexLockStatus = _mutex.waitForLock(archiveOperationMonitor, Long.MAX_VALUE);
if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus) if (SystemReentrantMutex.LOCK_STATUS_NOLOCK != mutexLockStatus)
{ {
@ -960,7 +960,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
return; return;
} }
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
finally finally
{ {
@ -970,7 +970,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
} }
else else
{ {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
@ -1008,13 +1008,13 @@ public class SystemZipHandler implements ISystemArchiveHandler
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
{ {
if (!_exists) if (!_exists)
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
if (!destinationParent.isDirectory()) if (!destinationParent.isDirectory())
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
dir = ArchiveHandlerManager.cleanUpVirtualPath(dir); dir = ArchiveHandlerManager.cleanUpVirtualPath(dir);
if (!_virtualFS.containsKey(dir)) if (!_virtualFS.containsKey(dir))
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
String name; String name;
int charsToTrim; int charsToTrim;
@ -1048,7 +1048,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
{ {
if (!SystemArchiveUtil.delete(destination)) if (!SystemArchiveUtil.delete(destination))
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not overwrite directory " + destination); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not overwrite directory " + destination); //$NON-NLS-1$
} }
} }
@ -1056,7 +1056,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
{ {
if (!destination.mkdirs()) if (!destination.mkdirs())
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not overwrite directory " + destination); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not overwrite directory " + destination); //$NON-NLS-1$
} }
} }
} }
@ -1084,7 +1084,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
if (newChildren.length == 0) if (newChildren.length == 0)
{ {
//it is a error situation, or the operation has been cancelled. //it is a error situation, or the operation has been cancelled.
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
} }
extractVirtualFile(dir + '/', topFile, sourceEncoding, isText, archiveOperationMonitor); extractVirtualFile(dir + '/', topFile, sourceEncoding, isText, archiveOperationMonitor);
@ -1110,7 +1110,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
{ {
if (!nextFile.mkdirs()) if (!nextFile.mkdirs())
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not create folder " + nextFile.toString()); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create folder " + nextFile.toString()); //$NON-NLS-1$
} }
} }
else else
@ -1141,7 +1141,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
{ {
if (!file.createNewFile()) if (!file.createNewFile())
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "File already exists: " + file.toString()); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "File already exists: " + file.toString()); //$NON-NLS-1$
} }
else else
{ {
@ -1156,7 +1156,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
} }
else else
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not create " + file.toString()); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not create " + file.toString()); //$NON-NLS-1$
} }
} }
} }
@ -1177,7 +1177,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
{ {
if (!_exists) if (!_exists)
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath); virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
if (exists(virtualPath + "/" + name, archiveOperationMonitor)) //$NON-NLS-1$ if (exists(virtualPath + "/" + name, archiveOperationMonitor)) //$NON-NLS-1$
@ -1234,18 +1234,18 @@ public class SystemZipHandler implements ISystemArchiveHandler
catch (IOException e) catch (IOException e)
{ {
closeZipFile(); closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not add a file.", e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not add a file.", e); //$NON-NLS-1$
} }
closeZipFile(); closeZipFile();
} }
} else { } else {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch(Exception e) catch(Exception e)
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
finally finally
{ {
@ -1288,7 +1288,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
boolean closeZipFile, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException boolean closeZipFile, ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
{ {
if (!_exists) if (!_exists)
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK; int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
try try
@ -1309,7 +1309,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
throw new SystemOperationCancelledException(); throw new SystemOperationCancelledException();
} }
if (!files[i].exists() || !files[i].canRead()) { if (!files[i].exists() || !files[i].canRead()) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Cannot read: " + files[i]); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Cannot read: " + files[i]); //$NON-NLS-1$
} }
String fullVirtualName = getFullVirtualName(virtualPath, names[i]); String fullVirtualName = getFullVirtualName(virtualPath, names[i]);
if (exists(fullVirtualName, archiveOperationMonitor)) if (exists(fullVirtualName, archiveOperationMonitor))
@ -1381,11 +1381,11 @@ public class SystemZipHandler implements ISystemArchiveHandler
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
} }
} else { } else {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch (IOException ioe) { catch (IOException ioe) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, ioe); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, ioe);
} }
finally finally
{ {
@ -1799,14 +1799,14 @@ public class SystemZipHandler implements ISystemArchiveHandler
return true; return true;
} }
} else { } else {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch (IOException e) catch (IOException e)
{ {
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not delete " + fullVirtualName, e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not delete " + fullVirtualName, e); //$NON-NLS-1$
} }
finally finally
{ {
@ -1852,10 +1852,10 @@ public class SystemZipHandler implements ISystemArchiveHandler
throws SystemMessageException throws SystemMessageException
{ {
if (!_exists) if (!_exists)
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
if (!file.exists() || !file.canRead()) { if (!file.exists() || !file.canRead()) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Cannot read: " + file); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Cannot read: " + file); //$NON-NLS-1$
} }
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName); fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
if (!exists(fullVirtualName, archiveOperationMonitor)) if (!exists(fullVirtualName, archiveOperationMonitor))
@ -1913,7 +1913,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
if (!(outputTempFile == null)) if (!(outputTempFile == null))
outputTempFile.delete(); outputTempFile.delete();
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not replace " + file.getName(), e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not replace " + file.getName(), e); //$NON-NLS-1$
} }
if (closeZipFile) if (closeZipFile)
closeZipFile(); closeZipFile();
@ -1928,7 +1928,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException ISystemOperationMonitor archiveOperationMonitor) throws SystemMessageException
{ {
if (!_exists) if (!_exists)
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName); fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
if (!exists(fullVirtualName, archiveOperationMonitor)) if (!exists(fullVirtualName, archiveOperationMonitor))
@ -1979,7 +1979,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
if (!(outputTempFile == null)) if (!(outputTempFile == null))
outputTempFile.delete(); outputTempFile.delete();
closeZipFile(); closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not replace " + fullVirtualName, e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not replace " + fullVirtualName, e); //$NON-NLS-1$
} }
closeZipFile(); closeZipFile();
} }
@ -2005,14 +2005,14 @@ public class SystemZipHandler implements ISystemArchiveHandler
throws SystemMessageException throws SystemMessageException
{ {
if (!_exists) if (!_exists)
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName); fullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(fullVirtualName);
newFullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(newFullVirtualName); newFullVirtualName = ArchiveHandlerManager.cleanUpVirtualPath(newFullVirtualName);
VirtualChild vc = getVirtualFile(fullVirtualName, archiveOperationMonitor); VirtualChild vc = getVirtualFile(fullVirtualName, archiveOperationMonitor);
if (!vc.exists()) if (!vc.exists())
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "The virtual file " + fullVirtualName + " does not exist."); //$NON-NLS-1$ //$NON-NLS-2$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "The virtual file " + fullVirtualName + " does not exist."); //$NON-NLS-1$ //$NON-NLS-2$
} }
File outputTempFile = null; File outputTempFile = null;
int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK; int mutexLockStatus = SystemReentrantMutex.LOCK_STATUS_NOLOCK;
@ -2089,14 +2089,14 @@ public class SystemZipHandler implements ISystemArchiveHandler
} }
else else
{ {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch (IOException e) catch (IOException e)
{ {
if (!(outputTempFile == null)) outputTempFile.delete(); if (!(outputTempFile == null)) outputTempFile.delete();
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not rename " + fullVirtualName, e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not rename " + fullVirtualName, e); //$NON-NLS-1$
} }
finally finally
{ {
@ -2168,7 +2168,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
} }
catch (IOException e) catch (IOException e)
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not extract virtual file: " + fullNames[i], e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not extract virtual file: " + fullNames[i], e); //$NON-NLS-1$
} }
} }
return files; return files;
@ -2210,7 +2210,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
{ {
if (!_exists) if (!_exists)
{ {
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
} }
if (exists(name, archiveOperationMonitor)) if (exists(name, archiveOperationMonitor))
{ {
@ -2263,7 +2263,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
return true; return true;
} }
} else { } else {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch (IOException e) catch (IOException e)
@ -2271,7 +2271,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
System.out.println(); System.out.println();
System.out.println(e.getMessage()); System.out.println(e.getMessage());
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not add a file.", e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "Could not add a file.", e); //$NON-NLS-1$
} }
finally finally
{ {
@ -2435,7 +2435,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
} }
catch (IOException e) catch (IOException e)
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
_exists = true; _exists = true;
} }
@ -2481,7 +2481,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
SystemSearchStringMatchLocator locator = new SystemSearchStringMatchLocator(bufReader, matcher); SystemSearchStringMatchLocator locator = new SystemSearchStringMatchLocator(bufReader, matcher);
matches = locator.locateMatches(); matches = locator.locateMatches();
} catch (IOException e) { } catch (IOException e) {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
closeZipFile(); closeZipFile();
@ -2527,7 +2527,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
entry = safeGetEntry(fullVirtualName); entry = safeGetEntry(fullVirtualName);
} catch (IOException e) { } catch (IOException e) {
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
if (closeZipFile) if (closeZipFile)
closeZipFile(); closeZipFile();
@ -2564,7 +2564,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
catch (IOException e) catch (IOException e)
{ {
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
return entry.getCompressedSize(); return entry.getCompressedSize();
@ -2594,7 +2594,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
entry = safeGetEntry(fullVirtualName); entry = safeGetEntry(fullVirtualName);
} catch (IOException e) { } catch (IOException e) {
if (closeZipFile) closeZipFile(); if (closeZipFile) closeZipFile();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, e); throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, e);
} }
if (closeZipFile) if (closeZipFile)
closeZipFile(); closeZipFile();
@ -2696,7 +2696,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
if (!_exists) if (!_exists)
{ {
setArchiveOperationMonitorStatusDone(archiveOperationMonitor); setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
} }
virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath); virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
@ -2777,7 +2777,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
if (!_exists) if (!_exists)
{ {
setArchiveOperationMonitorStatusDone(archiveOperationMonitor); setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
} }
virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath); virtualPath = ArchiveHandlerManager.cleanUpVirtualPath(virtualPath);
@ -2850,7 +2850,7 @@ public class SystemZipHandler implements ISystemArchiveHandler
setArchiveOperationMonitorStatusDone(archiveOperationMonitor); setArchiveOperationMonitorStatusDone(archiveOperationMonitor);
} }
} else { } else {
throw new SystemLockTimeoutException(Activator.PLUGIN_ID); throw new SystemLockTimeoutException(IClientServerConstants.PLUGIN_ID);
} }
} }
catch (Exception e) catch (Exception e)

View file

@ -23,7 +23,7 @@ package org.eclipse.rse.services.clientserver.archiveutils;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import org.eclipse.rse.internal.services.Activator; import org.eclipse.rse.services.clientserver.IClientServerConstants;
import org.eclipse.rse.services.clientserver.ISystemOperationMonitor; import org.eclipse.rse.services.clientserver.ISystemOperationMonitor;
import org.eclipse.rse.services.clientserver.SystemEncodingUtil; import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
@ -313,7 +313,7 @@ public final class VirtualChild {
} }
catch (IOException e) catch (IOException e)
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "VirtualChild.getExtractedFile()", e); //$NON-NLS-1$ throw new SystemOperationFailedException(IClientServerConstants.PLUGIN_ID, "VirtualChild.getExtractedFile()", e); //$NON-NLS-1$
} }
} }
@ -367,7 +367,7 @@ public final class VirtualChild {
throws SystemMessageException throws SystemMessageException
{ {
if (_handler == null) if (_handler == null)
throw new SystemUnexpectedErrorException(Activator.PLUGIN_ID); throw new SystemUnexpectedErrorException(IClientServerConstants.PLUGIN_ID);
if (_extractedFile == null || if (_extractedFile == null ||
_extractedFile.lastModified() != getTimeStamp() || _extractedFile.lastModified() != getTimeStamp() ||
!destination.getAbsolutePath().equals(_extractedFile.getAbsolutePath()) !destination.getAbsolutePath().equals(_extractedFile.getAbsolutePath())

View file

@ -14,7 +14,7 @@ package org.eclipse.rse.services.clientserver.messages;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
import org.eclipse.rse.internal.services.Activator; import org.eclipse.rse.services.clientserver.IClientServerConstants;
/** /**
* Exception thrown in case of errors due to network I/O Problems. * Exception thrown in case of errors due to network I/O Problems.
@ -31,13 +31,13 @@ public class SystemNetworkIOException extends SystemRemoteMessageException {
/** /**
* Default Constructor. * Default Constructor.
* Clients are encouraged to use the more specific constructor with pluginId instead of this one. * Clients are encouraged to use the more specific constructor with pluginId instead of this one.
* *
* *
* @param remoteException exception from communication layer. * @param remoteException exception from communication layer.
*/ */
public SystemNetworkIOException(Exception remoteException) { public SystemNetworkIOException(Exception remoteException) {
super(getMyMessage(Activator.PLUGIN_ID, remoteException), remoteException); super(getMyMessage(IClientServerConstants.PLUGIN_ID, remoteException), remoteException);
} }
/** /**

View file

@ -20,7 +20,7 @@ package org.eclipse.rse.services.clientserver.messages;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.rse.internal.services.Activator; import org.eclipse.rse.services.clientserver.IClientServerConstants;
/** /**
* Exception thrown when attempting an operation and the user cancelled it * Exception thrown when attempting an operation and the user cancelled it
@ -47,7 +47,7 @@ public class SystemOperationCancelledException extends SystemMessageException {
private static SystemMessage getMyMessage() { private static SystemMessage getMyMessage() {
if (myMessage == null) { if (myMessage == null) {
myMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_OPERATION_CANCELLED, IStatus.ERROR, myMessage = new SimpleSystemMessage(IClientServerConstants.PLUGIN_ID, ICommonMessageIds.MSG_OPERATION_CANCELLED, IStatus.ERROR,
CommonMessages.MSG_OPERATION_CANCELLED); CommonMessages.MSG_OPERATION_CANCELLED);
} }
return myMessage; return myMessage;

View file

@ -14,7 +14,7 @@ package org.eclipse.rse.services.clientserver.messages;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
import org.eclipse.rse.internal.services.Activator; import org.eclipse.rse.services.clientserver.IClientServerConstants;
/** /**
* Generic exception thrown when anything fails and a child exception is * Generic exception thrown when anything fails and a child exception is
@ -40,7 +40,7 @@ public class SystemOperationFailedException extends SystemRemoteMessageException
* @param remoteException the initial cause of this exception * @param remoteException the initial cause of this exception
*/ */
public SystemOperationFailedException(Exception remoteException) { public SystemOperationFailedException(Exception remoteException) {
super(getMyMessage(Activator.PLUGIN_ID, null, remoteException), remoteException); super(getMyMessage(IClientServerConstants.PLUGIN_ID, null, remoteException), remoteException);
} }
/** /**