Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 255026

Summary: [expressions] Support for advanced expression hover
Product: [Tools] CDT Reporter: Anton Leherbauer <aleherb+eclipse>
Component: cdt-debug-dsf-gdbAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: enhancement    
Priority: P3 CC: aegges, dd.general-inbox, pawel.1.piech, Randy.Rohrbach, toralf.lund
Version: 0 DD 1.1Flags: aleherb+eclipse: review+
Target Milestone: 7.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 294351    
Bug Blocks:    
Attachments:
Description Flags
Experimental expression "inspector"
aleherb+eclipse: iplog-
Updated to HEAD
aleherb+eclipse: iplog-
Use inspector hover in DSF-GDB marc.khouzam: iplog-

Description Anton Leherbauer CLA 2008-11-12 07:52:57 EST
The CDI debugger allows to display expression values when hovering with the mouse over an identifier in the editor. For feature parity DSF should also provide an implementation.

Ideally, the hover would implement something like JDT's expression "inspector" which allows to expand expressions and has a details pane.
Comment 1 Pawel Piech CLA 2008-11-12 11:43:50 EST
I'm changing the component to GDB, since the hover integration is kind of editor specific.  Although it may turn out that there are some common code which we can put in DSF.
Comment 2 Marc Khouzam CLA 2009-07-17 10:29:38 EDT
*** Bug 283842 has been marked as a duplicate of this bug. ***
Comment 3 Marc Khouzam CLA 2009-07-17 10:30:48 EDT
I think this is something that we should do.  A patch from the community would be a great way to get things moving :-)
Comment 4 Anton Leherbauer CLA 2009-11-06 02:43:50 EST
Added bug 294351 as a dependency.
Comment 5 Anton Leherbauer CLA 2009-11-10 08:29:13 EST
Created attachment 151809 [details]
Experimental expression "inspector"

Based on the new abstract debug hover support I have implemented experimental support for an expression "inspector" which is basically an expression view inside the hover.
Comment 6 Randy Rohrbach CLA 2009-11-10 10:27:15 EST
Toni

   I remember looking at this code when you were working on it ( perhaps
   prototyping in the commercial ) and it looked very good. 

   This functionality has been requested by many folks in the field and
   OCD development engineers here at Wind River. Just being able to get
   the address when you hover instead of being able to expand live in 
   the hover is a big plus. Otherwise you need to add the variable to
   the expressions view. This would allow for traversal of linked lists
   on the fly.

   Anyway, I took a look at the patch and it looks good to my untrained
   eye.

   +1 for me.

Randy
Comment 7 Marc Khouzam CLA 2009-11-10 16:16:47 EST
This is REALLY cool!
Comment 8 Anton Leherbauer CLA 2009-12-15 10:11:38 EST
Created attachment 154482 [details]
Updated to HEAD

I'd like to commit this in the next days, unless I get a veto...
Comment 9 Marc Khouzam CLA 2009-12-15 10:45:05 EST
I got some comments that this was to complicated for some people.  I would like to get some feedback from others in the community about this.  Or maybe we could have this feature as an optional setting?  To allow people to still have the standard hover.

