KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > internal > ccvs > core > filehistory > CVSResourceVariantFileRevision


1 /*******************************************************************************
2  * Copyright (c) 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.core.filehistory;
12
13 import java.net.URI JavaDoc;
14
15 import org.eclipse.core.runtime.CoreException;
16 import org.eclipse.core.runtime.IProgressMonitor;
17 import org.eclipse.team.core.history.IFileRevision;
18 import org.eclipse.team.core.variants.IResourceVariant;
19 import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
20 import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
21 import org.eclipse.team.internal.core.mapping.ResourceVariantFileRevision;
22
23 public class CVSResourceVariantFileRevision extends ResourceVariantFileRevision {
24
25     public CVSResourceVariantFileRevision(IResourceVariant variant) {
26         super(variant);
27     }
28
29     public boolean isPropertyMissing() {
30         return true;
31     }
32     
33     public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException {
34         return new CVSFileRevision(getCVSRemoteFile().getLogEntry(monitor));
35     }
36
37     private ICVSRemoteFile getCVSRemoteFile() {
38         return (ICVSRemoteFile)getVariant();
39     }
40     
41     public URI JavaDoc getURI() {
42         return ((RemoteFile)getCVSRemoteFile()).toCVSURI().toURI();
43     }
44
45 }
46
Popular Tags