Bug 263521 - [debug view][stack] Retrieving limited number of stack frames does not work reliably with breadcrumb.
Summary: [debug view][stack] Retrieving limited number of stack frames does not work r...
Status: ASSIGNED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf (show other bugs)
Version: 6.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on: 266308
Blocks:
  Show dependency tree
 
Reported: 2009-02-03 14:16 EST by Pawel Piech CLA
Modified: 2020-09-04 15:21 EDT (History)
2 users (show)

See Also:


Attachments
Select stack frame after expansion (1.74 KB, patch)
2009-07-03 05:58 EDT, Anton Leherbauer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Piech CLA 2009-02-03 14:16:10 EST
The feature for retrieving limited number of stack frames is somewhat challenged when using the new Debug view breadcrumb:

1) The double-clicking no longer works.  This is expected since in the drop-down a single click closes the drop-down.  I also don't think there's anything we can do about this, it's going to have to be a limitation of the breadcrumb.

2) If I select the <more frames> frame, I can bring up the context menu and select "Expand Stack".  This works, but following this action the retrieving of limited frames stops working all together, the full stack is always retrieved.

3) After selecting the expand stack action as above, the breadcrumb shows "No Active Context" because the selection is lost in Debug view.  After retrieving new stack frames, selectihon should be reset to the first newly retrieved stack frame.
Comment 1 Anton Leherbauer CLA 2009-02-26 09:42:00 EST
I tracked this down to bug 266308. By disposing the presentation context, the properties are all cleared where the current stack frame limit is stored. The same bug resets also the update mode settings.
Comment 2 Anton Leherbauer CLA 2009-02-27 06:22:43 EST
(In reply to comment #1)
> I tracked this down to bug 266308. 
This refers to 2).
3) is still open, but it is actually independent of the breadcrumb.
Comment 3 Pawel Piech CLA 2009-02-27 12:12:29 EST
(In reply to comment #0)
> 1) The double-clicking no longer works.  This is expected since in the
> drop-down a single click closes the drop-down.  I also don't think there's
> anything we can do about this, it's going to have to be a limitation of the
> breadcrumb.

What if we changed the more stack frames behavior to expand simply in response to activation?  It might be a little startling but would definitely be more friendly in the breadcrumb.
Comment 4 Anton Leherbauer CLA 2009-07-03 05:58:56 EDT
Created attachment 140757 [details]
Select stack frame after expansion

This is a fix for issue 3).

(In reply to comment #3)
> (In reply to comment #0)
> > 1) The double-clicking no longer works.  This is expected since in the
> > drop-down a single click closes the drop-down.  I also don't think there's
> > anything we can do about this, it's going to have to be a limitation of the
> > breadcrumb.
> 
> What if we changed the more stack frames behavior to expand simply in response
> to activation?  It might be a little startling but would definitely be more
> friendly in the breadcrumb.
> 

I tried to change the expand stack behavior to be triggered by viewer open events instead of double clicks.  That way we could keep the current behavior for the normal debug view and make it work for the breadcrumb at the same time.
The problem is that the viewer which the model proxy gets installed in is no StructuredViewer in case of the breadcrumb (it's a DelegatingTreeModelViewer), therefore we cannot register an open or double click event listener.
Comment 5 Pawel Piech CLA 2009-07-07 19:51:17 EDT
(In reply to comment #4)
> I tried to change the expand stack behavior to be triggered by viewer open
> events instead of double clicks.  That way we could keep the current behavior
> for the normal debug view and make it work for the breadcrumb at the same time.
> The problem is that the viewer which the model proxy gets installed in is no
> StructuredViewer in case of the breadcrumb (it's a DelegatingTreeModelViewer),
> therefore we cannot register an open or double click event listener.

In this case I would like to add methods to add an open listener to ITreeModelViewer interface, but darin doesn't want to make this interface public.  I could try to convince him to make it a public interface but we'd need more use cases and it wouldn't show up until 3.6 anyway.
Comment 6 Anton Leherbauer CLA 2009-07-09 05:51:38 EDT
(In reply to comment #4)
> Created an attachment (id=140757) [details]
> Select stack frame after expansion
> 
> This is a fix for issue 3).

I committed the fix to HEAD and cdt_6_0.


(In reply to comment #5)
> In this case I would like to add methods to add an open listener to
> ITreeModelViewer interface, but darin doesn't want to make this interface
> public.  I could try to convince him to make it a public interface but we'd
> need more use cases and it wouldn't show up until 3.6 anyway.

Another possibility is to trigger the expand stack on a selection event if the underlying viewer is no StructuredViewer.  Unfortunately, DelegatingTreeModelViewer does not forward the add/remove listener methods to the underlying viewer, so this would still require a fix in the platform, but it would not touch API.
Comment 7 Pawel Piech CLA 2009-07-09 13:32:54 EDT
(In reply to comment #6)
> Another possibility is to trigger the expand stack on a selection event if the
> underlying viewer is no StructuredViewer.  Unfortunately,
> DelegatingTreeModelViewer does not forward the add/remove listener methods to
> the underlying viewer, so this would still require a fix in the platform, but
> it would not touch API.

Yes, I think I could event target that kind of fix for 3.5.1.  If you think this is the way to go, please file a bug for platform, and I'll pick it up.