Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360059 - DiffTreeViewer.createToolItems does not behave as documented
Summary: DiffTreeViewer.createToolItems does not behave as documented
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-05 21:33 EDT by Frank Ziglar CLA
Modified: 2019-10-27 16:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ziglar CLA 2011-10-05 21:33:50 EDT
Build Identifier: 20100617-1415

I'm creating a custom compare input, which uses a StructuredDiffViewer, and I would like to have structural navigation buttons visible in the viewer.

DiffTreeViewer suggests navigation actions are created by default, judging from the documentation of createToolItems:

It installs four actions in the given <code>ToolBarManager</code>. Two actions
allow for copying one side of a <code>DiffNode</code> to the other side.
Two other actions are for navigating from one node to the next (previous).
Clients can override this method and are free to decide whether they want to call the inherited method.

However, the actual code for the method has been commented out, with no indication given why it has been commented out.

Ideally, the code should be un-commented, or the method & comment should be removed. Given that subclassing is not suggested at this time, it might be nice to have a flag or feature that allows access to whether or not the DiffTreeViewer installs default actions.

Reproducible: Always
Comment 1 Eclipse Genie CLA 2019-10-27 14:34:44 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Thomas Wolf CLA 2019-10-27 16:20:28 EDT
Just FYI: the reason the code was commented out (and has since then been removed altogether) is bug 18200. Code was commented out in commit 8a7c01a85d: https://git.eclipse.org/r/plugins/gitiles/platform/eclipse.platform.team/+/8a7c01a85d

The javadoc in DiffTreeViewer needs general clean-up; the class was marked @noextend in bug 225122 but mentions "Clients may override" frequently. (Or perhaps the @noextend could be removed. I don't know why it was added.)