DESCRIPTION

[historyView] Highlight filtered files in file diff viewer

The fix for bug 360073 changed the History view file diff viewer to show
all files of a commit, regardless of the resource filter. This made it
sometimes hard to find the files that the filter is focused on.

This change improves that by rendering the files that are not matched by
the filter in gray. The matching files are rendered in the same color as
before. With this, the files can be found at a glance instead of reading
through the paths.

JGit-Dependency: Icf911fe6fca131b2567514f54d66636a44561af1
Change-Id: I03da4b38d1591495cb290909f0e4c6e52270e97f
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Danika Greer
date: 2012-09-08 14:42:16.000000000

Uploaded patch set 3.

-------------------------------------
author: Danika Greer
date: 2012-09-08 14:42:25.000000000

Patch Set 3:

Rebased.

-------------------------------------
author: Douglas Trujillo
date: 2012-09-10 22:36:52.000000000

Patch Set 3:

tried with jgit 8672c43ae368a014b1fd7d3c108fd41b2fa7ea9e checked out via a local branch pointing at that commit, set the history view to show history of selected resource and select both DirCacheCheckout.java and IndexModificationTimesTest.java in package explorer (both files opened in Java editor).

result: only DirCacheCheckout.java is highlighted in history view's file list

-------------------------------------
author: Danika Greer
date: 2012-09-14 22:23:31.000000000

Patch Set 3:

Ok, I tried that, but it seems like a general problem, not only for this change.

For me, when having the two resources selected, the history view still listed only one of the files in the title (in "File: ..."), instead of both. And it also just shows the history for that. Try the following:

* Select BaseDirCacheEditor.java
* Expand the selection to DirCache.java

-> It only shows one commit, the one for BaseDirCacheEditor.java. I also added a breakpoint to inputSet() of GitHistoryPage, and it is only called when the first resource of the selection changes.

On the other hand, when using Team > Show in History, it correctly lists the two resources in the title as "2 resources: ..." and shows the combined history.

-------------------------------------
author: Danika Greer
date: 2012-09-14 22:30:45.000000000

Patch Set 3:

Found the code that is causing this in eclipse.platform.team:

http://git.eclipse.org/c/platform/eclipse.platform.team.git/tree/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java?id=a8124db84b5c192d1dfc2b52bcdaa4b9bde5bf4a#n303


				IStructuredSelection structSelection = (IStructuredSelection) selection;
				//Always take the first element - this is not intended to work with multiple selection
				//Also, hang on to this selection for future use in case the history view is not visible
				lastSelectedElement = structSelection.getFirstElement();

				if (!isLinkingEnabled() || !checkIfPageIsVisible()) {
					return;
				}

				showLastSelectedElement();

-------------------------------------
author: Danika Greer
date: 2012-10-26 20:08:12.000000000

Patch Set 3:

I opened bug 392948 (EGit) and dependency bug 392949 (platform/team) for the general problem with linked History view and more than one resource.

As the problem is general and this change can do nothing about it, can we continue with getting this in?

-------------------------------------
