News:

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

Main Menu

show the build error message when mouse hover a marker

Started by ollydbg, April 02, 2011, 05:45:20 AM

Previous topic - Next topic

ollydbg

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.
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.

MortenMacFly

Quote from: 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
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?
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]

ollydbg

look at the image


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?
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.

ollydbg

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
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.

Jenna

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.

ollydbg

Quote from: jens 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.
Nice to here. and thanks for the hint, some one (maybe, Geany developer) suggest:
QuoteWell 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.
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.

ollydbg

also, what about indicators?
QuoteWhy 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)
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.