org.gitective.core.filter.commit
Class PatternFindCommitFilter

java.lang.Object
  extended by org.eclipse.jgit.revwalk.filter.RevFilter
      extended by org.gitective.core.filter.commit.CommitFilter
          extended by org.gitective.core.filter.commit.PatternFindCommitFilter
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
CommitMessageFindFilter

public abstract class PatternFindCommitFilter
extends CommitFilter

Base commit filter class that includes commits where a configured pattern can be found.


Field Summary
protected  int flags
          Flags
protected  Matcher matcher
          Pattern matcher
protected  String pattern
          Pattern
 
Fields inherited from class org.gitective.core.filter.commit.CommitFilter
repository
 
Fields inherited from class org.eclipse.jgit.revwalk.filter.RevFilter
ALL, MERGE_BASE, NO_MERGES, NONE
 
Constructor Summary
PatternFindCommitFilter(String pattern)
          Create a pattern find commit filter
PatternFindCommitFilter(String pattern, int flags)
          Create a pattern find commit filter
 
Method Summary
protected abstract  CharSequence getText(org.eclipse.jgit.revwalk.RevCommit commit)
          Get the text from the commit to find the pattern in
 boolean include(org.eclipse.jgit.revwalk.RevWalk walker, org.eclipse.jgit.revwalk.RevCommit commit)
           
 
Methods inherited from class org.gitective.core.filter.commit.CommitFilter
clone, include, reset, setRepository, setStop
 
Methods inherited from class org.eclipse.jgit.revwalk.filter.RevFilter
negate, requiresCommitBody, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pattern

protected final String pattern
Pattern


flags

protected final int flags
Flags


matcher

protected final Matcher matcher
Pattern matcher

Constructor Detail

PatternFindCommitFilter

public PatternFindCommitFilter(String pattern)
Create a pattern find commit filter

Parameters:
pattern -

PatternFindCommitFilter

public PatternFindCommitFilter(String pattern,
                               int flags)
Create a pattern find commit filter

Parameters:
pattern -
flags -
Method Detail

include

public boolean include(org.eclipse.jgit.revwalk.RevWalk walker,
                       org.eclipse.jgit.revwalk.RevCommit commit)
                throws IOException
Specified by:
include in class org.eclipse.jgit.revwalk.filter.RevFilter
Throws:
IOException

getText

protected abstract CharSequence getText(org.eclipse.jgit.revwalk.RevCommit commit)
Get the text from the commit to find the pattern in

Parameters:
commit -
Returns:
text


Copyright © 2011-2012. All Rights Reserved.