org.gitective.core.filter.tree
Class BaseTreeFilter

java.lang.Object
  extended by org.eclipse.jgit.treewalk.filter.TreeFilter
      extended by org.gitective.core.filter.tree.BaseTreeFilter
Direct Known Subclasses:
CommitTreeFilter.FilterWrapper, ExtensionOccurrenceFilter, TypeCountFilter

public abstract class BaseTreeFilter
extends org.eclipse.jgit.treewalk.filter.TreeFilter

Base tree filter to be extended by sub-classes.


Field Summary
protected  org.eclipse.jgit.lib.Repository repository
          Repository for current walk
 
Fields inherited from class org.eclipse.jgit.treewalk.filter.TreeFilter
ALL, ANY_DIFF
 
Constructor Summary
BaseTreeFilter()
           
 
Method Summary
 org.eclipse.jgit.treewalk.filter.TreeFilter clone()
          Clones the tree filter.
protected  boolean include(boolean include)
          Return the include value given unless include is false and this filter is configured to stop the search when a commit is not included.
 boolean include(org.eclipse.jgit.revwalk.RevWalk commitWalk, org.eclipse.jgit.revwalk.RevCommit commit, org.eclipse.jgit.treewalk.TreeWalk treeWalk)
          Include tree walk from commit and rev walk
 BaseTreeFilter reset()
          Reset the filter.
 BaseTreeFilter setRepository(org.eclipse.jgit.lib.Repository repository)
          Set the repository for the walk that is about to begin.
 BaseTreeFilter setStop(boolean stop)
          Set whether the search should be stopped when a commit visited is not included.
 boolean shouldBeRecursive()
           
 
Methods inherited from class org.eclipse.jgit.treewalk.filter.TreeFilter
include, negate, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

repository

protected org.eclipse.jgit.lib.Repository repository
Repository for current walk

Constructor Detail

BaseTreeFilter

public BaseTreeFilter()
Method Detail

setStop

public BaseTreeFilter setStop(boolean stop)
Set whether the search should be stopped when a commit visited is not included.

Parameters:
stop -
Returns:
this filter

setRepository

public BaseTreeFilter setRepository(org.eclipse.jgit.lib.Repository repository)
Set the repository for the walk that is about to begin.

Parameters:
repository -
Returns:
this filter

include

public boolean include(org.eclipse.jgit.revwalk.RevWalk commitWalk,
                       org.eclipse.jgit.revwalk.RevCommit commit,
                       org.eclipse.jgit.treewalk.TreeWalk treeWalk)
                throws IOException
Include tree walk from commit and rev walk

Parameters:
commitWalk -
commit -
treeWalk -
Returns:
true to include, false to abort
Throws:
IOException
See Also:
TreeFilter.include(TreeWalk)

include

protected boolean include(boolean include)
Return the include value given unless include is false and this filter is configured to stop the search when a commit is not included.

Parameters:
include -
Returns:
include parameter value

reset

public BaseTreeFilter reset()
Reset the filter. Sub-classes may override.

Returns:
this tree filter

shouldBeRecursive

public boolean shouldBeRecursive()
Specified by:
shouldBeRecursive in class org.eclipse.jgit.treewalk.filter.TreeFilter

clone

public org.eclipse.jgit.treewalk.filter.TreeFilter clone()
Clones the tree filter.

The default implementation throws a UnsupportedOperationException and sub-classes should override if filter cloning is supported.

Overrides:
clone in class org.eclipse.jgit.treewalk.filter.TreeFilter
See Also:
TreeFilter.clone()


Copyright © 2011-2012. All Rights Reserved.