Debugger and duchain hints overlaps

Vladimir Prus ghost at cs.msu.su
Sat Dec 4 14:55:29 UTC 2010


On Friday, November 26, 2010 05:22:55 David Nolden wrote:
> The overlap is simply a bug somewhere in the
> ActiveToolTipManager::doVisibility function. It is supposed to stack
> the tooltips above each other, ordered by the 'priority' value.

Given that ActiveToolTip::showToolTip is never called for the debugger
tooltip, I imagine doVisibility is not likely to have much impact.

> To show only exactly one tooltip, you could add a "bool exclusive"
> flag to the ActiveToolTip::showToolTip function, and then hide all
> tooltips that have a lower priority when dealing with an 'exclusive'
> tooltip.

Per documentation:

	  ///@param priority The priority of this tooltip. Lower is better. 	Multiple tooltips will be stacked down in the given order.
         ///                If it is zero, the given tooltip will be shown exclusively.

So, I sure can add call to showToolTip and pass 0 as priority. In fact, it works, kinda.

The good thing is that when I'm debugging, and in debug perspective, I see
just one tooltip. Yeah!

The bad thing is that when I'm debugging, and switch to code perspective, I also
get debug tooltip, and only it. Ehm. If I switched to code perspective while not
stopping the debugger, I probably wanted to browse some code.

What this suggests, is that each Area should specify the list of tooltips that
it would like to see, or not see. It probably means that each tooltip should be
given an id (at present, the uniqueId parameter to showToolTip is not used
anywhere in the codebase). And each area, just like it specifies tool view
preferences, should specify tooltip preferences. And, for extra bonus, Area
can specify tooltips in priority order -- which would clear my concerns about
current priority mechanism which is picked by each plugin at random.

How does that sound?

- Volodya
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debugger-tooltip.diff
Type: text/x-patch
Size: 465 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20101204/85d05f00/attachment.diff>


More information about the KDevelop-devel mailing list