Package org.eclipse.team.ui.synchronize
Class WorkingSetScope
- java.lang.Object
-
- org.eclipse.team.ui.synchronize.AbstractSynchronizeScope
-
- org.eclipse.team.ui.synchronize.WorkingSetScope
-
- All Implemented Interfaces:
EventListener,IPropertyChangeListener,ISynchronizeScope
public class WorkingSetScope extends AbstractSynchronizeScope implements IPropertyChangeListener
A synchronize scope whose roots are defined by a working set.- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.team.ui.synchronize.ISynchronizeScope
NAME, ROOTS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWorkingSetScope(IMemento memento)Create this scope from it's previously saved stateWorkingSetScope(IWorkingSet[] sets)Create the scope for the working sets
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose of the scope when it is no longer needed.StringgetName()Return the name of the scopeIResource[]getRoots()Return the root resources that define this scope.protected voidinit(IMemento memento)Method invoked from the constructor which populates the fields of this scopevoidpropertyChange(PropertyChangeEvent event)Notification that a property has changed.voidsaveState(IMemento memento)Persist the state of this scope.protected voidsetWorkingSets(IWorkingSet[] sets)Initialize this working set scope with the provided working sets.-
Methods inherited from class org.eclipse.team.ui.synchronize.AbstractSynchronizeScope
addPropertyChangeListener, contains, createScope, firePropertyChangedEvent, fireRootsChanges, getMappings, removePropertyChangeListener, saveScope
-
-
-
-
Constructor Detail
-
WorkingSetScope
public WorkingSetScope(IWorkingSet[] sets)
Create the scope for the working sets- Parameters:
sets- the working sets that defines this scope
-
WorkingSetScope
protected WorkingSetScope(IMemento memento)
Create this scope from it's previously saved state- Parameters:
memento- the memento containing a previous scope information that is used to initialize this scope.
-
-
Method Detail
-
setWorkingSets
protected void setWorkingSets(IWorkingSet[] sets)
Initialize this working set scope with the provided working sets.- Since:
- 3.1
-
getName
public String getName()
Description copied from interface:ISynchronizeScopeReturn the name of the scope- Specified by:
getNamein interfaceISynchronizeScope- Returns:
- the name of the scope
-
getRoots
public IResource[] getRoots()
Description copied from interface:ISynchronizeScopeReturn the root resources that define this scope. A return value ofnullindicates that the participant should use its default set of resources.- Specified by:
getRootsin interfaceISynchronizeScope- Returns:
- the root resources or
null
-
propertyChange
public void propertyChange(PropertyChangeEvent event)
Description copied from interface:IPropertyChangeListenerNotification that a property has changed.This method gets called when the observed object fires a property change event.
- Specified by:
propertyChangein interfaceIPropertyChangeListener- Parameters:
event- the property change event object describing which property changed and how
-
dispose
public void dispose()
Description copied from interface:ISynchronizeScopeDispose of the scope when it is no longer needed.- Specified by:
disposein interfaceISynchronizeScope- Overrides:
disposein classAbstractSynchronizeScope
-
saveState
public void saveState(IMemento memento)
Description copied from class:AbstractSynchronizeScopePersist the state of this scope. Clients must persist enough additional state to know what type (i.e. subclass) of scope to be recreated.- Overrides:
saveStatein classAbstractSynchronizeScope- Parameters:
memento- the memento into which the scope is to be saved
-
init
protected void init(IMemento memento)
Description copied from class:AbstractSynchronizeScopeMethod invoked from the constructor which populates the fields of this scope- Overrides:
initin classAbstractSynchronizeScope- Parameters:
memento- the memento into which the scope was previously saved
-
-