KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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 public class SyncUpdate extends Update {
18
19     public SyncUpdate() { };
20
21     /*
22      * @see Command#sendFileStructure(ICVSResource,IProgressMonitor,boolean,boolean,boolean)
23      */

24     protected void sendFileStructure(Session session, ICVSResource[] resources,
25             LocalOption[] localOptions, boolean emptyFolders, IProgressMonitor monitor) throws CVSException {
26             
27         checkResourcesManaged(session, resources);
28         new FileStructureVisitor(session, localOptions, emptyFolders, true, false).visit(session, resources, monitor);
29     }
30     
31     /* (non-Javadoc)
32      * @see org.eclipse.team.internal.ccvs.core.client.Command#isWorkspaceModification()
33      */

34     protected boolean isWorkspaceModification() {
35         // The sync-update will not modify the workspace
36
return false;
37     }
38     
39     /* (non-Javadoc)
40      * @see org.eclipse.team.internal.ccvs.core.client.Command#filterGlobalOptions(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption[])
41      */

42     protected GlobalOption[] filterGlobalOptions(Session session, GlobalOption[] globalOptions) {
43         // Ensure that the DO_NOT_CHANGE (-n) global option is present
44
if (! Command.DO_NOT_CHANGE.isElementOf(globalOptions)) {
45             globalOptions = Command.DO_NOT_CHANGE.addToEnd(globalOptions);
46         }
47         return super.filterGlobalOptions(session, globalOptions);
48     }
49
50 }
51
Popular Tags