Package org.eclipse.team.ui.mapping
Interface ITeamStateProvider
- All Known Implementing Classes:
- SubscriberTeamStateProvider,- TeamStateProvider
public interface ITeamStateProvider
A team state provider is used by the 
SynchronizationStateTester
 to obtain the team state for model elements. A team
 state provider is associated with a RepositoryProviderType using the
 adaptable mechanism. A default decoration provider that uses the subscriber
 of the type is provided.
 
 This interface is not intended to be implemented by clients. Clients should
 instead subclass TeamStateProvider or
 SubscriberTeamStateProvider.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intA state mask that can be passed to thegetStateDescription(Object, int, String[], IProgressMonitor)method to indicate that only the decorated state flags are desired.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a decorated state change listener to the provider.String[]getDecoratedProperties(Object element) Return the set of property identifiers that represent the set of properties that the team decorator would decorate for the given model element.intgetDecoratedStateMask(Object element) Return the mask that indicates what state the appropriate team decorator is capable of decorating.getResourceMappingContext(Object element) Return a resource mapping context that gives access to the remote state of the resources associated with the provider.getStateDescription(Object element, int stateMask, String[] properties, IProgressMonitor monitor) Return the state description for the given element.booleanhasDecoratedState(Object element) Return whether the given element has any decorated state.booleanisDecorationEnabled(Object element) Return whether decoration is enabled for the given model element.voidRemove the decorated state change listener to the provider.
- 
Field Details- 
USE_DECORATED_STATE_MASKstatic final int USE_DECORATED_STATE_MASKA state mask that can be passed to thegetStateDescription(Object, int, String[], IProgressMonitor)method to indicate that only the decorated state flags are desired. It is equivalent to passing he mask returned fromgetDecoratedStateMask(Object);- See Also:
 
 
- 
- 
Method Details- 
isDecorationEnabledReturn whether decoration is enabled for the given model element. If decoration is not enabled, the model does not need to fire label change events when the team state of the element changes.- Parameters:
- element- the model element
- Returns:
- whether decoration is enabled for the given model element
 
- 
hasDecoratedStateReturn whether the given element has any decorated state.- Parameters:
- element- the element being decorated
- Returns:
- whether the given element has any decorated state
- Throws:
- CoreException- if an error occurs
 
- 
getDecoratedStateMaskReturn the mask that indicates what state the appropriate team decorator is capable of decorating. Clients can used this to obtain the current decorated state fromgetStateDescription(Object, int, String[], IProgressMonitor)in order to determine if the decorated state has changed.The state mask can consist of the following standard flags: - The diff kinds of IDiff.ADD,IDiff.REMOVEandIDiff.CHANGE.
- The directions IThreeWayDiff.INCOMINGandIThreeWayDiff.OUTGOING.
 The mask can also consist of flag bits that are unique to the repository provider associated with the resources that the element maps to. - Parameters:
- element- the model element to be decorated
- Returns:
- the mask that indicates what state the appropriate team decorator will decorate
- See Also:
 
- The diff kinds of 
- 
getDecoratedPropertiesReturn the set of property identifiers that represent the set of properties that the team decorator would decorate for the given model element.- Parameters:
- element- the model element to be decorated
- Returns:
- the set of decorated properties
 
- 
getStateDescriptionITeamStateDescription getStateDescription(Object element, int stateMask, String[] properties, IProgressMonitor monitor) throws CoreException Return the state description for the given element. Anullis return if the element is not decorated or if decoration is disabled. Only the portion of the synchronization state covered bystateMaskis returned. ThestateMaskshould beUSE_DECORATED_STATE_MASKor the mask returned fromgetDecoratedStateMask(Object)and the requested properties should benullor the value returned fromgetDecoratedProperties(Object)if the client wishes to obtain the current decorated state.- Parameters:
- element- the model element
- stateMask- the mask that identifies which synchronization state flags are desired if present
- properties- the set of properties that should be included in the result or- nullif the decorated properties are desired
- monitor- a progress monitor
- Returns:
- the state for the given element or null
- Throws:
- CoreException- if an error occurs
 
- 
getResourceMappingContextReturn a resource mapping context that gives access to the remote state of the resources associated with the provider. If aRemoteResourceMappingContextis returned, then the client may access the remote state.- 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
 
- 
addDecoratedStateChangeListenerAdd a decorated state change listener to the provider. Adding the same listener more than once has no effect.- Parameters:
- listener- the listener
 
- 
removeDecoratedStateChangeListenerRemove the decorated state change listener to the provider. Removing a listener that is not registered has no effect.- Parameters:
- listener- the listener
 
 
-