]> source.dussan.org Git - jgit.git/commit
Enable marking entries using TreeFilters in DiffEntry 16/6716/8
authorRobin Stocker <robin@nibor.org>
Mon, 25 Jun 2012 22:55:39 +0000 (00:55 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 22 Jan 2013 23:24:54 +0000 (00:24 +0100)
commit75ddf2a0f4f22f2b509b6077aae4c9f689a03665
tree26b5bbfe0ea5de3f8fa5f3a00dd40a1b03bda6c5
parent35d47490112e47cbb0955dd6e3fb5a077b6ab4e3
Enable marking entries using TreeFilters in DiffEntry

This adds a new optional TreeFilter[] argument to DiffEntry.scan. All
filters will be checked during the scan to determine if an entry should
be "marked" with regard to that filter.

After having called scan, the user can then call isMarked(int) on the
entries to find out whether they matched the TreeFilter with the passed
index.

An example use case for this is in the file diff viewer of EGit's
History view, where we'd like to highlight entries that are matching the
current filter.

See EGit change I03da4b38d1591495cb290909f0e4c6e52270e97f.

Bug: 393610
Change-Id: Icf911fe6fca131b2567514f54d66636a44561af1
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffEntryTest.java
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilterMarker.java [new file with mode: 0644]