Eclipse Platform
Release 3.2

org.eclipse.team.core.subscribers
Class SubscriberScopeManager

java.lang.Object
  extended byorg.eclipse.team.core.mapping.provider.SynchronizationScopeManager
      extended byorg.eclipse.team.core.subscribers.SubscriberScopeManager
All Implemented Interfaces:
EventListener, ISubscriberChangeListener, ISynchronizationScopeManager

public class SubscriberScopeManager
extends SynchronizationScopeManager
implements ISubscriberChangeListener

A ISynchronizationScopeManager that uses a Subscriber to provide a RemoteResourceMappingContext and to notify participants when the remote state of resources change.

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/Team team.

Since:
3.2

Constructor Summary
SubscriberScopeManager(org.eclipse.core.resources.mapping.ResourceMapping[] inputMappings, Subscriber subscriber, boolean consultModels)
          Create a manager for the given subscriber and input.
SubscriberScopeManager(org.eclipse.core.resources.mapping.ResourceMapping[] inputMappings, Subscriber subscriber, org.eclipse.core.resources.mapping.RemoteResourceMappingContext context, boolean consultModels)
          Create a manager for the given subscriber and input.
 
Method Summary
 void dispose()
          Method to be invoked when the scope of this manager is no longer needed.
protected  Subscriber getSubscriber()
          Return the subscriber for this manager.
 void initialize(IProgressMonitor monitor)
          Build the scope that is used to determine the complete set of resource mappings, and hence resources, that an operation should be performed on.
 org.eclipse.core.resources.mapping.ResourceTraversal[] refresh(org.eclipse.core.resources.mapping.ResourceMapping[] mappings, IProgressMonitor monitor)
          Refresh the scope of this manager for the given mappings.
 void subscriberResourceChanged(ISubscriberChangeEvent[] deltas)
          Notifies this listener that some resources' subscriber properties have changed.
 
Methods inherited from class org.eclipse.team.core.mapping.provider.SynchronizationScopeManager
addMappingToScope, adjustInputTraversals, createScope, getContext, getMappingsFromProviders, getProjects, getSchedulingRule, getScope, isInitialized, refresh, setHasAdditionalMappings, setHasAdditionalResources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriberScopeManager

public SubscriberScopeManager(org.eclipse.core.resources.mapping.ResourceMapping[] inputMappings,
                              Subscriber subscriber,
                              boolean consultModels)
Create a manager for the given subscriber and input.

Parameters:
inputMappings - the input mappings
subscriber - the subscriber
consultModels - whether models should be consulted when calculating the scope

SubscriberScopeManager

public SubscriberScopeManager(org.eclipse.core.resources.mapping.ResourceMapping[] inputMappings,
                              Subscriber subscriber,
                              org.eclipse.core.resources.mapping.RemoteResourceMappingContext context,
                              boolean consultModels)
Create a manager for the given subscriber and input.

Parameters:
inputMappings - the input mappings
subscriber - the subscriber
context - a remote resource mapping conext for the subscriber
consultModels - whether models should be consulted when calculating the scope
Method Detail

getSubscriber

protected Subscriber getSubscriber()
Return the subscriber for this manager.

Returns:
the subscriber for this manager

dispose

public void dispose()
Description copied from interface: ISynchronizationScopeManager
Method to be invoked when the scope of this manager is no longer needed. It is typically the reponsibility of the client that creates a scope manager to dispose of it.

Specified by:
dispose in interface ISynchronizationScopeManager
Overrides:
dispose in class SynchronizationScopeManager

initialize

public void initialize(IProgressMonitor monitor)
                throws CoreException
Description copied from interface: ISynchronizationScopeManager
Build the scope that is used to determine the complete set of resource mappings, and hence resources, that an operation should be performed on.

This method obtaines a lock on the workspace root to avoid workspace changes while calculating the scope.

Specified by:
initialize in interface ISynchronizationScopeManager
Overrides:
initialize in class SynchronizationScopeManager
Throws:
CoreException

refresh

public org.eclipse.core.resources.mapping.ResourceTraversal[] refresh(org.eclipse.core.resources.mapping.ResourceMapping[] mappings,
                                                                      IProgressMonitor monitor)
                                                               throws CoreException
Description copied from interface: ISynchronizationScopeManager
Refresh the scope of this manager for the given mappings. Changes in the scope will be reported as a property change event fired from the scope. Clients should call this method when a change in the workspace or a change issued from this manager have resulted in a change in the resources that should be included in the scope.

Specified by:
refresh in interface ISynchronizationScopeManager
Overrides:
refresh in class SynchronizationScopeManager
Throws:
CoreException

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

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.