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

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.mapping
Class ChangeTracker

java.lang.Object
  extended by 
org.eclipse.team.core.mapping.ChangeTracker

public abstract class ChangeTracker
extends Object

Supports the tracking of related changes for the purpose of grouping then using an IChangeGroupingRequestor.

Clients may subclass this class.

Since:
3.3
See Also:
IChangeGroupingRequestor

Constructor Summary
ChangeTracker ()
          Create a change tracker
 
Method Summary
 void dispose ()
          Remove any listeners for this tracker.
protected  void ensureGrouped ( IProject project, String name, IFile[] files)
          Group the given modified file into a change set with the given name.
protected abstract  void handleChanges ( IProject project, IResource[] resources)
          The given resources of interest have changed in the given project.
protected abstract  void handleProjectChange ( IProject project)
          Resources of interest in the given project have changed but the specific changes are not known.
protected  boolean isChangeOfInterest ( IResourceDelta delta)
          Return whether the given delta represents a change of interest.
protected  boolean isModified ( IFile file)
          Return whether the given file is modified with respect to the repository provider associated with the file's project.
protected  boolean isProjectOfInterest ( IProject project)
          Return whether the given project is of interest to this tracker.
protected  boolean isProjectTracked ( IProject project)
          Return whether the given project is being tracked.
protected abstract  boolean isResourceOfInterest ( IResource resource)
          Return whether the given resource is of interest to the tracker.
protected  void projectTracked ( IProject project)
          Callback made from trackProject(IProject) when a project is tracked.
 void start ()
          Start tracking changes.
protected  void stopTrackingProject ( IProject project)
          Stop tracking changes for the given project.
protected  boolean trackProject ( IProject project)
          Track the given project if it has a change set collector.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeTracker

public ChangeTracker()
Create a change tracker

Method Detail

start

public void start()
Start tracking changes. This registers listeners with the workspace and team.


dispose

public void dispose()
Remove any listeners for this tracker. Subclasses may extend this method but must call this method if they do.


isChangeOfInterest

protected boolean isChangeOfInterest(
IResourceDelta delta)
Return whether the given delta represents a change of interest.

Parameters:
delta - the delta
Returns:
whether the given delta represents a change of interest

stopTrackingProject

protected void stopTrackingProject(
IProject project)
Stop tracking changes for the given project. Subclasses may extend but must call this method.

Parameters:
project - the project

isProjectTracked

protected final boolean isProjectTracked(
IProject project)
Return whether the given project is being tracked.

Parameters:
project - the project
Returns:
whether the given project is being tracked

isProjectOfInterest

protected boolean isProjectOfInterest(
IProject project)
Return whether the given project is of interest to this tracker. By default, true is returned if the project is accessible. Subclasses may extend but should still check for project accessibility either by calling IResource.isAccessible() or by invoking the overridden method.

Parameters:
project - the project
Returns:
whether the given project is of interest to this tracker

isResourceOfInterest

protected abstract boolean isResourceOfInterest(
IResource resource)
Return whether the given resource is of interest to the tracker.

Parameters:
resource - the resource
Returns:
whether the given resource is of interest to the tracker

handleChanges

protected abstract void handleChanges(
IProject project,
                                      
IResource[] resources)
The given resources of interest have changed in the given project.

Parameters:
project - the project
resources - the resources

handleProjectChange

protected abstract void handleProjectChange(
IProject project)
Resources of interest in the given project have changed but the specific changes are not known. Implementors must search the project for changes of interest.

Parameters:
project - the project

trackProject

protected final boolean trackProject(
IProject project)
Track the given project if it has a change set collector. If the project does not have a collector, the project is not tracked.

Parameters:
project - the project
Returns:
whether the project is being tracked

projectTracked

protected void projectTracked(
IProject project)
Callback made from trackProject(IProject) when a project is tracked. By default, handleProjectChange(IProject) is called by subclasses may override.

Parameters:
project - the project

ensureGrouped

protected void ensureGrouped(
IProject project,
                             
String name,
                             
IFile[] files)
                      throws 
CoreException
Group the given modified file into a change set with the given name.

Parameters:
project - the project
name - the unique name used to identify the change set
files - the change files to be grouped
Throws:
CoreException

isModified

protected boolean isModified(
IFile file)
                      throws 
CoreException
Return whether the given file is modified with respect to the repository provider associated with the file's project.

Parameters:
file - the file
Returns:
whether the given file is modified
Throws:
CoreException

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