Community
Participate
Working Groups
I20080807-1402, was OK in 3.3.2 and 3.4. Paste the class below to the Package Explorer, set the breakpoint, and then debug as Java application. When the breakpoint is hit (in both threads), make sure that the Debug view is so narrow that its toolbar just fits on one row (the view then shows a horizontal scroll bar). Press F8. => Was: Tree scrolls to the right => Expected: Tree should not scroll horizontally Even when you drag the thumb to the left, pressing F8 always scrolls to the right again. package xy; public class Try { public static void main(String[] args) { new Thread("Worker") { public void run() { goDeep(); } }.start(); goDeep(); } static void goDeep() { for (int i = 0; i < 10; i++) { deep(50); } } private static void deep(int i) { if (i > 0) { deep(i - 1); } else { try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("hi"); // breakpoint } } }
Still very annoying in I20081111-0800. When I debug threading problems, I often lose context in the tree and have to scroll back manually.
*** Bug 307735 has been marked as a duplicate of this bug. ***
This is still quite annoying in I20110310-1119. Would make a great polish item. If the problem is in SWT, please move the bug.
The problem happens because Tree.setTopItem() is called for the thread tree item (Thread [main] ...) which is longer than the tree itself. The OS call to set the top item also scrolls horizontally to reveal the item's text. I believe Tree.setTopItem() should not scroll horizontally. This is the behavior in other platforms.
Created attachment 191916 [details] fix
Fixed > 20110325