Print Page | Close Window

Syntax highlight for errors ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=11647
Printed Date: 29 April 2024 at 5:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Syntax highlight for errors ?
Posted By: Alex
Subject: Syntax highlight for errors ?
Date Posted: 29 July 2008 at 4:19pm
Hello,
 
is there a mode to highlight syntax errors in the source text ?
 
A nice to have would be some squiggly lines under the selected text plus
a customizable tooltip when you hover with the mouse over it.
 
Like the 'Indicators' in Scintilla...
 
Regards,
Alex



Replies:
Posted By: peerschindel
Date Posted: 29 July 2008 at 5:01pm
Hi,
 
I'm digging into the functionality of the control since a few weeks
and I can tell you, that there's no such mode.
The whole syntax coloring is static (means: given by the schema
defintion files). There are no dynamic elements which would be
required for e.g. syntax coloring of errors (because you would have
to say programmatically that this line is now an error.)
 
Only if the error detection is totally simple and could be defined
in the schema file, it's possible e.g. make the default color "red",
make all your keywords, strings, variables, operators, etc. "black"
in the schema definition. So everything else is an error and so it's red.
 
But most probably error detection on the scanner level is not sufficiant
and the error detection must be made somehow on the level of
your own parser for your language.
But maybe you can simply set a bookmark on the error line
or simply make a selection on the error line.
(When I'm just writing this... could be a good idea for my own
application to use selection or bookmark for that... ;-)
 
Regards
 
P.S.:
Tooltips are used by the control only for the expanded versions
of a collapsable text and for nothing else. (Can be seen from
the source code)
 
 


Posted By: Alex
Date Posted: 30 July 2008 at 2:07am
Thanks for your reply.
 
The error parsing would be done in our own software stack.
 
It would be nice to extend the SE in a way so that's possible to mark segments of the text and give more freedom when drawing it.
 
This is surely a feature which would raise the value of the SyntaxEdit control.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net