Did you get any feedback from users about this advance hover?
Comment 10 Anton Leherbauer CLA 2009-12-16 02:32:43 EST
(In reply to comment #9)
> I got some comments that this was to complicated for some people.  I would like
> to get some feedback from others in the community about this.  Or maybe we
> could have this feature as an optional setting?  To allow people to still have
> the standard hover.
> 
> Did you get any feedback from users about this advance hover?

WR internal this feature was well received.
I'll leave the GDB hover as is and just commit the general part.
Comment 11 Anton Leherbauer CLA 2009-12-17 04:42:57 EST
I committed the general part and changed the title of this bug to better reflect what it is actually about.
Comment 12 Axel Mueller CLA 2009-12-23 06:21:23 EST
(In reply to comment #10)
> WR internal this feature was well received.
> I'll leave the GDB hover as is and just commit the general part.
I just tried out your patch for the GDB hover. And I must say I really like it and would encourage you to commit it. There are only two things that did bother me:
 - the detail pane should not be shown (I tink the hover window is too big with the detail pane and the extra info is not needed; otherwise one can use the variables view)
 - it takes a consumable time until the hover is shown
Comment 13 Marc Khouzam CLA 2010-01-09 20:17:31 EST
(In reply to comment #11)
> I committed the general part and changed the title of this bug to better
> reflect what it is actually about.

Do you have the patch for GDB.  I'd like to give it a more thorough try.  It is probably good for Helios.

Thanks
Comment 14 Axel Mueller CLA 2010-01-10 06:37:39 EST
(In reply to comment #13)
> Do you have the patch for GDB.  I'd like to give it a more thorough try.  It is
> probably good for Helios.
> 
> Thanks
Just apply the patch attached to this bug (it contains the general and the GDB part).
Comment 15 Anton Leherbauer CLA 2010-01-12 09:41:37 EST
(In reply to comment #12)
>  - the detail pane should not be shown (I tink the hover window is too big with
> the detail pane and the extra info is not needed; otherwise one can use the
> variables view)

This could be made configurable by a preference.

>  - it takes a consumable time until the hover is shown

I just noticed that there is an additional delay of 1 second because of the job priority (Job.DECORATE).  I fixed this right away.
Comment 16 Axel Mueller CLA 2010-01-12 16:52:44 EST
(In reply to comment #15)
> (In reply to comment #12)
> >  - the detail pane should not be shown (I tink the hover window is too big with
> > the detail pane and the extra info is not needed; otherwise one can use the
> > variables view)
> 
> This could be made configurable by a preference.
That would be fine. 

> >  - it takes a consumable time until the hover is shown
> 
> I just noticed that there is an additional delay of 1 second because of the job
> priority (Job.DECORATE).  I fixed this right away.
That helped indeed.
Comment 17 Axel Mueller CLA 2010-02-16 09:40:31 EST
(In reply to comment #5)
> Based on the new abstract debug hover support I have implemented experimental
> support for an expression "inspector" which is basically an expression view
> inside the hover.
Any chances to get this into HEAD (I mean the complete patch)?
Comment 18 Marc Khouzam CLA 2010-02-16 09:47:18 EST
(In reply to comment #17)
> (In reply to comment #5)
> > Based on the new abstract debug hover support I have implemented experimental
> > support for an expression "inspector" which is basically an expression view
> > inside the hover.
> Any chances to get this into HEAD (I mean the complete patch)?

I was thinking of simply adding a DSF-GDB preference to choose if the user wants the advanced hover or not.  I think that would be enough to get this in.  It should be a small patch
Comment 19 Axel Mueller CLA 2010-02-16 09:53:15 EST
(In reply to comment #18)
> (In reply to comment #17)
> > (In reply to comment #5)
> > > Based on the new abstract debug hover support I have implemented experimental
> > > support for an expression "inspector" which is basically an expression view
> > > inside the hover.
> > Any chances to get this into HEAD (I mean the complete patch)?
> 
> I was thinking of simply adding a DSF-GDB preference to choose if the user
> wants the advanced hover or not.  I think that would be enough to get this in. 
> It should be a small patch
That would be Okay for me. But I would bet that most users prefer the advanced hover :) If the advanced hover is not the default, then it would be useful to mention it in the Release Notes for Helios.
Comment 20 Marc Khouzam CLA 2010-02-16 09:54:50 EST
(In reply to comment #19)

> That would be Okay for me. But I would bet that most users prefer the advanced
> hover :) If the advanced hover is not the default, then it would be useful to
> mention it in the Release Notes for Helios.

I'm ok with making it the default, I just want to be able to turn if off, just in case :-)
Comment 21 Marc Khouzam CLA 2010-02-21 10:33:05 EST
Created attachment 159709 [details]
Use inspector hover in DSF-GDB

I committed this patch to HEAD.  It adds a preference to be able to use Toni's nice Inpsector Hover.  The preference is enabled by default.

I've also opened Bug 303440 to cleanup the CDT debug preference pages.
Comment 22 Marc Khouzam CLA 2010-02-21 10:43:58 EST
Toni, can you review?

And thanks again for this nice work.
Comment 23 Anton Leherbauer CLA 2010-02-24 03:33:48 EST
Seems fine.
Is there still a need for an option to hide the detail pane?  In this case I suggest to file a separate enhancement request.
Comment 24 Axel Mueller CLA 2010-02-24 07:29:32 EST
(In reply to comment #23)
> Seems fine.
> Is there still a need for an option to hide the detail pane?  In this case I
> suggest to file a separate enhancement request.
In principle, I am fine with the detail pane. It just bothers me (in the Variable View as well) that it shows me several formats (Hex, Binary, Octal etc.) that I don't need. It makes the view cluttered without giving more useful (IMHO) info. BTW, very often some of the formats just show (..). Is there any way to configure which number formats are shown?