Class AbstractSynchronizeScope

    • Constructor Detail

      • AbstractSynchronizeScope

        protected AbstractSynchronizeScope()
        Constructor a scope from scratch
      • AbstractSynchronizeScope

        protected AbstractSynchronizeScope​(IMemento memento)
        Constructor a scope from a previously saved state
    • Method Detail

      • saveScope

        protected static void saveScope​(ISynchronizeScope scope,
                                        IMemento settings)
        Save the scope to the given memento
        Parameters:
        scope - a scope
        settings - a memento
      • createScope

        protected static ISynchronizeScope createScope​(IMemento settings)
        Restore a scope from the given memento
        Parameters:
        settings - a memento
        Returns:
        the scope restored from the given memento
      • firePropertyChangedEvent

        protected void firePropertyChangedEvent​(PropertyChangeEvent event)
        Fires the given property change event to all registered listeners.
        Parameters:
        event - the property change event to be fired
      • fireRootsChanges

        protected void fireRootsChanges()
        Fires a change event for property ISynchronizeScope.ROOTS containing the new roots. The old roots are not provided in the event.
      • saveState

        public void saveState​(IMemento memento)
        Persist the state of this scope. Clients must persist enough additional state to know what type (i.e. subclass) of scope to be recreated.
        Parameters:
        memento - the memento into which the scope is to be saved
      • init

        protected void init​(IMemento memento)
        Method invoked from the constructor which populates the fields of this scope
        Parameters:
        memento - the memento into which the scope was previously saved
      • contains

        public boolean contains​(IResource resource)
        Return whether the given resource is within this scope. By default, a resource is considered in the scope if it is a root or a descendant of a root.
        Parameters:
        resource - the resource
        Returns:
        whether the given resource is within this scope
        Since:
        3.2
      • getMappings

        public ResourceMapping[] getMappings()
        Return the resource mappings that define this scope. By default, the mappings are just be deep traversals of the roots of the scope but subclasses may override.
        Returns:
        the resource mappings that define this scope
        Since:
        3.2