KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > actions > FetchAllMembersAction


1 /*******************************************************************************
2  * Copyright (c) 2005, 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.actions;
12
13 import java.lang.reflect.InvocationTargetException JavaDoc;
14
15 import org.eclipse.jface.action.IAction;
16 import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
17 import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
18 import org.eclipse.team.internal.ccvs.ui.operations.FetchAllMembersOperation;
19
20 public class FetchAllMembersAction extends CVSAction {
21
22     protected void execute(IAction action) throws InvocationTargetException JavaDoc, InterruptedException JavaDoc {
23         ICVSRemoteFolder[] folders = getSelectedRemoteFolders();
24         ICVSRepositoryLocation repoLocation = getRepositoryManager().getRepositoryLocationFor(folders[0]);
25         new FetchAllMembersOperation (getTargetPart(), folders, repoLocation).run();
26     }
27
28     /* (non-Javadoc)
29      * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
30      */

31     public boolean isEnabled() {
32         //Only enable for one selection for now
33
return getSelectedRemoteFolders().length == 1;
34     }
35
36 }
37
Popular Tags