KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.ui.model;
12
13  
14 import org.eclipse.core.runtime.IAdaptable;
15 import org.eclipse.core.runtime.IProgressMonitor;
16 import org.eclipse.jface.resource.ImageDescriptor;
17 import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
18 import org.eclipse.ui.model.IWorkbenchAdapter;
19
20 /**
21  * AllRootsElement is the model element for the repositories view.
22  * Its children are the array of all known repository roots.
23  */

24 public class AllRootsElement extends CVSModelElement implements IAdaptable {
25     public ImageDescriptor getImageDescriptor(Object JavaDoc object) {
26         return null;
27     }
28     public Object JavaDoc[] fetchChildren(Object JavaDoc o, IProgressMonitor monitor) {
29         return CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRepositoryRoots();
30     }
31     public String JavaDoc getLabel(Object JavaDoc o) {
32         return null;
33     }
34     public Object JavaDoc getAdapter(Class JavaDoc adapter) {
35         if (adapter == IWorkbenchAdapter.class) return this;
36         return null;
37     }
38     public Object JavaDoc getParent(Object JavaDoc o) {
39         return null;
40     }
41 }
42
43
Popular Tags