Bug 204157 - AbstractTreeViewerAdvisor#navigate(...) doesn't work properly
Summary: AbstractTreeViewerAdvisor#navigate(...) doesn't work properly
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-20 13:20 EDT by Krzysztof Michalski CLA
Modified: 2019-11-14 03:18 EST (History)
2 users (show)

See Also:
krzysztof.michalski: review? (malgorzata.tomczyk)


Attachments
Tests (7.12 KB, patch)
2007-10-19 11:03 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Patch (4.18 KB, patch)
2007-10-19 11:12 EDT, Krzysztof Michalski CLA
no flags Details | Diff
Patch 002 (3.87 KB, patch)
2007-10-19 11:44 EDT, Krzysztof Michalski CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Michalski CLA 2007-09-20 13:20:59 EDT
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.
Comment 1 Tomasz Zarna CLA 2007-09-21 09:38:06 EDT
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?
Comment 2 Szymon Brandys CLA 2007-09-24 04:54:11 EDT
Right. Let's start with tests for AbstractTreeViewerAdvisor.
Comment 3 Krzysztof Michalski CLA 2007-10-19 11:03:58 EDT
Created attachment 80774 [details]
Tests
Comment 4 Krzysztof Michalski CLA 2007-10-19 11:12:58 EDT
Created attachment 80775 [details]
Patch
Comment 5 Krzysztof Michalski CLA 2007-10-19 11:44:43 EDT
Created attachment 80778 [details]
Patch 002
Comment 6 Tomasz Zarna CLA 2008-04-11 11:44:17 EDT
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);
Comment 7 Szymon Brandys CLA 2008-05-09 04:23:22 EDT
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.
Comment 8 Lars Vogel CLA 2019-11-14 03:18:36 EST
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.