1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 20:45:22 +02:00

[releng] Get rid of bad clientserver -> services dependency

This commit is contained in:
Martin Oberhuber 2008-05-07 09:19:11 +00:00
parent b32c0c8b52
commit e76e3c2a5e

View file

@ -28,7 +28,6 @@ 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.internal.services.Activator;
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;
@ -43,6 +42,8 @@ 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.
@ -110,7 +111,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(Activator.PLUGIN_ID, "No handler for " + file); //$NON-NLS-1$ throw new SystemUnsupportedOperationException(PLUGIN_ID, "No archive handler for " + file); //$NON-NLS-1$
} }
return handler.getVirtualChildren(virtualpath, null); return handler.getVirtualChildren(virtualpath, null);
} }
@ -308,11 +309,11 @@ public class ArchiveHandlerManager
catch (InvocationTargetException e) catch (InvocationTargetException e)
{ {
//Throwable target = e.getCause(); //Throwable target = e.getCause();
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "instantiate handler for " + file.getName(), e); //$NON-NLS-1$ throw new SystemOperationFailedException(PLUGIN_ID, "instantiate handler for " + file.getName(), e); //$NON-NLS-1$
} }
catch (Exception e) catch (Exception e)
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "instantiate handler for " + file.getName(), e); //$NON-NLS-1$ throw new SystemOperationFailedException(PLUGIN_ID, "instantiate handler for " + file.getName(), e); //$NON-NLS-1$
} }
_handlers.put(file, handler); _handlers.put(file, handler);
return handler; return handler;
@ -507,7 +508,7 @@ public class ArchiveHandlerManager
{ {
if (!isRegisteredArchive(newFile.getName())) if (!isRegisteredArchive(newFile.getName()))
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not create new archive, because " //$NON-NLS-1$ throw new SystemOperationFailedException(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$
} }
@ -515,12 +516,12 @@ public class ArchiveHandlerManager
{ {
if (!newFile.isFile()) if (!newFile.isFile())
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$ throw new SystemOperationFailedException(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(Activator.PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$ throw new SystemOperationFailedException(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$
} }
} }
@ -529,13 +530,13 @@ public class ArchiveHandlerManager
{ {
if (!newFile.createNewFile()) if (!newFile.createNewFile())
{ {
throw new SystemOperationFailedException(Activator.PLUGIN_ID, "Could not create new archive." //$NON-NLS-1$ throw new SystemOperationFailedException(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(Activator.PLUGIN_ID, "Could not create new archive: " + newFile, e); //$NON-NLS-1$ throw new SystemOperationFailedException(PLUGIN_ID, "Could not create new archive: " + newFile, e); //$NON-NLS-1$
} }
ISystemArchiveHandler handler = getRegisteredHandler(newFile); ISystemArchiveHandler handler = getRegisteredHandler(newFile);