Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2006-01-25 15:48:48 +0000
committerMichael Valenta2006-01-25 15:48:48 +0000
commit2642b10a9ae57e1bc8b46b7f3c4c198ada9dc570 (patch)
tree86e92636fd78869a3495aa119945b99dcb71c7e8
parent53a8c311587d2baea0eb750607d3f19849ade4c0 (diff)
downloadeclipse.platform.team-2642b10a9ae57e1bc8b46b7f3c4c198ada9dc570.tar.gz
eclipse.platform.team-2642b10a9ae57e1bc8b46b7f3c4c198ada9dc570.tar.xz
eclipse.platform.team-2642b10a9ae57e1bc8b46b7f3c4c198ada9dc570.zip
Consolidated the IFileState and IFileRevision interfaces to avoid confusion
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java63
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileState.java41
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java81
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java7
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java14
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java12
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/FileState.java86
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java17
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FileStateTypedElement.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/AbstractCompareAdapter.java4
14 files changed, 176 insertions, 176 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java
index 7c43cd6bd..a7a8c1fe4 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileRevision.java
@@ -10,6 +10,11 @@
*******************************************************************************/
package org.eclipse.team.core.history;
+import java.net.URI;
+
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.history.provider.FileRevision;
@@ -31,27 +36,73 @@ import org.eclipse.team.core.history.provider.FileRevision;
public interface IFileRevision extends IFileState {
/**
+ * Returns the storage for this file revision.
+ * If the returned storage is an instance of
+ * <code>IFile</code> clients can assume that this
+ * file state represents the current state of
+ * the returned <code>IFile</code>.
+ * @return IStorage containing file storage
+ */
+ public IStorage getStorage(IProgressMonitor monitor) throws CoreException;
+
+ /**
+ * Returns the name of the file to which this state is associated
+ * @return String containing the name of the file
+ */
+ public String getName();
+
+ /**
+ * Returns the URI of the file to which this state is associated
+ * or <code>null</code> if the file does not have a URI.
+ * @return URI of the file to which this state is associated
+ */
+ public URI getURI();
+
+ /**
+ * Returns the time stamp of this revision as a long or <code>-1</code>
+ * if the timestamp is unknown.
+ *
+ * @return a long that represents the time of this revision as the number of milliseconds
+ * since the base time
+ *
+ * @see java.lang.System#currentTimeMillis()
+ */
+ public long getTimestamp();
+
+ /**
+ * Returns whether the file represented by this state exists.
+ * @return whether the file represented by this state exists
+ */
+ public boolean exists();
+
+ /**
* Returns the <em>unique</em> identifier for this file revision
- * @return a String containing the id
+ * or <code>null</code> if one is not available. If <code>null</code>
+ * is returned, clients can use the timestamp to differentiate
+ * revisions.
+ * @return the <em>unique</em> identifier for this file revision
+ * or <code>null</code>
*/
public abstract String getContentIdentifier();
/**
- * Returns a String containing the author of this revision
+ * Returns the author of this revision or <code>null</code> if
+ * this information is not available.
*
- * @return String representing the author of this revision or an empty string if no author is associated with this string
+ * @return the author of this revision or <code>null</code>
*/
public abstract String getAuthor();
/**
- * Returns the comment for this file revision
+ * Returns the comment for this file revision or <code>null</code> if
+ * this information is not available.
*
- * @return String containing the comment or a an empty string if no comment exists
+ * @return the comment for this file revision or <code>null</code>
*/
public abstract String getComment();
/**
- * Returns the set of ITags available for this file revision.
+ * Returns the set of tags available for this file revision.
*
* @return an array of ITag's if ITags exist for this revision or an empty ITag array
* if no tags exist
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileState.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileState.java
index 4ab76b2b2..d49d93bcb 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileState.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/IFileState.java
@@ -10,21 +10,13 @@
*******************************************************************************/
package org.eclipse.team.core.history;
-import java.net.URI;
-
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.variants.FileState;
/**
* A previous, current or proposed future state of a file.
*
- * <p>
- * This interface is not intended to be implemented by clients.
- * Clients that want to define there own a file state can
- * subclass {@link FileState} instead.
- *
* <p> <strong>EXPERIMENTAL</strong>. This class or interface has been added as
* part of a work in progress. There is a guarantee neither that this API will
* work nor that it will remain the same. Please do not use this API without
@@ -32,7 +24,8 @@ import org.eclipse.team.core.variants.FileState;
* </p>
*
* @see IFileRevision
- * @see FileState
+ *
+ * @deprecated use {@link IFileRevision} instead. W2ill be removed before 3.2 M5
*
* @since 3.2
*/
@@ -48,34 +41,4 @@ public interface IFileState {
*/
public IStorage getStorage(IProgressMonitor monitor) throws CoreException;
- /**
- * Returns the name of the file to which this state is associated
- * @return String containing the name of the file
- */
- public String getName();
-
- /**
- * Returns the URI of the file to which this state is associated
- * or <code>null</code> if the file does not have a URI.
- * @return URI of the file to which this state is associated
- */
- public URI getURI();
-
- /**
- * Returns the time stamp of this revision as a long or <code>-1</code>
- * if the timestamp is unknown.
- *
- * @return a long that represents the time of this revision as the number of milliseconds
- * since the base time
- *
- * @see java.lang.System#currentTimeMillis()
- */
- public long getTimestamp();
-
- /**
- * Returns whether the file represented by this state exists.
- * @return whether the file represented by this state exists
- */
- public boolean exists();
-
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java
index 37383e216..a599607aa 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/history/provider/FileRevision.java
@@ -11,27 +11,100 @@
package org.eclipse.team.core.history.provider;
+import java.net.URI;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.history.ITag;
-import org.eclipse.team.core.variants.FileState;
/**
- * Abstract FileRevision class.
- * @see IFileRevision
+ * Abstract implementation of {@link IFileRevision} that can be implemented by
+ * clients.
+ *
+ * <p> <strong>EXPERIMENTAL</strong>. This class or interface has been added as
+ * part of a work in progress. There is a guarantee neither that this API will
+ * work nor that it will remain the same. Please do not use this API without
+ * consulting with the Platform/Team team.
+ * </p>
+ *
+ * @see IFileRevisione
+ *
* @since 3.2
*/
-public abstract class FileRevision extends FileState implements IFileRevision {
+public abstract class FileRevision implements IFileRevision {
+
+ /**
+ * Return a file state representing the current state of the
+ * local file.
+ * @param file a local file
+ * @return a file state representing the current state of the
+ * local file
+ */
+ public static IFileRevision getFileRevisionFor(final IFile file) {
+ return new FileRevision() {
+ public IStorage getStorage(IProgressMonitor monitor) {
+ return file;
+ }
+ public String getName() {
+ return file.getName();
+ }
+ public boolean exists() {
+ return file.exists();
+ }
+ public long getTimestamp() {
+ return file.getLocalTimeStamp();
+ }
+ public URI getURI() {
+ return file.getLocationURI();
+ }
+ };
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.core.history.IFileState#getURI()
+ */
+ public URI getURI() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.core.history.IFileState#getTimestamp()
+ */
+ public long getTimestamp() {
+ return -1;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.core.history.IFileState#exists()
+ */
+ public boolean exists() {
+ return true;
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.team.core.history.IFileRevision#getContentIdentifier()
+ */
public String getContentIdentifier() {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.team.core.history.IFileRevision#getAuthor()
+ */
public String getAuthor() {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.team.core.history.IFileRevision#getComment()
+ */
public String getComment() {
return null;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.team.core.history.IFileRevision#getTags()
+ */
public ITag[] getTags() {
return new ITag[0];
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java
index 7b718d275..e7a3db014 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceDiff.java
@@ -10,10 +10,11 @@
*******************************************************************************/
package org.eclipse.team.core.mapping;
+import org.eclipse.core.resources.IFileState;
import org.eclipse.core.resources.IResource;
import org.eclipse.team.core.diff.IDiffTree;
import org.eclipse.team.core.diff.ITwoWayDiff;
-import org.eclipse.team.core.history.IFileState;
+import org.eclipse.team.core.history.IFileRevision;
/**
* A resource diff represents the changes between two resources.
@@ -72,7 +73,7 @@ public interface IResourceDiff extends ITwoWayDiff {
* @return a handle to the file state representing the "before" state
* used to calculate this diff
*/
- public IFileState getBeforeState();
+ public IFileRevision getBeforeState();
/**
* Return a handle to the file state representing the "after" state
@@ -85,5 +86,5 @@ public interface IResourceDiff extends ITwoWayDiff {
* @return a handle to the file state representing the "before" state
* used to calculate this diff
*/
- public IFileState getAfterState();
+ public IFileRevision getAfterState();
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java
index 89bfb3278..88651bdf0 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java
@@ -20,7 +20,7 @@ import org.eclipse.core.runtime.jobs.MultiRule;
import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.diff.IDiffNode;
import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.history.IFileState;
+import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.mapping.*;
import org.eclipse.team.internal.core.*;
import org.eclipse.team.internal.core.mapping.DelegatingStorageMerger;
@@ -121,8 +121,8 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
}
// type == SyncInfo.CHANGE
IResourceDiff remoteChange = (IResourceDiff)twDelta.getRemoteChange();
- IFileState base = null;
- IFileState remote = null;
+ IFileRevision base = null;
+ IFileRevision remote = null;
if (remoteChange != null) {
base = remoteChange.getBeforeState();
remote = remoteChange.getAfterState();
@@ -155,8 +155,8 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
IStorageMerger merger = DelegatingStorageMerger.getInstance();
IFile file = (IFile)localDiff.getResource();
String osEncoding = file.getCharset();
- IFileState ancestorState = localDiff.getBeforeState();
- IFileState remoteState = remoteDiff.getAfterState();
+ IFileRevision ancestorState = localDiff.getBeforeState();
+ IFileRevision remoteState = remoteDiff.getAfterState();
IStorage ancestorStorage = ancestorState.getStorage(Policy.subMonitorFor(monitor, 30));
IStorage remoteStorage = remoteState.getStorage(Policy.subMonitorFor(monitor, 30));
OutputStream os = getTempOutputStream(file);
@@ -243,7 +243,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
private void performReplace(final IDiffNode delta, IProgressMonitor monitor) throws CoreException {
IResourceDiff d;
IFile file = getLocalFile(delta);
- IFileState remote = null;
+ IFileRevision remote = null;
if (delta instanceof IResourceDiff) {
d = (IResourceDiff) delta;
} else {
@@ -263,7 +263,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
}
}
- private void performReplace(final IDiffNode delta, final IFile file, final IFileState remote, IProgressMonitor monitor) throws CoreException {
+ private void performReplace(final IDiffNode delta, final IFile file, final IFileRevision remote, IProgressMonitor monitor) throws CoreException {
run(new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
if ((remote == null || !remote.exists()) && file.exists()) {
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java
index 9aa002f35..4fcdee591 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java
@@ -12,7 +12,7 @@ package org.eclipse.team.core.mapping.provider;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.team.core.history.IFileState;
+import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.mapping.IResourceDiff;
/**
@@ -31,8 +31,8 @@ import org.eclipse.team.core.mapping.IResourceDiff;
*/
public class ResourceDiff extends TwoWayDiff implements IResourceDiff {
- private final IFileState before;
- private final IFileState after;
+ private final IFileRevision before;
+ private final IFileRevision after;
private final IResource resource;
/**
@@ -43,7 +43,7 @@ public class ResourceDiff extends TwoWayDiff implements IResourceDiff {
* @param before the before state of the model object
* @param after the after state of the model object
*/
- public ResourceDiff(IResource resource, int kind, int flags, IFileState before, IFileState after) {
+ public ResourceDiff(IResource resource, int kind, int flags, IFileRevision before, IFileRevision after) {
super(resource.getFullPath(), kind, flags);
this.resource = resource;
this.before = before;
@@ -65,14 +65,14 @@ public class ResourceDiff extends TwoWayDiff implements IResourceDiff {
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IResourceDiff#getBeforeState()
*/
- public IFileState getBeforeState() {
+ public IFileRevision getBeforeState() {
return before;
}
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IResourceDiff#getAfterState()
*/
- public IFileState getAfterState() {
+ public IFileRevision getAfterState() {
return after;
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/FileState.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/FileState.java
deleted file mode 100644
index c1ee8e79b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/FileState.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.core.variants;
-
-import java.net.URI;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.IFileState;
-
-/**
- * Abstract implementation of {@link IFileState} that can be implemented by
- * clients.
- *
- * <p> <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is a guarantee neither that this API will
- * work nor that it will remain the same. Please do not use this API without
- * consulting with the Platform/Team team.
- * </p>
- *
- * @see IFileRevision
- * @see IFileState
- *
- * @since 3.2
- */
-public abstract class FileState implements IFileState {
-
- /**
- * Return a file state representing the current state of the
- * local file.
- * @param file a local file
- * @return a file state representing the current state of the
- * local file
- */
- public static IFileState getFileStateFor(final IFile file) {
- return new FileState() {
- public IStorage getStorage(IProgressMonitor monitor) {
- return file;
- }
- public String getName() {
- return file.getName();
- }
- public boolean exists() {
- return file.exists();
- }
- public long getTimestamp() {
- return file.getLocalTimeStamp();
- }
- public URI getURI() {
- return file.getLocationURI();
- }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileState#getURI()
- */
- public URI getURI() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileState#getTimestamp()
- */
- public long getTimestamp() {
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.history.IFileState#exists()
- */
- public boolean exists() {
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java
index dfdbea06a..ae608a8e4 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/mapping/SyncInfoToDiffConverter.java
@@ -17,13 +17,12 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.ITeamStatus;
import org.eclipse.team.core.diff.*;
-import org.eclipse.team.core.history.IFileState;
+import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.history.provider.FileRevision;
import org.eclipse.team.core.mapping.IResourceDiff;
import org.eclipse.team.core.mapping.IResourceDiffTree;
import org.eclipse.team.core.mapping.provider.*;
import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.variants.FileState;
import org.eclipse.team.core.variants.IResourceVariant;
/**
@@ -170,8 +169,8 @@ public class SyncInfoToDiffConverter implements ISyncInfoSetChangeListener {
kind = IDiffNode.CHANGE;
}
if (local.getType() == IResource.FILE) {
- IFileState after = asFileState(remote);
- IFileState before = FileState.getFileStateFor((IFile)local);
+ IFileRevision after = asFileState(remote);
+ IFileRevision before = FileRevision.getFileRevisionFor((IFile)local);
return new ResourceDiff(info.getLocal(), kind, 0, before, after);
}
// For folders, we don't need file states
@@ -196,8 +195,8 @@ public class SyncInfoToDiffConverter implements ISyncInfoSetChangeListener {
}
// For folders, we don't need file states
if (info.getLocal().getType() == IResource.FILE) {
- IFileState before = asFileState(ancestor);
- IFileState after = asFileState(remote);
+ IFileRevision before = asFileState(ancestor);
+ IFileRevision after = asFileState(remote);
return new ResourceDiff(info.getLocal(), kind, 0, before, after);
}
@@ -206,7 +205,7 @@ public class SyncInfoToDiffConverter implements ISyncInfoSetChangeListener {
return null;
}
- private static IFileState asFileState(final IResourceVariant variant) {
+ private static IFileRevision asFileState(final IResourceVariant variant) {
if (variant == null)
return null;
return new ResourceVariantFileRevision(variant);
@@ -226,8 +225,8 @@ public class SyncInfoToDiffConverter implements ISyncInfoSetChangeListener {
kind = IDiffNode.CHANGE;
}
if (local.getType() == IResource.FILE) {
- IFileState before = asFileState(ancestor);
- IFileState after = FileState.getFileStateFor((IFile)local);
+ IFileRevision before = asFileState(ancestor);
+ IFileRevision after = FileRevision.getFileRevisionFor((IFile)local);
return new ResourceDiff(info.getLocal(), kind, 0, before, after);
}
// For folders, we don't need file states
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
index ac7965e33..0d00c5b9c 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
@@ -19,7 +19,6 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.diff.IDiffNode;
import org.eclipse.team.core.diff.IThreeWayDiff;
import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.core.history.IFileState;
import org.eclipse.team.core.mapping.*;
import org.eclipse.team.core.subscribers.Subscriber;
import org.eclipse.team.core.synchronize.SyncInfo;
@@ -83,7 +82,7 @@ public class WorkspaceSubscriberContext extends CVSSubscriberMergeContext {
protected void ensureRemotesMatch(IResource resource, IDiffNode node, SyncInfo info) throws CVSException {
IResourceVariant variant = info.getRemote();
- IFileState remote = getRemote(node);
+ IFileRevision remote = getRemote(node);
if (variant != null && remote != null && remote instanceof IFileRevision) {
String ci1 = variant.getContentIdentifier();
String ci2 = ((IFileRevision)remote).getContentIdentifier();
@@ -93,7 +92,7 @@ public class WorkspaceSubscriberContext extends CVSSubscriberMergeContext {
}
}
- private IFileState getRemote(IDiffNode node) {
+ private IFileRevision getRemote(IDiffNode node) {
if (node == null) return null;
if (node instanceof IThreeWayDiff) {
IThreeWayDiff twd = (IThreeWayDiff) node;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java
index 8f0fa860d..30c195637 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.diff.IDiffNode;
import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.history.IFileState;
+import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.mapping.IResourceDiff;
import org.eclipse.team.core.mapping.IResourceDiffTree;
import org.eclipse.team.core.synchronize.SyncInfoFilter;
@@ -46,11 +46,11 @@ public class CacheBaseContentsOperation extends CacheTreeContentsOperation {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.CacheTreeContentsOperation#getRemoteFileState(org.eclipse.team.core.diff.IThreeWayDiff)
*/
- protected IFileState getRemoteFileState(IThreeWayDiff twd) {
+ protected IFileRevision getRemoteFileState(IThreeWayDiff twd) {
IResourceDiff diff = (IResourceDiff)twd.getRemoteChange();
if (diff == null)
diff = (IResourceDiff)twd.getLocalChange();
- IFileState base = diff.getBeforeState();
+ IFileRevision base = diff.getBeforeState();
return base;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java
index 0efce495f..535d99a35 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheRemoteContentsOperation.java
@@ -14,7 +14,7 @@ import org.eclipse.core.resources.mapping.ResourceMapping;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.history.IFileState;
+import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.mapping.IResourceDiff;
import org.eclipse.team.core.mapping.IResourceDiffTree;
import org.eclipse.team.internal.ccvs.core.*;
@@ -33,7 +33,7 @@ public class CacheRemoteContentsOperation extends CacheTreeContentsOperation {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.CacheTreeContentsOperation#getRemoteFileState(org.eclipse.team.core.diff.IThreeWayDiff)
*/
- protected IFileState getRemoteFileState(IThreeWayDiff twd) {
+ protected IFileRevision getRemoteFileState(IThreeWayDiff twd) {
IResourceDiff diff = (IResourceDiff)twd.getRemoteChange();
if (diff == null)
return null;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java
index c4a3097bd..cb23a9fc6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java
@@ -21,7 +21,7 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.diff.IDiffNode;
import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.history.IFileState;
+import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.mapping.IResourceDiffTree;
import org.eclipse.team.core.variants.IResourceVariant;
import org.eclipse.team.internal.ccvs.core.*;
@@ -74,7 +74,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
if (node instanceof IThreeWayDiff) {
IThreeWayDiff twd = (IThreeWayDiff) node;
IResource local = getTree().getResource(node);
- IFileState remote = getRemoteFileState(twd);
+ IFileRevision remote = getRemoteFileState(twd);
if (local.getType() == IResource.FILE
&& isEnabledForDirection(twd.getDirection())
&& remote instanceof SyncInfoToDiffConverter.ResourceVariantFileRevision) {
@@ -95,7 +95,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
* @param twd a three way diff
* @return the remote file state that is of interest
*/
- protected abstract IFileState getRemoteFileState(IThreeWayDiff twd);
+ protected abstract IFileRevision getRemoteFileState(IThreeWayDiff twd);
/**
* Return whether the direction is of interest.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FileStateTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FileStateTypedElement.java
index 0ebe808fe..6e31b7411 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FileStateTypedElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FileStateTypedElement.java
@@ -17,17 +17,17 @@ import org.eclipse.core.resources.IEncodedStorage;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.*;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.history.IFileState;
+import org.eclipse.team.core.history.IFileRevision;
/**
* A typed element for file revisions
*/
public class FileStateTypedElement extends BufferedContent implements ITypedElement, IEditableContent, IEncodedStreamContentAccessor {
- IFileState state;
+ IFileRevision state;
private IStorage bufferedContents;
- public FileStateTypedElement(IFileState state) {
+ public FileStateTypedElement(IFileRevision state) {
this.state = state;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/AbstractCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/AbstractCompareAdapter.java
index cc5e26de2..fed3405b4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/AbstractCompareAdapter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/AbstractCompareAdapter.java
@@ -17,7 +17,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.diff.IDiffNode;
import org.eclipse.team.core.diff.IThreeWayDiff;
-import org.eclipse.team.core.history.IFileState;
+import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.team.core.mapping.IResourceDiff;
import org.eclipse.team.core.mapping.ISynchronizationContext;
import org.eclipse.team.core.mapping.provider.ResourceDiffTree;
@@ -110,7 +110,7 @@ public class AbstractCompareAdapter implements ICompareAdapter {
return null;
}
- private static ITypedElement asTypedElement(IFileState state) {
+ private static ITypedElement asTypedElement(IFileRevision state) {
if (state == null)
return null;
return new FileStateTypedElement(state);

Back to the top