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 * which accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 *******************************************************************************/
11 package org
.eclipse
.egit
.core
.internal
.storage
;
13 import org
.eclipse
.core
.resources
.IResource
;
14 import org
.eclipse
.core
.resources
.IStorage
;
15 import org
.eclipse
.core
.runtime
.CoreException
;
16 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
17 import org
.eclipse
.team
.core
.history
.IFileRevision
;
19 /** An {@link IFileRevision} for the current version in the workspace. */
20 class WorkspaceFileRevision
extends GitFileRevision
implements IFileRevision
{
21 private final IResource rsrc
;
23 WorkspaceFileRevision(final IResource resource
) {
24 super(resource
.getName());
28 public IStorage
getStorage(IProgressMonitor monitor
) throws CoreException
{
29 return rsrc
instanceof IStorage ?
(IStorage
) rsrc
: null;
32 public boolean isPropertyMissing() {
36 public IFileRevision
withAllProperties(IProgressMonitor monitor
)
37 throws CoreException
{
41 public String
getAuthor() {
45 public long getTimestamp() {
49 public String
getComment() {
53 public String
getContentIdentifier() {