Community
Participate
Working Groups
I have a Tree with selected last element. When I call navigate(boolean next) with next = true, selection jump to first element(great). But if i have selected first and i call it with next = false, it stay on first. It's inconsistent behavior. It should wraps around as it is described in javaDocs.
Krzysztof, could you provide us with a test case for this bug (passing for next=true and failing for next=false)? It would be great if we could have a bunch of tests for the AbstractTreeViewerAdvisor testing the public navigate(boolean) method. What do you think?
Right. Let's start with tests for AbstractTreeViewerAdvisor.
Created attachment 80774 [details] Tests
Created attachment 80775 [details] Patch
Created attachment 80778 [details] Patch 002
The given tests do not test the issue described in comment 0. They test the way navigate method works when there is no selection on a tree[1]. My intention was to test and fix the way it works when there is a first item selected and we call navigate(false) which is supposed to wrap around at end. I'll extend Krzysztof's tests and check whether the second patch he provided fixes the problem. [1] from AbstractTreeViewerAdvisorTests treeViewer.setSelection(StructuredSelection.EMPTY);
Mass update - removing 3.4 target. This was one of the bugs marked for investigation (and potential fixing) in 3.4 but we ran out of time. Please ping on the bug if fixing it would be really important for 3.4, and does not require API changes or feature work.
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. If the bug is still relevant, please remove the "stalebug" whiteboard tag.