KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > core > client > NOOPCommand


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.internal.ccvs.core.client;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14 import org.eclipse.team.internal.ccvs.core.CVSException;
15 import org.eclipse.team.internal.ccvs.core.ICVSResource;
16
17 /**
18  * Noop command that sends edit notifications to the server.
19  */

20 public class NOOPCommand extends Command {
21
22     /**
23      * @see org.eclipse.team.internal.ccvs.core.client.Command#sendLocalResourceState(Session, GlobalOption[], LocalOption[], ICVSResource[], IProgressMonitor)
24      */

25     protected ICVSResource[] sendLocalResourceState(
26         Session session,
27         GlobalOption[] globalOptions,
28         LocalOption[] localOptions,
29         ICVSResource[] resources,
30         IProgressMonitor monitor)
31         throws CVSException {
32         
33         // The noop visitor will send any pending notifications
34
new NOOPVisitor(session, localOptions).visit(session, resources, monitor);
35         return resources;
36     }
37
38     /**
39      * @see org.eclipse.team.internal.ccvs.core.client.Request#getRequestId()
40      */

41     protected String JavaDoc getRequestId() {
42         return "noop"; //$NON-NLS-1$
43
}
44
45     /**
46      * @see org.eclipse.team.internal.ccvs.core.client.Command#sendArguments(Session, String[])
47      */

48     protected void sendArguments(Session session, String JavaDoc[] arguments)throws CVSException {
49         // don't send any arguments
50
}
51     
52     /* (non-Javadoc)
53      * @see org.eclipse.team.internal.ccvs.core.client.Command#isWorkspaceModification()
54      */

55     protected boolean isWorkspaceModification() {
56         return false;
57     }
58
59 }
60
Popular Tags