KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > model > CVSRootFolderElement


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

11 package org.eclipse.team.internal.ccvs.ui.model;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14 import org.eclipse.jface.resource.ImageDescriptor;
15 import org.eclipse.team.internal.ccvs.core.ICVSFolder;
16 import org.eclipse.team.internal.ccvs.core.ICVSResource;
17
18 public class CVSRootFolderElement extends CVSResourceElement {
19
20     ICVSFolder[] roots;
21
22     public CVSRootFolderElement(ICVSFolder[] roots) {
23         this.roots = roots;
24     }
25     
26     /**
27      * @see IWorkbenchAdapter#members(Object)
28      */

29     public Object JavaDoc[] fetchChildren(Object JavaDoc o, IProgressMonitor monitor) {
30         CVSFolderElement[] folders = new CVSFolderElement[roots.length];
31         for (int i = 0; i < roots.length; i++) {
32             folders[i] = new CVSFolderElement(roots[i], false);
33         }
34         return folders;
35     }
36
37     /**
38      * @see IWorkbenchAdapter#getImageDescriptor(Object)
39      */

40     public ImageDescriptor getImageDescriptor(Object JavaDoc object) {
41         return null;
42     }
43     
44     /**
45      * @see CVSResourceElement#getCVSResource()
46      */

47     public ICVSResource getCVSResource() {
48         return null;
49     }
50     /**
51      * Returns the roots.
52      * @return ICVSFolder[]
53      */

54     public ICVSFolder[] getRoots() {
55         return roots;
56     }
57
58     /**
59      * Sets the roots.
60      * @param roots The roots to set
61      */

62     public void setRoots(ICVSFolder[] roots) {
63         this.roots = roots;
64     }
65
66 }
67
Popular Tags