Project: Eclipse_Platform_UI
Bug 185673 [Viewers] Mac only: In variables and expressions views, up/down keyboard navigation doesn't work correctly
Reported: 2007-05-06 02:33:27 | Status: verified fixed

Build ID: I20070503-1400 On Mac, if you use the down arrow key (not the scrollbar) to move down the variables view or expressions view, it does not work correctly -- sometimes, after pressing down arrow, the selection jumps back to the first line in the view. It reproduces consistently, and is not timing-sensitive. Steps To Reproduce: 1. Make a new Java project "J", and paste this program into it: public class J { public static void main(String[] args) { int[] a = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; System.out.println("breakpoint here"); } } 2. Switch to the Debug perspective, and make sure the Variables view is visible, and is not too tall. Make it about 4 1/2 lines tall. 3. Set a breakpoint on the println line. 4. Debug. When you hit the breakpoint, the variables view should have the empty "args" array, plus array "a". 5. Click the triangle to expand "a". You should now see a line for a[0], a line for a[1], and half of the line for a[2]. 6. Click in the variables view to give it keyboard focus, on the line for array "a". 7. Press down arrow a few times. You can pause between each press of the key; this is not a timing-sensitive issue. For the first few lines, each time you press down arrow, the cursor will move down a line, as it should. When you are on a[1] and press down arrow, the screen scrolls about 1/2 line, and now a[2] is correctly selected. But the next time you press down-arrow, something strange happens: the view does scroll, so a[3] is visible, but there is no blue highlight indicating that a[3] is selected. Then, if you press down-arrow one more time, the scrollbar jumps all the way to the top, and the very first line of the view, "args", is selected. If you repeat the process, you will find that this time, you get one line farther: a[3] will be reached successfully, but a[4] will be where the weirdness starts. Each time you repeat it, you will get one line farther down before it starts messing up. More information: The problem does not reproduce in any other view, such as breakpoints, debug, outline, etc., so I think the problem is specific to variables and expressions. Also, it is a core bug, not a JDT bug, because it reproduces when debugging other languages. Does not reproduce on Windows. I didn't have a chance to try any other platforms.

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java