|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.team.ui.synchronize.TeamStateProvider
org.eclipse.team.ui.synchronize.SubscriberTeamStateProvider
A team state provider that makes use of a Subscriber
to determine the synchronization
state. Repository provider types that have a subscriber will get one of these free through the adaptable mechanism.
If a repository provider type does not have a subscriber, or it a repository provider type wishes to se a custom
provider, they must adapt their RepositoryProviderType
class to an appropriate ITeamStateProvider
.
Clients may subclass this class.
Field Summary |
---|
Fields inherited from interface org.eclipse.team.ui.mapping.ITeamStateProvider |
---|
USE_DECORATED_STATE_MASK |
Constructor Summary | |
---|---|
SubscriberTeamStateProvider(Subscriber subscriber)
Create a provider that determines the synchronization state from the subscriber. |
Method Summary | |
---|---|
void |
dispose()
Called when the provider is no longer needed. |
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. |
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. |
protected Subscriber |
getSubscriber()
Return the subscriber associated with this tester. |
protected int |
getSynchronizationState(Object element,
int stateMask,
IProgressMonitor monitor)
Obtain the synchronization state of the element. |
boolean |
hasDecoratedState(Object element)
Return whether the given element has any decorated state. |
void |
subscriberResourceChanged(ISubscriberChangeEvent[] deltas)
Notifies this listener that some resources' subscriber properties have changed. |
Methods inherited from class org.eclipse.team.ui.synchronize.TeamStateProvider |
---|
addDecoratedStateChangeListener, fireStateChangeEvent, getDecoratedStateMask, isDecorationEnabled, removeDecoratedStateChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SubscriberTeamStateProvider(Subscriber subscriber)
subscriber
- the subscriber for this providerMethod Detail |
public boolean hasDecoratedState(Object element) throws CoreException
ITeamStateProvider
hasDecoratedState
in interface ITeamStateProvider
element
- the element being decorated
CoreException
protected final int getSynchronizationState(Object element, int stateMask, IProgressMonitor monitor) throws CoreException
Subscriber.getState(ResourceMapping, int, IProgressMonitor)
element
- the elementstateMask
- the state mask that indicates which state flags are desiredmonitor
- a progress monitor
CoreException
public ITeamStateDescription getStateDescription(Object element, int stateMask, String[] properties, IProgressMonitor monitor) throws CoreException
ITeamStateProvider
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 ITeamStateProvider.USE_DECORATED_STATE_MASK
or the mask returned from
ITeamStateProvider.getDecoratedStateMask(Object)
and the requested properties
should be null
or the value returned from
ITeamStateProvider.getDecoratedProperties(Object)
if the client wishes to obtain
the current decorated state.
getStateDescription
in interface ITeamStateProvider
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)
ITeamStateProvider
RemoteResourceMappingContext
is returned, then the client may
access the remote state.
getResourceMappingContext
in interface ITeamStateProvider
element
- the element for which remote contents are desired
protected final Subscriber getSubscriber()
public void dispose()
public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas)
ISubscriberChangeListener
subscriberResourceChanged
in interface ISubscriberChangeListener
deltas
- detailing the kinds of changespublic String[] getDecoratedProperties(Object element)
ITeamStateProvider
getDecoratedProperties
in interface ITeamStateProvider
element
- the model element to be decorated
|
Eclipse Platform Release 3.3 |
|||||||||||
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, 2007. All rights reserved.