public class RenameDetector extends Object
IStorageProviderAccessor.DiffSide.SOURCE or
IStorageProviderAccessor.DiffSide.REMOTE in the context of a Subscriber.| Constructor and Description |
|---|
RenameDetector(org.eclipse.team.core.subscribers.Subscriber subscriber,
IStorageProviderAccessor accessor)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<org.eclipse.core.resources.IFile> |
getFileAfterRename(org.eclipse.core.resources.IFile originFile,
IStorageProviderAccessor.DiffSide side)
Given an origin file, this method optionally returns the corresponding
IFile after it has been
renamed on the respective side, if it has been renamed at all. |
com.google.common.base.Optional<org.eclipse.core.resources.IFile> |
getFileBeforeRename(org.eclipse.core.resources.IFile sourceOrRemoteFile,
IStorageProviderAccessor.DiffSide side)
Given a source or remote file, this method optionally returns the corresponding
IFile before it
has been renamed on the respective side, if it has been renamed at all. |
public RenameDetector(org.eclipse.team.core.subscribers.Subscriber subscriber,
IStorageProviderAccessor accessor)
subscriber - The subscriber to access the diffs. This parameter may be null, and as such,
will result in no rename detection.accessor - The accessor to access the file variants.public com.google.common.base.Optional<org.eclipse.core.resources.IFile> getFileBeforeRename(org.eclipse.core.resources.IFile sourceOrRemoteFile,
IStorageProviderAccessor.DiffSide side)
IFile before it
has been renamed on the respective side, if it has been renamed at all.
Only IStorageProviderAccessor.DiffSide.SOURCE or IStorageProviderAccessor.DiffSide.REMOTE are valid values for side.
sourceOrRemoteFile - The potentially renamed file.side - The IStorageProviderAccessor.DiffSide to look for the rename (only IStorageProviderAccessor.DiffSide.SOURCE or
IStorageProviderAccessor.DiffSide.REMOTE are valid).Optional.absent() otherwise.public com.google.common.base.Optional<org.eclipse.core.resources.IFile> getFileAfterRename(org.eclipse.core.resources.IFile originFile,
IStorageProviderAccessor.DiffSide side)
IFile after it has been
renamed on the respective side, if it has been renamed at all.
Only IStorageProviderAccessor.DiffSide.SOURCE or IStorageProviderAccessor.DiffSide.REMOTE are valid values for side.
originFile - The potentially renamed file.side - The IStorageProviderAccessor.DiffSide to look for the rename (only IStorageProviderAccessor.DiffSide.SOURCE or
IStorageProviderAccessor.DiffSide.REMOTE are valid).Optional.absent() otherwise.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.