Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.team.core.synchronize
Class SyncInfoTree


java.lang.Object
  extended by 

org.eclipse.team.core.synchronize.SyncInfoSet
      extended by 
org.eclipse.team.core.synchronize.SyncInfoTree

public class SyncInfoTree
extends SyncInfoSet

Provides addition API for accessing the SyncInfo in the set through their resource's hierarchical relationships.

Events fired from a SyncInfoTree will be instances of ISyncInfoTreeChangeEvent.

Since:
3.0
See Also:
SyncInfoSet

Field Summary
protected   Map parents
           
 
Constructor Summary
SyncInfoTree ()
          Create an empty sync info tree.
SyncInfoTree ( SyncInfo[] infos)
          Create a sync info tree containing the given sync info elements.
 
Method Summary
 void add ( SyncInfo info)
          Add the given SyncInfo to the set.
 void clear ()
          Reset the sync set so it is empty.
protected   SyncInfoSetChangeEvent createEmptyChangeEvent ()
          Create an empty change event.
  SyncInfo[] getSyncInfos ( IResource resource, int depth)
          Return the SyncInfo for each out-of-sync resource in the subtree rooted at the given resource to the depth specified.
 boolean hasMembers ( IResource resource)
          Return whether the given resource has any children in the sync set.
protected   IResource[] internalGetOutOfSyncDescendants ( IContainer resource)
          This is an internal method and is not intended to be invoked or overridden by clients.
  IResource[] members ( IResource resource)
          Return the immediate children of the given resource who are either out-of-sync or contain out-of-sync resources.
 void remove ( IResource resource)
          Remove the given local resource from the set.
 void remove ( IResource resource, int depth)
          Remove from this set the SyncInfo for the given resource and any of its descendants within the specified depth.
 
Methods inherited from class org.eclipse.team.core.synchronize. SyncInfoSet
addAll, addError, addSyncSetChangedListener, beginInput, connect, countFor, endInput, getChangeEvent, getErrors, getListeners, getNodes, getResources, getSyncInfo, getSyncInfos, hasConflicts, hasIncomingChanges, hasNodes, hasOutgoingChanges, internalAdd, internalRemove, isEmpty, iterator, rejectNodes, removeAll, removeConflictingNodes, removeIncomingNodes, removeOutgoingNodes, removeSyncSetChangedListener, resetChanges, selectNodes, size
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parents

protected 
Map parents
Constructor Detail

SyncInfoTree

public SyncInfoTree()
Create an empty sync info tree.


SyncInfoTree

public SyncInfoTree(
SyncInfo[] infos)
Create a sync info tree containing the given sync info elements.

Parameters:
infos - the sync info elements
Method Detail

hasMembers

public boolean hasMembers(
IResource resource)
Return whether the given resource has any children in the sync set. The children could be either out-of-sync resources that are contained by the set or containers that are ancestors of out-of-sync resources contained by the set.

Parameters:
resource - the resource to check for children.
Returns:
true if the resource has children in the set.

getSyncInfos

public 
SyncInfo[] getSyncInfos(
IResource resource,
                               int depth)
Return the SyncInfo for each out-of-sync resource in the subtree rooted at the given resource to the depth specified. The depth is one of:
  • IResource.DEPTH_ZERO: the resource only,
  • IResource.DEPTH_ONE: the resource or its direct children,
  • IResource.DEPTH_INFINITE: the resource and all of it's descendants.
      If the given resource is out of sync, it will be included in the result.

      The default implementation makes use of getSyncInfo(IResource), members(IResource) and getSyncInfos() to provide the varying depths. Subclasses may override to optimize.

      Parameters:
      resource - the root of the resource subtree
      depth - the depth of the subtree
      Returns:
      the SyncInfo for any out-of-sync resources

createEmptyChangeEvent

protected 
SyncInfoSetChangeEvent createEmptyChangeEvent()
Description copied from class: SyncInfoSet
Create an empty change event. Subclass may override to provided specialized event types

Overrides:
createEmptyChangeEvent in class SyncInfoSet
Returns:
an empty change event

add

public void add(
SyncInfo info)
Description copied from class: SyncInfoSet
Add the given SyncInfo to the set. A change event will be generated unless the call to this method is nested in between calls to beginInput() and endInput(IProgressMonitor) in which case the event for this addition and any other sync set change will be fired in a batched event when endInput is invoked.

Invoking this method outside of the above mentioned block will result in the endInput(IProgressMonitor) being invoked with a null progress monitor. If responsiveness is required, the client should always nest sync set modifications within beginInput/endInput.

Overrides:
add in class SyncInfoSet
Parameters:
info - the sync info to be added to this set.

remove

public void remove(
IResource resource)
Description copied from class: SyncInfoSet
Remove the given local resource from the set.

Overrides:
remove in class SyncInfoSet
Parameters:
resource - the local resource to remove

clear

public void clear()
Description copied from class: SyncInfoSet
Reset the sync set so it is empty. Listeners are notified of the change.

Overrides:
clear in class SyncInfoSet

remove

public void remove(
IResource resource,
                   int depth)
Remove from this set the SyncInfo for the given resource and any of its descendants within the specified depth. The depth is one of:
  • IResource.DEPTH_ZERO: the resource only,
  • IResource.DEPTH_ONE: the resource or its direct children,
  • IResource.DEPTH_INFINITE: the resource and all of it's descendants.

      Parameters:
      resource - the root of the resource subtree
      depth - the depth of the subtree

internalGetOutOfSyncDescendants

protected 
IResource[] internalGetOutOfSyncDescendants(
IContainer resource)
This is an internal method and is not intended to be invoked or overridden by clients.


members

public 
IResource[] members(
IResource resource)
Return the immediate children of the given resource who are either out-of-sync or contain out-of-sync resources.

Parameters:
resource - the parent resource
Returns:
the children of the resource that are either out-of-sync or are ancestors of out-of-sync resources contained in the set

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire