Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on April 02, 2011, 05:45:20 am

Title: show the build error message when mouse hover a marker
Post by: ollydbg on April 02, 2011, 05:45:20 am
I found a feature request here:
https://developer.berlios.de/feature/?func=detailfeature&feature_id=5236&group_id=5358

So, I just want to know any possibility to implement this

step is:

1, receive a Dwell event in the compiler
2, get the current line info (I'm not sure if my mouse is hover on the margin line, I can receive this message?)
3, look up the marker datebase to see if the current line has a build error/warning marker
4, show the build error/warning info on a calltip tooltip window
5, when mouse moved, cancel the calltip tooltip window

Is that possible?
Any ideas?

thanks.
Title: Re: show the build error message when mouse hover a marker
Post by: MortenMacFly on April 02, 2011, 09:12:12 am
I found a feature request here:
https://developer.berlios.de/feature/?func=detailfeature&feature_id=5236&group_id=5358
I'm afraid I still don't exactly understand how this should look like... can you provide a screenshot?

Does SciTE (or other scintilla clients) do such things?
Title: Re: show the build error message when mouse hover a marker
Post by: ollydbg on April 02, 2011, 09:50:39 am
look at the image
(http://i683.photobucket.com/albums/vv194/ollydbg_cb/2011-04-02153720.png)

When mouse hover on the marker, it will show the error message on the value tip.

I asked on the scintilla forum, but currently does not get a full answer.
see:

Can I receive a hover kind message if the mouse hover a marker? (https://groups.google.com/forum/?fromgroups#!topic/scintilla-interest/ljGTsyW-4vE)
Title: Re: show the build error message when mouse hover a marker
Post by: ollydbg on April 03, 2011, 08:34:34 am
In the scintilla forum, they give many ways to show the build error message by using annocator, indicator or other things. And Neil also give a method to locate which margin the mouse is hovered on. :D
Title: Re: show the build error message when mouse hover a marker
Post by: Jenna on April 03, 2011, 09:26:59 am
If the mouse is over a margin, a DwellStart-event is generated, so it's easy to find which margin we are on.
Annotations do not enhance the readability of  the source-code in my opinion. A call-tip would be the best solution.

I think this is a useful feature, so I have put it on my todo-list.
Title: Re: show the build error message when mouse hover a marker
Post by: ollydbg on April 03, 2011, 09:32:26 am
If the mouse is over a margin, a DwellStart-event is generated, so it's easy to find which margin we are on.
Annotations do not enhance the readability of  the source-code in my opinion. A call-tip would be the best solution.

I think this is a useful feature, so I have put it on my todo-list.
Nice to here. and thanks for the hint, some one (maybe, Geany developer) suggest:
Quote
Well its likely to hide the code you are trying to fix for starters :-(

In Geany we do it the other way, always show errors in the build
output and clicking a message there goes to the line in the file,
rather than coming from the file to the message.

Cheers
Lex
So, the only issue/concern is: if the error message is quite big. e.g. gcc will plot a long message on c++ template error, then the tip window is quite big, it may cover the whole code we need to fix.
Title: Re: show the build error message when mouse hover a marker
Post by: ollydbg on April 03, 2011, 09:35:13 am
also, what about indicators?
Quote
Why not show an Annotation[1] when the marker icon is clicked instead of
hovered?  Seems simpler to implement anyway.  Or, find the part with the
error and set an Indicator[2] on it (maybe a red squiggly line), and
show an annotation when that part with the indicator is hovered or clicked.

Just some ideas.

[1] http://www.scintilla.org/ScintillaDoc.html#Annotations
[2] http://www.scintilla.org/ScintillaDoc.html#Indicators

Cheers,
Matthew Brush
it sounds like that: indicators can have both line and column information. currently, our build error marker only indicates line information (column info is not included)