1 /*******************************************************************************
2 * Copyright (C) 2007, Robin Rosenberg <me@lathund.dewire.com>
3 * Copyright (C) 2006, Robin Rosenberg <robin.rosenberg@dewire.com>
4 * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
6 * All rights reserved. This program and the accompanying materials
7 * are made available under the terms of the Eclipse Public License v1.0
8 * See LICENSE for the full license text, also available.
9 *******************************************************************************/
10 package org
.spearce
.egit
.core
.internal
.storage
;
12 import org
.eclipse
.core
.resources
.IResource
;
13 import org
.eclipse
.core
.resources
.IStorage
;
14 import org
.eclipse
.core
.runtime
.CoreException
;
15 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
16 import org
.eclipse
.team
.core
.history
.IFileRevision
;
18 /** An {@link IFileRevision} for the current version in the workspace. */
19 class WorkspaceFileRevision
extends GitFileRevision
implements IFileRevision
{
20 private final IResource rsrc
;
22 WorkspaceFileRevision(final IResource resource
) {
23 super(resource
.getName());
27 public IStorage
getStorage(IProgressMonitor monitor
) throws CoreException
{
28 return rsrc
instanceof IStorage ?
(IStorage
) rsrc
: null;
31 public boolean isPropertyMissing() {
35 public IFileRevision
withAllProperties(IProgressMonitor monitor
)
36 throws CoreException
{
40 public String
getAuthor() {
44 public long getTimestamp() {
48 public String
getComment() {
52 public String
getContentIdentifier() {