The problem with version 188.8.131.52 is that after a comment like the one shown here <div class="clearFloat"> <!-- clear float for old IE --> </div> the rest of the .st file is colored as if the comment was not closed. This seems to be a bug in your parser - please fix this, and the tool is very helpful.
Hi Hendrik. If you are not using < and > as your template delimiters, then you will need to include a delimiters clause at the top of your file. Please see the following page for syntax details: http://www.antlr.org/wiki/display/ST4/Group+file+syntax
Hi Sam, I recently ran Windows update and now visual studio 2012 gives this exception when attempting to open a .stg file (from the visual studio log file).
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: lineNumber at Microsoft.VisualStudio.Text.Implementation.SimpleStringRebuilder.GetLineFromLineNumber(Int32 lineNumber) at Microsoft.VisualStudio.Text.Implementation.TextSnapshot.GetLineFromLineNumber(Int32 lineNumber) at Tvl.VisualStudio.Language.Parsing.AntlrClassifierBase`1.AdjustParseSpan(SnapshotSpan& span) at Tvl.VisualStudio.Language.Parsing.AntlrClassifierBase`1.GetClassificationSpans(SnapshotSpan span) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.<GetTags>d__0.MoveNext() at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__16.MoveNext()
.st4 files continue to work fine.
After installing the StringTemplate 4 Language Support, I restarted my VS Pro only to not find the installed template anywhere. I have restarted the IDE and tried to reinstall the template (which fails due to already being installed) and have not been able to locate them in my project templates. A search for ANTLR or StringTemplate returns nothing within VS New Project dialog.
The StringTemplate integration currently adds editor support for when you open a template file, but does not include any project or file templates.
I may be able to include a few templates in a future version which will probably be available a few months after ANTLR 4 stabilizes enough for me to port it to C#.
I'm just getting to grips with using StringTemplate for html and plaintext email templates. I'm using $ delimiters rather than the default, so I was wondering if any progress had been made with being able to set a delimiter? If not, is the source available anywhere so I could possibly build my own version that uses $'s?
Thanks for all the hard work :-)
Hi Steven, You should be able to use the following syntax at the top of a group file for setting delimiters:
delimiters "$", "$"
I believe the following works in the editor if you're using a .st file (which doesn't support the special delimiters syntax):
//delimiters "$", "$"
I've used and appreciated your port for the last two years (both StringTemplate and Antlr), and even this work is greatly appreciated. I look forward to future development.
On another note, where can I ask questions and report bugs about this tool specifically, I'm having issues with the folding that I remember from the 2008 integration, that seems to be a parsing problem and mucks up the list of templates in an STG file?
Right now I don't have a good way to configure template delimiters for a particular file. However, I do maintain the C# port of StringTemplate and I'm in talks with the original author about adding a syntax for explicitly specifying the template delimiters within the group and/or template files.