Class RemoteMappingContextStorageAccessor

  • All Implemented Interfaces:
    IStorageProviderAccessor

    public class RemoteMappingContextStorageAccessor
    extends Object
    implements IStorageProviderAccessor
    This will use a RemoteResourceMappingContext in order to fetch the content of the sides of a comparison during model resolving.
    • Constructor Detail

      • RemoteMappingContextStorageAccessor

        public RemoteMappingContextStorageAccessor​(org.eclipse.core.resources.mapping.RemoteResourceMappingContext context)
        Wraps the given mapping context within this accessor.
        Parameters:
        context - The wrapped context.
    • Method Detail

      • getStorageProvider

        public 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).
        Specified by:
        getStorageProvider in interface IStorageProviderAccessor
        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

        public boolean isInSync​(org.eclipse.core.resources.IResource resource)
                         throws org.eclipse.core.runtime.CoreException
        Checks whether the given resource is considered "in sync".
        Specified by:
        isInSync in interface IStorageProviderAccessor
        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.