Interface IStorageProviderAccessor

All Known Implementing Classes:
RemoteMappingContextStorageAccessor, SubscriberStorageAccessor

@Beta public interface IStorageProviderAccessor
This will be used by URI Converters in order to retrieve the storages for the files it seeks. The URI Converter usually only knows about local resources, it will thus ask for its storage accessor for the proper remote content.
Since:
4.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Used by the resolution process to determine the side of the revision to fetch.
  • Method Summary

    Modifier and Type
    Method
    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.
    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".
  • Method Details

    • getStorageProvider

      IStorageProvider getStorageProvider(org.eclipse.core.resources.IResource resource, IStorageProviderAccessor.DiffSide side) throws org.eclipse.core.runtime.CoreException
      This will be called by the URI Converter to get the content associated with the given local resource (which might not exist locally).
      Parameters:
      resource - The resource we need content for.
      side - Side of the content we seek.
      Returns:
      The content for the given side of the given resource.
      Throws:
      org.eclipse.core.runtime.CoreException - Thrown if the underlying provider cannot be retrieved.
    • isInSync

      boolean isInSync(org.eclipse.core.resources.IResource resource) throws org.eclipse.core.runtime.CoreException
      Checks whether the given resource is considered "in sync".
      Parameters:
      resource - The resource to check.
      Returns:
      true if this resource is in sync with its remote variant, false otherwise.
      Throws:
      org.eclipse.core.runtime.CoreException - Thrown if we cannot get the diff for this resource.
    • getFileBeforeRename

      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.

      Implementers should delegate this to RenameDetector.

      Parameters:
      sourceOrRemoteFile - The potentially renamed file.
      side - The IStorageProviderAccessor.DiffSide to look for the rename (only IStorageProviderAccessor.DiffSide.SOURCE or IStorageProviderAccessor.DiffSide.REMOTE are valid).
      Returns:
      The file before the rename, if it has been renamed at all, null otherwise.
    • getFileAfterRename

      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.

      Implementers should delegate this to RenameDetector.

      Parameters:
      originFile - The potentially renamed file.
      side - The IStorageProviderAccessor.DiffSide to look for the rename (only IStorageProviderAccessor.DiffSide.SOURCE or IStorageProviderAccessor.DiffSide.REMOTE are valid).
      Returns:
      The file after the rename, if it has been renamed at all, null otherwise.