Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VAX 1440: syntax coloring in autotext editor
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Feb 23 2006 :  4:52:31 PM  Show Profile  Reply with Quote
Using the VSS keywords confuses the syntax coloring of the autotext editor.

I am using as file header the following autotext snippet:
/*$off*/
///////////////////////////////////////////////////////////////////////////////
// $
Workfile: $
// $
Revision: $
// $
Author: $
// $
Date: $
//
// (C) $
YEAR$ Andreas Saurwein, [email protected]
///////////////////////////////////////////////////////////////////////////////
/*$
on*/


As you can see, the syntax coloring is somehow "off".

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Feb 25 2006 :  11:20:35 AM  Show Profile  Reply with Quote
confirmed. thank you for the interesting example

case=748

i have found this page:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guides/html/vstskexpand_keywords.asp

which lists keywords, all of which contain spaces. this is useful, since it makes them easy to distinguish. however there is no mention of $on or $off

never having used VSS (i use wincvs instead) are there any other such codes that you use? these may need more careful handling.

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Feb 25 2006 :  12:34:27 PM  Show Profile  Reply with Quote
$on/$off is not related to VSS. Its a macro for GC, a code formatter. Anyway, since its a command unknown to VA it should just ignore it.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Feb 25 2006 :  3:33:00 PM  Show Profile  Reply with Quote
that makes sense, i remember GC. i was thinking about how to define an autotext token. if i insert $feline$ into the middle of an autotext rule VA will prompt me to fill in this value, so we cannot use the simple concept of a fixed list of known keywords.

this could get slightly messy.

zen is the art of being at one with the two'ness
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Feb 26 2006 :  1:54:44 PM  Show Profile  Reply with Quote
$foo$ is known to the Autotext editor in some respect despite foo not being one of its keywords. The editor assumes you want a prompt for $foo$ when the autotext is expanded.

In this case, $off confuses the editor since it doesn't see the trailing dollar until it gets to the next lines. Obviously, the Autotext editor should be smarter and stop at an EOL or thereabout.

We integrated the scintilla editor into VA X for editing of autotext. (See our credits.) We configured scintiall the best we could for our purposes. We'll see if we can make it smarter in this situation, e.g. adding of special characters to the Right Click menu. If not, we are likely to leave the code for scintilla alone. The ability to integrate new versions of scintilla easily is probably more important that tweaking one code base, then having to merge a bunch of our changes into every rev of scintilla produced.

All said, we appreciate the bug report.
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Feb 26 2006 :  7:41:15 PM  Show Profile  Reply with Quote
quote:
Originally posted by support

... The ability to integrate new versions of scintilla easily is probably more important that tweaking one code base, then having to merge a bunch of our changes into every rev of scintilla produced.



Fully agree. Anyway I think that scintilla is able to do that parsing a bit better, after all it can do it for quite a lot of complex languages. Hopefully its just a simple tweak
Go to Top of Page

Darren
Tomato Guru

USA
105 Posts

Posted - Feb 26 2006 :  8:18:45 PM  Show Profile  Reply with Quote
Uniwares,
The problem is that the syntax highlighter looks for a beginning $ and ending $ to signify it's a $VAX$ template keyword and highlight it in red. When there is no ending $ it kind of confuses it. That's why your $on or $off doesn't get highlighted properly. VAX should handle everything just fine but the template editor just won't highlight the syntax correctly.

You are correct that Scintilla is a very powerful syntax highlighting engine however it's downfall is everything is hardcoded into a quite convoluted state engine. I'd like to be able to have a powerful regex engine built into scintilla but Neil Hodgson, the author of scintilla, has rejected some suggested implementations.

Darren
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Feb 26 2006 :  10:16:02 PM  Show Profile  Reply with Quote
quote:
Originally posted by Darren

... VAX should handle everything just fine but the template editor just won't highlight the syntax correctly.



You are right, VAX does it correctly in that case, the editor does not. Not a big deal. Keep that one for a rainy day to fix.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jun 19 2006 :  5:49:37 PM  Show Profile  Reply with Quote
Fixed in build 1524:

Improved coloring of Autotext when lines contain multiple dollar signs. (case=748)
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Jun 19 2006 :  8:07:21 PM  Show Profile  Reply with Quote
Must have been pretty rainy last time over there are the WT offices
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000