Bug 105239 - Registers view does not maintain expansion when switching between stackframes
Summary: Registers view does not maintain expansion when switching between stackframes
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Samantha Chan CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-26 18:45 EDT by Samantha Chan CLA Friend
Modified: 2005-08-04 12:51 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samantha Chan CLA Friend 2005-07-26 18:45:55 EDT
To reproduce:
1.  Run a debug session with more than one stackframes.
2.  Open the registers view
3.  Expand a register group
4.  Select another stackframe and expand a register group in the Registers View.
5.  Switch back to the previous stackframe

The previously expanded regsiter group is collapsed.

Expected Behaviour:  The register group should remain expanded.

My sample adapter is always returning the same stackframe and register group 
objects.  

If I expand the register group again and repeat the previous steps, expansion 
is maintained properly.
Comment 1 Kevin Barnes CLA Friend 2005-07-27 11:34:26 EDT
Samantha, could you verify that this bug still exists in HEAD. A fix for bug
103381 was released this morning that fixes another expansion problem.
Comment 2 Samantha Chan CLA Friend 2005-07-27 11:45:22 EDT
Kevin, I checked out debug ui from HEAD.  The expansion in the Registers View 
is not maintained at all when switching between the stackframes.  Expansion in 
Variables View is maintained properly.  Thanks...
Samantha
Comment 3 Darin Wright CLA Friend 2005-07-29 09:57:13 EDT
Samantha, is this a regression from 3.0?
Comment 4 Samantha Chan CLA Friend 2005-08-02 10:04:49 EDT
The bug that I originally reported was found in 3.0.

The fixes in HEAD has caused regression from 3.0, causing registers group not 
to maintain expansion when swtiching between stackframes.

Comment 5 Darin Wright CLA Friend 2005-08-02 10:13:55 EDT
Target for 3.1.1 as this is a 3.0 regression.
Comment 6 Kevin Barnes CLA Friend 2005-08-04 11:32:59 EDT
Same scenario can be reproduced in Variables View. When the expanded state is
fully restored, the view nulls out the saved expansion. In this case, the second
frame does not have it's own expansion state stored so it inherits the last
expansion state used by the view, restores completely the expansion state and
then nulls it out. Clicking on the first frame again restores the null expansion
state because the saved state was changed when the last state was changed.
Need to copy the last state before using it.

Fixed in HEAD and 3_1_maintenance

changes: 
AbstractViewerState: created a copy method and a default constuctor. Changed
fSavedExpansion and fSelection to protected (from private) so that subclasses
may access.

RegistersViewerState: implemented copy() and default constructor

VariablesView: fixed restoreState() to make copy of last state.

VariablesViewer: fixed internalExpandPath(...) to properly handle IRegisterGroup

ViewerState: copy() and default Constructor.
Comment 7 Kevin Barnes CLA Friend 2005-08-04 11:33:20 EDT
Samantha, please verify.
Comment 8 Samantha Chan CLA Friend 2005-08-04 12:51:10 EDT
Verified with HEAD.