Author Topic: show the build error message when mouse hover a marker  (Read 11044 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
show the build error message when mouse hover a marker
« 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.
« Last Edit: April 02, 2011, 06:05:05 am by ollydbg »
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: show the build error message when mouse hover a marker
« Reply #1 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?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: show the build error message when mouse hover a marker
« Reply #2 on: April 02, 2011, 09:50:39 am »
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: show the build error message when mouse hover a marker
« Reply #3 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
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: show the build error message when mouse hover a marker
« Reply #4 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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: show the build error message when mouse hover a marker
« Reply #5 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.
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: show the build error message when mouse hover a marker
« Reply #6 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)
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.