Inline error messages

75 views
Skip to first unread message

Neil Hodgson

unread,
Oct 10, 2011, 2:50:31 AM10/10/11
to scite-interest
Annotations were added to Scintilla a couple of years ago to
display diagnostics and other notes interspersed with the editable
text. There was a small demonstration of this in SciTE but there were
various problems with it so the feature was not committed.

The more important problems have now been fixed, so it is going
into SciTE as part of the handling of error messages when running
tools like compilers. It looks like this:
http://scintilla.org/diagnostics.png

Inline errors are off by default and are turned on with
error.inline=1. The messages appear in the edit pane when a message in
the output pane is double clicked or the "Next Message" command is
performed. There are 4 styles defined for increasing levels of
severity, style.error.0 .. style.error.3 which are used for
severities: default, warning, error, fatal.

The severity is detected from the presence of the texts "warning",
"error", or "fatal". Inline errors are hidden with "Clear All
Bookmarks".

An example set of properties for this:

error.inline=1
style.error.0=back:#F0F0F0,fore:#000000,xfont:Consolas,size:8.7
style.error.1=$(style.error.0),back:#FFFFF0,fore:#808000
style.error.2=$(style.error.0),back:#FFF0F0,fore:#800000
style.error.3=$(style.error.0),back:#FFF0FF,fore:#800080

Available from the Mercurial repository
(https://sourceforge.net/scm/?type=hg&group_id=2439) and from
http://www.scintilla.org/scite.zip Source
http://www.scintilla.org/wscite.zip Windows executable

Neil

Philippe Lhoste

unread,
Oct 10, 2011, 7:20:33 AM10/10/11
to scite-i...@googlegroups.com
On 10/10/2011 08:50, Neil Hodgson wrote:
> The more important problems have now been fixed, so it is going
> into SciTE as part of the handling of error messages when running
> tools like compilers. It looks like this:
> http://scintilla.org/diagnostics.png

Looks good!

> style.error.0=back:#F0F0F0,fore:#000000,xfont:Consolas,size:8.7

Is xfont a typo or a feature I missed? (not found in SciTE doc...)

--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --

Neil Hodgson

unread,
Oct 10, 2011, 8:36:33 AM10/10/11
to scite-i...@googlegroups.com
Philippe Lhoste:

>> style.error.0=back:#F0F0F0,fore:#000000,xfont:Consolas,size:8.7
>
> Is xfont a typo or a feature I missed? (not found in SciTE doc...)

I had been using Consolas and wanted to switch back to default
temporarily. So, a sort of typo.

Neil

Philippe Lhoste

unread,
Oct 10, 2011, 9:31:32 AM10/10/11
to scite-i...@googlegroups.com
On 10/10/2011 14:36, Neil Hodgson wrote:
> I had been using Consolas and wanted to switch back to default
> temporarily. So, a sort of typo.

OK!
Personally, I use a lot Ctrl+D & Ctrl+Q for this kind of experiments...

Stephen Gilbert

unread,
Nov 22, 2011, 8:22:57 PM11/22/11
to scite-interest
Hi,
I like the inline errors, but they don't seem to go away when I edit
and recompile the code without closing the file and reopening. Is
there another setting that I should set to clear them out afterwards?

--Steve

Neil Hodgson

unread,
Nov 23, 2011, 4:39:43 AM11/23/11
to scite-i...@googlegroups.com
Stephen Gilbert:

> I like the inline errors, but they don't seem to go away when I edit
> and recompile the code without closing the file and reopening. Is
> there another setting that I should set to clear them out afterwards?

Search | Clear All Bookmarks has the secondary effect of cleaning
other things up including inline errors. You could write a macro in
Lua to just remove the message annotations.

It wouldn't be great to remove the annotations the next time a
command is run as you may be running the command to help understand
why the diagnostic occurred.

Neil

Reply all
Reply to author
Forward
0 new messages