public interface ITeamStateProvider
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
.
Modifier and Type | Field and Description |
---|---|
static int |
USE_DECORATED_STATE_MASK
A state mask that can be passed to the
getStateDescription(Object, int, String[], IProgressMonitor)
method to indicate that only the decorated state flags are desired. |
Modifier and Type | Method and Description |
---|---|
void |
addDecoratedStateChangeListener(ITeamStateChangeListener listener)
Add 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.
|
int |
getDecoratedStateMask(Object element)
Return the mask that indicates what state the appropriate team decorator
is capable of decorating.
|
ResourceMappingContext |
getResourceMappingContext(Object element)
Return a resource mapping context that gives access to the remote state
of the resources associated with the provider.
|
ITeamStateDescription |
getStateDescription(Object element,
int stateMask,
String[] properties,
IProgressMonitor monitor)
Return the state description for the given element.
|
boolean |
hasDecoratedState(Object element)
Return whether the given element has any decorated state.
|
boolean |
isDecorationEnabled(Object element)
Return whether decoration is enabled for the given model element.
|
void |
removeDecoratedStateChangeListener(ITeamStateChangeListener listener)
Remove the decorated state change listener to the provider.
|
static final int USE_DECORATED_STATE_MASK
getStateDescription(Object, int, String[], IProgressMonitor)
method to indicate that only the decorated state flags are desired. It is equivalent to
passing he mask returned from getDecoratedStateMask(Object)
;boolean isDecorationEnabled(Object element)
element
- the model elementboolean hasDecoratedState(Object element) throws CoreException
element
- the element being decoratedCoreException
int getDecoratedStateMask(Object element)
getStateDescription(Object, int, String[], IProgressMonitor)
in
order to determine if the decorated state has changed.
The state mask can consist of the following standard flags:
IDiff.ADD
, IDiff.REMOVE
and
IDiff.CHANGE
.
IThreeWayDiff.INCOMING
and
IThreeWayDiff.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.
element
- the model element to be decoratedIDiff
,
IThreeWayDiff
String[] getDecoratedProperties(Object element)
element
- the model element to be decoratedITeamStateDescription getStateDescription(Object element, int stateMask, String[] properties, IProgressMonitor monitor) throws CoreException
null
is return if the element is not decorated or if decoration is disabled.
Only the portion of the synchronization state covered by
stateMask
is returned. The stateMask
should
be USE_DECORATED_STATE_MASK
or the mask returned from
getDecoratedStateMask(Object)
and the requested properties
should be null
or the value returned from
getDecoratedProperties(Object)
if the client wishes to obtain
the current decorated state.element
- the model elementstateMask
- the mask that identifies which synchronization state flags are
desired if presentproperties
- the set of properties that should be included in the result or
null
if the decorated properties are desiredmonitor
- a progress monitornull
CoreException
ResourceMappingContext getResourceMappingContext(Object element)
RemoteResourceMappingContext
is returned, then the client may
access the remote state.element
- the element for which remote contents are desiredvoid addDecoratedStateChangeListener(ITeamStateChangeListener listener)
listener
- the listenervoid removeDecoratedStateChangeListener(ITeamStateChangeListener listener)
listener
- the listener
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.