KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > ui > operations > RemoteOperation


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.operations;
12
13 import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
14 import org.eclipse.team.internal.ccvs.core.ICVSResource;
15 import org.eclipse.ui.IWorkbenchPart;
16
17 public abstract class RemoteOperation extends CVSOperation {
18
19     private ICVSRemoteResource[] remoteResources;
20
21     protected RemoteOperation(IWorkbenchPart part, ICVSRemoteResource[] remoteResources) {
22         super(part);
23         this.remoteResources =remoteResources;
24     }
25
26     protected ICVSRemoteResource[] getRemoteResources() {
27         return remoteResources;
28     }
29     
30     public ICVSResource[] getCVSResources() {
31         ICVSResource[] cvsResources = new ICVSResource[remoteResources.length];
32         for (int i = 0; i < remoteResources.length; i++) {
33             cvsResources[i] = remoteResources[i];
34         }
35         return cvsResources;
36     }
37
38 }
39
Popular Tags