Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 9119380d19ed5e9b662a50372031b138c2b1a3b0 (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
55
package org.eclipse.team.internal.ccvs.core.commands;

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

import org.eclipse.team.internal.ccvs.core.util.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.requests.RequestSender;
import org.eclipse.team.internal.ccvs.core.resources.api.IManagedResource;
import org.eclipse.team.internal.ccvs.core.response.ResponseDispatcher;

/**
 * Superclass for commands that do not change the structure on 
 * the local working copy (it can change the content of the files).<br>
 * Most of the subclasses are asking the server for response in 
 * message format (log, status)
 */
abstract class AbstractMessageCommand extends Command {

	/**
	 * Constructor for AbstractMessageCommand.
	 * @param responseDispatcher
	 * @param requestSender
	 */
	public AbstractMessageCommand(
		ResponseDispatcher responseDispatcher,
		RequestSender requestSender) {
		super(responseDispatcher, requestSender);
	}

	/**
	 * @see Command#sendRequestsToServer(IProgressMonitor)
	 */
	protected void sendRequestsToServer(IProgressMonitor monitor)
		throws CVSException {
			
		IManagedResource[] mWorkResources;

		// NOTE: We could save ourselves a bit if work by getting
		// the resources first and passing them as arguments
		Assert.isTrue(allResourcesManaged());
		
		// Get the folders we want to work on
		mWorkResources = getWorkResources();
		
		// Send all folders that are already managed to the server
		sendFileStructure(mWorkResources,monitor,false,false,false);
		sendHomeFolder();			
	}

}

Back to the top