KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > tags > MultiFolderTagSource


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.tags;
12
13 import org.eclipse.osgi.util.NLS;
14 import org.eclipse.team.internal.ccvs.core.ICVSFolder;
15 import org.eclipse.team.internal.ccvs.core.ICVSResource;
16 import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
17
18 /**
19  * A tag source for multiple folders.
20  *
21  * TODO: Temporarily a subclass of single folder until I
22  * can figure out how to handle the multi-folder case.
23  */

24 public class MultiFolderTagSource extends SingleFolderTagSource {
25
26     private final ICVSFolder[] folders;
27
28     /* package */ MultiFolderTagSource(ICVSFolder[] folders) {
29         super(folders[0]);
30         this.folders = folders;
31     }
32     
33     /* (non-Javadoc)
34      * @see org.eclipse.team.internal.ccvs.ui.merge.SingleFolderTagSource#getShortDescription()
35      */

36     public String JavaDoc getShortDescription() {
37         return NLS.bind(CVSUIMessages.MultiFolderTagSource_0, new String JavaDoc[] { Integer.toString(folders.length) });
38     }
39     
40     /* (non-Javadoc)
41      * @see org.eclipse.team.internal.ccvs.ui.tags.SingleFolderTagSource#getCVSResources()
42      */

43     public ICVSResource[] getCVSResources() {
44         return folders;
45     }
46 }
47
Popular Tags