Fix context menu on old/new line number ruler in DiffEditorPage
commit07b7ae2fe994055f89a78b74c75e6e5b79ebaac6
authorThomas Wolf <thomas.wolf@paranor.ch>
Sat, 31 Dec 2016 22:29:08 +0000 (31 23:29 +0100)
committerThomas Wolf <thomas.wolf@paranor.ch>
Sat, 31 Dec 2016 22:29:08 +0000 (31 23:29 +0100)
tree054c953afdc995d0bb3b4d050f6b1188bd0c09cd
parent46bf6862dfe4e77ed8f036a35f5b803a5974c0ab
Fix context menu on old/new line number ruler in DiffEditorPage

The ruler context menu would not appear on the line number ruler in
the DiffEditorPage. The menu is set on the outer CompositeRuler
containing all left columns, but none is set on our own nested
CompositeRuler, and a CompositeRuler's control only forwards typed
event listeners but not SWT-level event listeners.

Work around this by adding our own SWT.MenuDetect listener to the
nested columns that checks the correct control's menu.

Change-Id: I63fcb448d7978eaa44ca2fd3862b4cb1a2c144b4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/OldNewLogicalLineNumberRulerColumn.java