Eclipse Platform
Release 3.1

org.eclipse.team.ui.synchronize
Class ResourceScope

java.lang.Object
  extended byorg.eclipse.team.ui.synchronize.AbstractSynchronizeScope
      extended byorg.eclipse.team.ui.synchronize.ResourceScope
All Implemented Interfaces:
ISynchronizeScope

public class ResourceScope
extends AbstractSynchronizeScope

A synchronize scope whose roots are a set of resources.

Clients are not expected to subclass this class.

Since:
3.0

Field Summary
 
Fields inherited from interface org.eclipse.team.ui.synchronize.ISynchronizeScope
NAME, ROOTS
 
Constructor Summary
protected ResourceScope(IMemento memento)
          Create this scope from it's previously saved state
  ResourceScope(IResource[] resources)
          Create the resource scope for the given resources
 
Method Summary
 void dispose()
          Dispose of the scope when it is no longer needed.
 String getName()
          Return the name of the scope
 IResource[] getRoots()
          Return the root resources that define this scope.
protected  void init(IMemento memento)
          Method invoked from the constructor which repopulates the fields of this scope
 void saveState(IMemento memento)
          Persist the state of this scope.
 void setResources(IResource[] resources)
          Set the resources that define this scope
 
Methods inherited from class org.eclipse.team.ui.synchronize.AbstractSynchronizeScope
addPropertyChangeListener, createScope, firePropertyChangedEvent, fireRootsChanges, removePropertyChangeListener, saveScope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceScope

public ResourceScope(IResource[] resources)
Create the resource scope for the given resources

Parameters:
resources - the resources that define this scope

ResourceScope

protected ResourceScope(IMemento memento)
Create this scope from it's previously saved state

Parameters:
memento - persisted state that can be restored
Method Detail

setResources

public void setResources(IResource[] resources)
Set the resources that define this scope

Parameters:
resources - the resources that define this scope

getName

public String getName()
Description copied from interface: ISynchronizeScope
Return the name of the scope

Returns:
the name of the scope

getRoots

public IResource[] getRoots()
Description copied from interface: ISynchronizeScope
Return the root resources that define this scope. A return value of null indicates that the participant should use its default set of resources.

Returns:
the root resources of null

dispose

public void dispose()
Description copied from interface: ISynchronizeScope
Dispose of the scope when it is no longer needed.

Specified by:
dispose in interface ISynchronizeScope
Overrides:
dispose in class AbstractSynchronizeScope

saveState

public void saveState(IMemento memento)
Description copied from class: AbstractSynchronizeScope
Persist the state of this scope. Clients must persist enough additional state to know what type (i.e. subclass) of scope to be recreated.

Overrides:
saveState in class AbstractSynchronizeScope
Parameters:
memento - the memento into which the scope is to be saved

init

protected void init(IMemento memento)
Description copied from class: AbstractSynchronizeScope
Method invoked from the constructor which repopulates the fields of this scope

Overrides:
init in class AbstractSynchronizeScope
Parameters:
memento - the memento into which the scope was previously saved

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.