DESCRIPTION

When History view is open for one file, automatically select that file
in diffs when commit is selected.

Bug: 410220
Change-Id: I681de41ea613326f4c2b68593b5d20c072d7b5ab
Signed-off-by: Madisyn Francis xxx@xxx.xxx

COMMENTS

author: Brenden Conley
date: 2013-06-17 18:21:12.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/4640/ 

-------------------------------------
author: Brenden Conley
date: 2013-06-17 18:36:05.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/4640/ : SUCCESS

-------------------------------------
author: Zara Gill
date: 2013-06-17 20:02:17.000000000

Patch Set 1:

I certify that:

I have authored 100% of the content.

I have the necessary rights to submit this content, including any necessary permissions from my employer.

I am providing this content on the license(s) associated with the Eclipse Foundation project I am contributing to. I understand and agree that Eclipse projects and my contributions are public, and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

-------------------------------------
author: Douglas Trujillo
date: 2013-06-17 22:18:29.000000000

Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

nice feature :-)

when selecting a merge commit I hit the following NPE which doesn't occur without this patch:

!STACK 0
java.lang.NullPointerException
	at org.eclipse.egit.ui.internal.history.FileDiff.getNewPath(FileDiff.java:303)
	at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer.updateActionEnablement(CommitFileDiffViewer.java:336)
	at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer.access$1(CommitFileDiffViewer.java:311)
	at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer$2.selectionChanged(CommitFileDiffViewer.java:180)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
	at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1725)
	at org.eclipse.jface.viewers.TableViewer.setSelection(TableViewer.java:158)
	at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:394)
	at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer.selectFirstInterestingElement(CommitFileDiffViewer.java:651)
	at org.eclipse.egit.ui.internal.history.GitHistoryPage$4.selectionChanged(GitHistoryPage.java:905)
	at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888)

Line:7, /COMMIT_MSG -> shorten this commit message header, see contributor guide [1]

[1]  http://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines

-------------------------------------
author: Zara Gill
date: 2013-06-17 23:53:30.000000000

Patch Set 1: (1 inline comment)

I don't believe my patch is the true underlying cause of the NPE.  Without the patch, you will get a similar NPE if you manually select the same file that gets selected automatically with the patch.  The error is triggered by the selection, whether it is manual or automatic.

I don't mean to quibble over details and, if you'd like, I can try to figure out where the problem was introduced and fix it.  I'm just pointing this out because I'm not sure that you wouldn't prefer to file a separate bug for this.

Line:7, /COMMIT_MSG -> Done

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