Skip to main content
diff options
authorThomas Wolf2016-12-19 23:42:10 +0000
committerThomas Wolf2016-12-28 13:40:45 +0000
commitc78cc18772708ddd8507726ce0fc574cf540c110 (patch)
tree2d9c268af8f0eef9c32e9a6f2fe203d7d60cfa9c /org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test
parent14f34b4891159b16762adb91fa0b935cef008501 (diff)
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: Thomas Wolf <>
Diffstat (limited to 'org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test')
1 files changed, 0 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/
index 2d9f25b0e..07b0036d1 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/
@@ -65,7 +65,6 @@ public class DiffRegionFormatterTest extends LocalRepositoryTestCase {
assertTrue(regions.length > 0);
for (DiffRegion region : regions) {
- assertNotNull(region.diffType);
assertTrue(region.getOffset() >= 0);
assertTrue(region.getLength() >= 0);
assertTrue(region.getOffset() < document.getLength());

Back to the top