public final class SubscriberStorageAccessor extends Object implements IStorageProviderAccessor
Subscribers.IStorageProviderAccessor.DiffSide| Constructor and Description |
|---|
SubscriberStorageAccessor(org.eclipse.team.core.subscribers.Subscriber subscriber)
Wraps the given subscriber within this accessor.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
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. |
IStorageProvider |
getStorageProvider(org.eclipse.core.resources.IResource resource,
IStorageProviderAccessor.DiffSide side)
This will be called by the URI Converter to get the content associated with the given local resource
(which might not exist locally).
|
boolean |
isInSync(org.eclipse.core.resources.IResource resource)
Checks whether the given resource is considered "in sync".
|
public SubscriberStorageAccessor(org.eclipse.team.core.subscribers.Subscriber subscriber)
subscriber - The wrapped subscriber.public IStorageProvider getStorageProvider(org.eclipse.core.resources.IResource resource, IStorageProviderAccessor.DiffSide side) throws org.eclipse.core.runtime.CoreException
getStorageProvider in interface IStorageProviderAccessorresource - The resource we need content for.side - Side of the content we seek.org.eclipse.core.runtime.CoreException - Thrown if the underlying provider cannot be retrieved.IStorageProviderAccessor.getStorageProvider(org.eclipse.core.resources.IResource,
org.eclipse.emf.compare.ide.ui.logical.IStorageProviderAccessor.DiffSide)public boolean isInSync(org.eclipse.core.resources.IResource resource)
throws org.eclipse.core.runtime.CoreException
isInSync in interface IStorageProviderAccessorresource - The resource to check.true if this resource is in sync with its remote variant, false
otherwise.org.eclipse.core.runtime.CoreException - Thrown if we cannot get the diff for this resource.IStorageProviderAccessor.isInSync(org.eclipse.core.resources.IResource)public 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.
Implementers should delegate this to RenameDetector.
getFileBeforeRename in interface IStorageProviderAccessorsourceOrRemoteFile - The potentially renamed file.side - The IStorageProviderAccessor.DiffSide to look for the rename (only IStorageProviderAccessor.DiffSide.SOURCE or
IStorageProviderAccessor.DiffSide.REMOTE are valid).null otherwise.public 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.
Implementers should delegate this to RenameDetector.
getFileAfterRename in interface IStorageProviderAccessororiginFile - The potentially renamed file.side - The IStorageProviderAccessor.DiffSide to look for the rename (only IStorageProviderAccessor.DiffSide.SOURCE or
IStorageProviderAccessor.DiffSide.REMOTE are valid).null otherwise.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.