Skip to main content
summaryrefslogtreecommitdiffstats
blob: f29c8238c4c3b1589d82dc406d84fef229d9880a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package org.eclipse.team.internal.ccvs.core.client.listeners;

/*
 * (c) Copyright IBM Corp. 2000, 2002.
 * All Rights Reserved.
 */

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.team.ccvs.core.CVSStatus;
import org.eclipse.team.internal.ccvs.core.Policy;
import org.eclipse.team.internal.ccvs.core.resources.ICVSFolder;

public interface ICommandOutputListener {
	
	/*** Status to be returned when no error or warning occured ***/
	public static final IStatus OK = new CVSStatus(CVSStatus.OK,Policy.bind("ok")); //$NON-NLS-1$
	
	/**
	 * Invoked when a message line is received from the server.
	 * <p>
	 * Any status other than ICommandOutputListener.OK will be accumulated
	 * by the command and returned. The severity of the status matches those of
	 * IStatus and must indicate whether this is a warning, error, or informational 
	 * text.while the code should be one of the codes provided by CVSStatus.
	 * The status code must not be CVSStatus.SERVER_ERROR.
	 * </p>
	 * 
	 * @param line the line of message text sent by the server
	 * @param commandRoot the root directory of the command
	 * @param monitor the progress monitor
	 * @return a status indicating success or failure based on the text
	 */
	public IStatus messageLine(String line, ICVSFolder commandRoot,
		IProgressMonitor monitor);

	/**
	 * Invoked when an error line is received from the server.
	 * <p>
	 * Any status other than ICommandOutputListener.OK will be accumulated
	 * by the command and returned. The severity of the status matches those of
	 * IStatus and must indicate whether this is a warning, error, or informational 
	 * text.while the code should be one of the codes provided by CVSStatus.
	 * The status code must not be CVSStatus.SERVER_ERROR.
	 * </p>
	 * 
	 * @param line the line of error text sent by the server
	 * @param commandRoot the root directory of the command
	 * @param monitor the progress monitor
	 * @return a status indicating success or failure based on the text
	 */
	public IStatus errorLine(String line, ICVSFolder commandRoot,
		IProgressMonitor monitor);
}

Back to the top