Tooltip when debugging

Vladimir Prus ghost at cs.msu.su
Mon Feb 23 08:10:02 UTC 2009


On Saturday 14 February 2009 14:32:35 David nolden wrote:
> Am Samstag 14 Februar 2009 12:23:30 schrieb Vladimir Prus:
> > David,
> >
> > it appears that when I'm in debug session, hovering over a
> > variable results in code browsing tooltip. Can you suggest
> > how debugger can communicate with language support to suppress
> > it?
> >
> > Thanks,
> > Volodya
> 
> Hi! I'm not sure whether it should be totally suppressed, it might still be 
> useful. Does the debugger tooltip have a variable size? Else, it might make 
> sense just offsetting the code-browser tooltip down so it's under the debugger 
> tooltip.
> 
> I'm not sure right now how it should be communicated though. Probably the best 
> place for it would be some static members within KDevelop::ActiveTooltip.

David,

I have tried the approach you've implemented and I'm not sure it's ideal. Essentially,
your approach means that all plugins get hint request, and all plugins try to show
a tooltip, and then one with highest priority "wins". This has a number of issues:

1. Given that some plugin might need time to fetch data for display, you can get tooltip
from one plugin to appear, immediately followed by tooltip from another.

2. The 'priority' thing is hard to use. If we have a monolithic codebase, you can globally
assign priorities. However, if I'm creating a custom KDevelop-based IDE? pulling plugins
from different places, I no longer have this luxury. Given two plugins A and B, the question
which one should be preferred provided of tooltip depends on what IDE one is creating, and what
perspective is active, and what not. This knowledge cannot be encoded as an integer *inside*
plugins A and B respectively.

3. It's fairly confusing that you get two different kinds of plugins depending on what
element you hover on.

4. I sometimes get a bug whereby two tooltips are shown -- one from debugger and another from
cpp support -- at different locations.

So, I still would prefer if, in Debug perspective, the debugger be an exclusive provider of
tooltips. It's probably possible to implement this by a check in cpp support code, or
we can introduce 'itooltipprovider' and allow a perspective to specify names of tooltip providers
in priority order.

WDYT?

- Volodya




More information about the KDevelop-devel mailing list