KickJava   Java API By Example, From Geeks To Geeks.

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


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.team.internal.ccvs.core.CVSException;
14 import org.eclipse.team.internal.ccvs.core.ICVSFile;
15 import org.eclipse.team.internal.ccvs.core.ICVSFolder;
16 import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
17
18 /**
19  * Send the contents of the CVS/Notify files to the server
20  */

21 public class NOOPVisitor extends AbstractStructureVisitor {
22
23     public NOOPVisitor(Session session, LocalOption[] localOptions) {
24         // Only send non-empty folders
25
super(session, localOptions, false, false);
26     }
27     
28     /**
29      * @see org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor#visitFile(ICVSFile)
30      */

31     public void visitFile(ICVSFile file) throws CVSException {
32         sendPendingNotification(file);
33     }
34
35     /**
36      * @see org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor#visitFolder(ICVSFolder)
37      */

38     public void visitFolder(ICVSFolder folder) throws CVSException {
39         if (isRecurse() && folder.isCVSFolder()) {
40             folder.acceptChildren(this);
41         }
42     }
43
44 }
45
Popular Tags