Class SubscriberTeamStateProvider

    • Constructor Detail

      • SubscriberTeamStateProvider

        public SubscriberTeamStateProvider​(Subscriber subscriber)
        Create a provider that determines the synchronization state from the subscriber. This method registers this provider as a listener on the subscriber in order to know when to fire state change events.
        Parameters:
        subscriber - the subscriber for this provider
    • Method Detail

      • getSynchronizationState

        protected final int getSynchronizationState​(Object element,
                                                    int stateMask,
                                                    IProgressMonitor monitor)
                                             throws CoreException
        Obtain the synchronization state of the element. If the model provider for the element adapts to an ISynchronizationCompareAdapter, then the adapter is used to determine the synchronization state. Others, the state is obtained from the subscriber using Subscriber.getState(ResourceMapping, int, IProgressMonitor)
        Parameters:
        element - the element
        stateMask - the state mask that indicates which state flags are desired
        monitor - a progress monitor
        Returns:
        the synchronization state of the element
        Throws:
        CoreException
      • getResourceMappingContext

        public ResourceMappingContext getResourceMappingContext​(Object element)
        Description copied from interface: ITeamStateProvider
        Return a resource mapping context that gives access to the remote state of the resources associated with the provider. If a RemoteResourceMappingContext is returned, then the client may access the remote state.
        Specified by:
        getResourceMappingContext in interface ITeamStateProvider
        Parameters:
        element - the element for which remote contents are desired
        Returns:
        a resource mapping context that gives access to the remote state of the resources associated with the provider
      • getSubscriber

        protected final Subscriber getSubscriber()
        Return the subscriber associated with this tester.
        Returns:
        the subscriber associated with this tester.
      • dispose

        public void dispose()
        Called when the provider is no longer needed. This method stops listening to the subscriber. Subclasses may extend this method but must call this method if they do.
      • subscriberResourceChanged

        public void subscriberResourceChanged​(ISubscriberChangeEvent[] deltas)
        Description copied from interface: ISubscriberChangeListener
        Notifies this listener that some resources' subscriber properties have changed. The changes have already happened. For example, a resource's base revision may have changed. The resource tree may or may not be open for modification when this method is invoked.
        Specified by:
        subscriberResourceChanged in interface ISubscriberChangeListener
        Parameters:
        deltas - detailing the kinds of changes
      • getDecoratedProperties

        public String[] getDecoratedProperties​(Object element)
        Description copied from interface: ITeamStateProvider
        Return the set of property identifiers that represent the set of properties that the team decorator would decorate for the given model element.
        Specified by:
        getDecoratedProperties in interface ITeamStateProvider
        Parameters:
        element - the model element to be decorated
        Returns:
        the set of decorated properties