| Summary: | [disassembly] pageUp/pageDown scrolling jumps over unknown sections unexpectedly | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Kirk Beitz <kirk.beitz> | ||||||||
| Component: | cdt-debug-dsf | Assignee: | Anton Leherbauer <aleherb+eclipse> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Pawel Piech <pawel.1.piech> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | aleherb+eclipse, cdtdoug, ken.ryall | ||||||||
| Version: | 7.0.1 | ||||||||||
| Target Milestone: | 7.0.3 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Kirk Beitz
Created attachment 193234 [details]
code to try to stay closer to previous focus when user scrolls via keypress
the attached patch attempts to improve the user experience by utilizing keypress scrolling to indicate a desire for continuity on the user's part (versus scrollbar scrolling, where the user may be more interested in scrolling over/past disabled ranges).
please review the patch and try it out.
for your own testing/trials …
i've found it was most likely to scroll over a disabled-range boundary (using the edc x86 debugger, so probably also with the gdb x86 debugger) if i set the cursor near the top of the disassembly window and then scrolled up or near the bottom and scrolled down, as this would be more likely to set the post-scroll cursor beyond the "..." location representing a disabled range. after applying this patch, scrolling via pageUp/pageDown feels significantly improved to me, while still allowing using the scrollbar elevator or trackpad swipe-scrolling to jump over ranges as possibly desired.
(we would also like to apply this patch to the CDT_7_0 branch if it is considered ok to do so, since our next product update coming soon would still depend on that branch.)
Created attachment 193251 [details]
Alternative fix
I tried your patch and it is an improvement, but I think it seems a bit fragile. Twice I got into a situation where the view would no longer update. This seems to be caused by the gotoAddress() call inside updateVisibleArea().
Anyway, I tried a different approach by directly handling the page up/down key presses. Please give it a try.
Created attachment 193304 [details] Alternative fix plus arrowUp/arrowDown cases (In reply to comment #2) > Created attachment 193251 [details] > Alternative fix > > I tried your patch and it is an improvement, but I think it seems a bit > fragile. Twice I got into a situation where the view would no longer update. > This seems to be caused by the gotoAddress() call inside updateVisibleArea(). > Anyway, I tried a different approach by directly handling the page up/down key > presses. Please give it a try. thanks for your contribution! page scrolling is much smoother with this approach, no doubt. while i hadn't experienced complete the "no longer update" scenario you mentioned, scrolling was much jumpier with my original patch. one thing i had been trying to address with my patch was arrow-up/arrow-down scrolling as well (as represented by the use of generic KEY in the original patch). i've re-factored your patch a bit in my attempt to include arrowUp/arrowDown: • combined pageUp() & pageDown() into keyScroll(int keyCode) in DisassemblyPart (the 2 algorithms already had much in common) • return boolean indicating true if keyScroll() processes the key (this allows it to be ignored when no viewport change occurs) my extended thanks in advance for your review of this new patch. Very good! I like it. Committed to HEAD and cdt_7_0. *** cdt cvs genie on behalf of aleherbau *** Bug 331629 - [disassembly] pageUp/pageDown scrolling jumps over unknown sections unexpectedly In cooperation with Kirk Beitz [*] DisassemblyViewer.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyViewer.java?root=Tools_Project&r1=1.3&r2=1.4 [*] DisassemblyPart.java 1.48 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java?root=Tools_Project&r1=1.47&r2=1.48 [*] DisassemblyViewer.java 1.2.2.2 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyViewer.java?root=Tools_Project&r1=1.2.2.1&r2=1.2.2.2 [*] DisassemblyPart.java 1.31.2.9 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java?root=Tools_Project&r1=1.31.2.8&r2=1.31.2.9 |