Community
Participate
Working Groups
Use the Java Debugger from Eclipse. When stop, click on a stackframe, and switch to Variables view. Expand "this" variable. You can right click on this variable, and choose Select All. I can see only the visible members are selected, not all the members in the "this" variable. And it is the same behavior for Register View, which extends from Variables View.
Well, technically speaking select-all does select all elements, such that ctrl-c can copy them all into the clipboard. However, as soon as user scrolls down in viewer, the TreeViewer.replace() method calls preservingSelection(), which resets the selection to only the materialized items.
Looking at the Kepler 4.3 sources, the behaviours of the "Select All" context menu item and corresponding keyboard shortcut (Ctrl-A) are different for the Variables view (and hence also for the Registers view). The Ctrl-A keyboard shortcut uses org.eclipse.ui.internal.handlers.SelectAllHandler which simply invokes the selectAll() method on the underlying Tree control. Ctrl-A works correctly. Ctrl-A _immediately_ followed by Ctrl-C copies all variables to the clipboard correctly. However, the "Select All" context menu item uses org.eclipse.debug.internal.ui.actions.variables.SelectAllVariablesAction which deliberately avoids the selection of non-visible tree items (using SelectAllAction.collectExpandedAndVisible()). This results in unexpected behaviour with tooling such as CDT (especially noticeable within the DSF-GDB Registers view). I think the menu item and the keyboard shortcut should exhibit identical behaviour. There appears to be two distinct issues here. Comment #1 describes the de-selection of previously-selected tree items when scrolling. Comment #2 describes the non-selection of non-visible tree items in the first place. Can anyone explain why SelectAllVariablesAction is implemented in this way?
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.