DESCRIPTION

Display logical line numbers in DiffEditorPage

Give the DiffEditorPage a special LineNumberRulerColumn that can
display logical line numbers of the shown hunk lines, corresponding
to the line numbers in changed file versions.

The ruler menu has a toggle action to switch between this logical
display and the normal physical line number display.

* Store the line numbers in the DiffRegions produced by the
  DiffRegionFormatter. Add a CONTEXT DiffRegion.Type to be able to
  number context lines.
* Introduce a LogicalLineNumberProvider.
* Add a LogicalLineNumberRulerColumn that uses such a provider to
  determine line numbers for a diff side.
* Add a composite OldNewLogicalLineNumberRulerColumn that groups two
  such LogicalLineNumberRulerColumns (one for each side) together, and
  that contains the toggling logic for physical/logical line number
  display.

Change-Id: I53394854523d15187c21786ca54370561d84642d
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2016-12-28 13:41:05.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2016-12-28 13:41:11.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2016-12-28 14:04:13.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/9428/ : SUCCESS

-------------------------------------
author: Brenden Conley
date: 2016-12-29 18:26:25.000000000

Patch Set 2: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2016-12-29 18:50:03.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/9429/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2016-12-30 00:38:24.000000000

Patch Set 2: Code-Review+1

thanks for this nice improvement :-)

when opening JGit commit c62933bf5946663e47c29d3713d1fca989f304bc in commit viewer I hit an NPE

java.lang.NullPointerException
	at org.eclipse.jgit.diff.DiffFormatter.formatHeader(DiffFormatter.java:1085)
	at org.eclipse.jgit.diff.DiffFormatter.createFormatResult(DiffFormatter.java:951)
	at org.eclipse.jgit.diff.DiffFormatter.format(DiffFormatter.java:680)
	at org.eclipse.egit.ui.internal.history.FileDiff.outputDiff(FileDiff.java:230)
	at org.eclipse.egit.ui.internal.commit.DiffRegionFormatter.write(DiffRegionFormatter.java:316)
	at org.eclipse.egit.ui.internal.commit.DiffEditorPage$3.run(DiffEditorPage.java:574)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

though I also hit an NPE when opening this commit using current master
java.lang.NullPointerException
	at org.eclipse.jgit.diff.DiffFormatter.formatHeader(DiffFormatter.java:1085)
	at org.eclipse.jgit.diff.DiffFormatter.createFormatResult(DiffFormatter.java:951)
	at org.eclipse.jgit.diff.DiffFormatter.format(DiffFormatter.java:680)
	at org.eclipse.egit.ui.internal.history.FileDiff.outputDiff(FileDiff.java:230)
	at org.eclipse.egit.ui.internal.commit.DiffRegionFormatter.write(DiffRegionFormatter.java:286)
	at org.eclipse.egit.ui.internal.commit.DiffEditorPage$2.run(DiffEditorPage.java:523)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

so it seems this problem is unrelated

-------------------------------------
author: Alayna Houston
date: 2016-12-30 07:42:31.000000000

Patch Set 2:

> so it seems this problem is unrelated

That's bug 460442, reported against 3.6.2. Still present in 4.5.0, so it wasn't re-introduced by my changes done for 4.6.0.

-------------------------------------
author: Alayna Houston
date: 2016-12-30 09:56:25.000000000

Patch Set 2:

> That's bug 460442

Handled in https://git.eclipse.org/r/#/c/87822/ .

-------------------------------------
author: Douglas Trujillo
date: 2016-12-30 10:32:01.000000000

Patch Set 2: Code-Review+2

thanks

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-12-30 10:32:07.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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