|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
.
IAdapterManager
,
RepositoryProviderType
,
RepositoryProviderType.getSubscriber()
,
TeamStateProvider
,
SubscriberTeamStateProvider
,
SynchronizationStateTester
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Field Detail |
public 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)
;
Method Detail |
public boolean isDecorationEnabled(Object element)
element
- the model element
public boolean hasDecoratedState(Object element) throws CoreException
element
- the element being decorated
CoreException
public 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 decorated
IDiff
,
IThreeWayDiff
public String[] getDecoratedProperties(Object element)
element
- the model element to be decorated
public ITeamStateDescription 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 monitor
null
CoreException
public ResourceMappingContext getResourceMappingContext(Object element)
RemoteResourceMappingContext
is returned, then the client may
access the remote state.
element
- the element for which remote contents are desired
public void addDecoratedStateChangeListener(ITeamStateChangeListener listener)
listener
- the listenerpublic void removeDecoratedStateChangeListener(ITeamStateChangeListener listener)
listener
- the listener
|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.