News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

patch on Disable the Tooltip when debugging

Started by ollydbg, May 29, 2009, 04:38:18 PM

Previous topic - Next topic

ollydbg

In this topics, people are discussing the     Usability issues.

http://forums.next.codeblocks.org/index.php/topic,10154.0.html

Today, When I'm reading and studying CB's source code, I found the Issue 3(I also think this is a quite annoying issue :() can easily be solved like Visual Studio's method. I have tested my patch and it works fine. :D
Quote
Issue 3: Code completion tooltip messing with debugger tooltip

If both tooltips are enabled, trying to see the value of a variable by hovering the pointer on it will display two tooltips, one on top of the other. In all my tests, the code completion tooltip was always on top of the debugger tooltip. Visual Studio solves this issue by completely disabling code completion's tooltip during a debugging session.

See the patch below.

Index: debuggergdb.cpp
===================================================================
--- debuggergdb.cpp (revision 5611)
+++ debuggergdb.cpp (working copy)
@@ -2495,6 +2495,11 @@
     if (!ed)
         return;

+//    if (!wxGetKeyState(WXK_CONTROL))
+//        return;
+    if (ed->GetControl()->CallTipActive())
+        ed->GetControl()->CallTipCancel();
+
     int style = event.GetInt();
     if (style != wxSCI_C_DEFAULT && style != wxSCI_C_OPERATOR && style != wxSCI_C_IDENTIFIER)
         return;


By the way, I want to use "CTRL" key while mouse hovering some text to get the ValueTooltip shown.

So, I try to add the code:

+//    if (!wxGetKeyState(WXK_CONTROL))
+//        return;


But it didn't works as I expect. Can you give me some suggestions?

Thanks


If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

rhf

#1
Quote from: ollydbg on May 29, 2009, 04:38:18 PM
(I also think this is a quite annoying issue :() can easily be solved like Visual Studio's method. I have tested my patch and it works fine. :D
ollydbg,

This problem really annoys me also, and I hope that your patch gets incorporated!

A possible alternative, which may be difficult to implement, is to use the idea in Bug ID 014686. That is, to always display the Debug tooltip below the cursor and the CC display tooltip above it - or vice versa. This way, you would not have to disable code completion's tooltip during a debugging session; but, to be honest, I'm not sure how important the CC tooltip is while debugging.

ollydbg

To achieve that, we should calculate the "area" of that tooltips.

Currently, it was a rectangle whose top left point was the mouse pointer.

I found another issue, if the calltooltip string is too long, then it can't be wrapped, and will be truncated by screen. :(
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

killerbot

@other devs : what do you think. It would be best both tooltips are visible, but that is going to take some more work at this time.
I prefer during a debugging session that the debug tooltip should win and the code completion one should loose.

Any objections of implementing this change ?

MortenMacFly

Quote from: killerbot on May 30, 2009, 09:22:46 AM
Any objections of implementing this change ?
Not the control key part, but disabling the tooltip. I've already tested it (under Windows) - no objections.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

killerbot


ollydbg

Wonderful, I feel so excited that this patch has been applied. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

killerbot