diff options
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java')
-rw-r--r-- | bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java index 4775d2979..f63b5fbe3 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java @@ -94,9 +94,9 @@ public class Session { private Map responseHandlers; // List of errors accumulated while the command is executing - private List errors = new ArrayList(); - - private Command currentCommand; + private List errors = new ArrayList(); + + private Command currentCommand; /** * Creates a new CVS session, initially in the CLOSED state. @@ -760,14 +760,14 @@ public class Session { } size = Long.parseLong(sizeLine, 10); } catch (NumberFormatException e) { - // In some cases, the server will give us an error line here - if (sizeLine != null && sizeLine.startsWith("E")) { //$NON-NLS-1$ - handleErrorLine(sizeLine.substring(1).trim(), org.eclipse.core.runtime.Status.OK_STATUS); - return; - } else { - IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR,CVSMessages.Session_badInt, e, localRoot); - throw new CVSException(status); - } + // In some cases, the server will give us an error line here + if (sizeLine != null && sizeLine.startsWith("E")) { //$NON-NLS-1$ + handleErrorLine(sizeLine.substring(1).trim(), org.eclipse.core.runtime.Status.OK_STATUS); + return; + } else { + IStatus status = new CVSStatus(IStatus.ERROR,CVSStatus.ERROR,CVSMessages.Session_badInt, e, localRoot); + throw new CVSException(status); + } } // create an input stream that spans the next 'size' bytes from the connection InputStream in = new SizeConstrainedInputStream(connection.getInputStream(), size, true /*discardOnClose*/); @@ -808,7 +808,7 @@ public class Session { file.setContents(in, responseType, true, new NullProgressMonitor()); } - /** + /** * Stores the value of the last Mod-time response encountered. * Valid only for the duration of a single CVS command. */ @@ -993,53 +993,53 @@ public class Session { return (ResponseHandler)getReponseHandlers().get(responseID); } - /** - * Accumulate the added errors so they can be included in the status returned - * when the command execution is finished. OK status are ignored. - * @param status the status to be accumulated - */ - public void addError(IStatus status) { - if (!status.isOK()) - errors.add(status); - } - - public boolean hasErrors() { - return !errors.isEmpty(); - } - - public IStatus[] getErrors() { - return (IStatus[]) errors.toArray(new IStatus[errors.size()]); - } + /** + * Accumulate the added errors so they can be included in the status returned + * when the command execution is finished. OK status are ignored. + * @param status the status to be accumulated + */ + public void addError(IStatus status) { + if (!status.isOK()) + errors.add(status); + } + + public boolean hasErrors() { + return !errors.isEmpty(); + } + + public IStatus[] getErrors() { + return (IStatus[]) errors.toArray(new IStatus[errors.size()]); + } - public void clearErrors() { - errors.clear(); - } + public void clearErrors() { + errors.clear(); + } - public void setCurrentCommand(Command c) { - currentCommand = c; - } - - public Command getCurrentCommand() { - return currentCommand; - } + public void setCurrentCommand(Command c) { + currentCommand = c; + } + + public Command getCurrentCommand() { + return currentCommand; + } /** * Report the given error line to any listeners - * @param line the error line - * @param status the status that indicates any problems encountered parsing the line - */ - public void handleErrorLine(String line, IStatus status) { - ConsoleListeners.getInstance().errorLineReceived(this, line, status); - } - - /** - * An error has occurred while processing responses from the - * server. Place this error is the status that will be returned - * from the command and show the error in the console - * @param status the status that descibes the error - */ - public void handleResponseError(IStatus status) { - addError(status); - handleErrorLine(NLS.bind(CVSMessages.Session_0, new String[] { status.getMessage() }), status); - } + * @param line the error line + * @param status the status that indicates any problems encountered parsing the line + */ + public void handleErrorLine(String line, IStatus status) { + ConsoleListeners.getInstance().errorLineReceived(this, line, status); + } + + /** + * An error has occurred while processing responses from the + * server. Place this error is the status that will be returned + * from the command and show the error in the console + * @param status the status that descibes the error + */ + public void handleResponseError(IStatus status) { + addError(status); + handleErrorLine(NLS.bind(CVSMessages.Session_0, new String[] { status.getMessage() }), status); + } } |