Package org.eclipse.team.ui.synchronize
Class TeamStateChangeEvent
- java.lang.Object
-
- org.eclipse.team.ui.synchronize.TeamStateChangeEvent
-
- All Implemented Interfaces:
ITeamStateChangeEvent
public class TeamStateChangeEvent extends Object implements ITeamStateChangeEvent
An implementation ofITeamStateChangeEvent.This class is not intended to be subclassed by clients.
- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description TeamStateChangeEvent()TeamStateChangeEvent(ISubscriberChangeEvent[] deltas)Convenience constructor for creating an event from a subscriber change.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchanged(IResource resource)The given resource has changed state.IResource[]getAddedRoots()Return the set of resources that were previously undecorated but are now decorated.IResource[]getChangedResources()Return the set of resources whose decorated state has changed.IResource[]getRemovedRoots()Return the set of resources that were previously decorated but are now undecorated.booleanhasChange(IResource resource)Return whether the resource has any state changes.voidrootAdded(IResource resource)The given root resource has been added.voidrootRemoved(IResource resource)The given root resource has been removed.
-
-
-
Constructor Detail
-
TeamStateChangeEvent
public TeamStateChangeEvent()
-
TeamStateChangeEvent
public TeamStateChangeEvent(ISubscriberChangeEvent[] deltas)
Convenience constructor for creating an event from a subscriber change.- Parameters:
deltas- the set of subscriber changes
-
-
Method Detail
-
changed
public void changed(IResource resource)
The given resource has changed state.- Parameters:
resource- the resource whose state has changed
-
rootRemoved
public void rootRemoved(IResource resource)
The given root resource has been removed.- Parameters:
resource- the resource
-
rootAdded
public void rootAdded(IResource resource)
The given root resource has been added.- Parameters:
resource- the resource
-
getAddedRoots
public IResource[] getAddedRoots()
Description copied from interface:ITeamStateChangeEventReturn the set of resources that were previously undecorated but are now decorated.- Specified by:
getAddedRootsin interfaceITeamStateChangeEvent- Returns:
- the set of resources that were previously undecorated but are now decorated.
-
getRemovedRoots
public IResource[] getRemovedRoots()
Description copied from interface:ITeamStateChangeEventReturn the set of resources that were previously decorated but are now undecorated.- Specified by:
getRemovedRootsin interfaceITeamStateChangeEvent- Returns:
- the set of resources that were previously decorated but are now undecorated.
-
getChangedResources
public IResource[] getChangedResources()
Description copied from interface:ITeamStateChangeEventReturn the set of resources whose decorated state has changed.- Specified by:
getChangedResourcesin interfaceITeamStateChangeEvent- Returns:
- the set of resources whose decorated state has changed.
-
hasChange
public boolean hasChange(IResource resource)
Description copied from interface:ITeamStateChangeEventReturn whether the resource has any state changes. This returnstrueif the resource is included in the set of changes returned byITeamStateChangeEvent.getChangedResources()or if it is a descendant of a root that is present in a set returned byITeamStateChangeEvent.getAddedRoots()orITeamStateChangeEvent.getRemovedRoots().- Specified by:
hasChangein interfaceITeamStateChangeEvent- Parameters:
resource- the resource- Returns:
- whether the resource has any state changes
-
-