StringTemplate 4 Language Support

Free

Basic support for the StringTemplate 4 template language.

(3) Review
Visual Studio
2013, 2012, 2010
Download (6,137)
3/17/2014
1.1.0
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (3)
Q and A (5)
Sign in to write a review
Sort by:

by imode | November 09 2013

Please add support for VS2013.

[Edit]

.vsix files are ZIP archives. I was able to edit extension.vsixmanifest and add the following under <SupportedProducts>:

<SupportedProducts>
<VisualStudio Version="12.0">
<Edition>Ultimate</Edition>
<Edition>Premium</Edition>
<Edition>Pro</Edition>
<Edition>IntegratedShell</Edition>
</VisualStudio>
</SupportedProducts>

by Henrik Nordhaus | April 05 2013

The problem with version 1.0.11.0 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.

Thanks,
Henrik

Sam Harwell April 17 2013
| Edit |
Delete

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

by 0xFDED | December 18 2011

Very useful. I have a few large StringTemplate files (250+ lines, 8+ templates) and finding my way around them is MUCH easier with this tool.

Thanks for making this available.

Sign in to start a discussion


  • Visual Studio Error with .stg files
    1 Posts | Last post June 11, 2013
    • 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.
  • No project template installed
    2 Posts | Last post March 04, 2012
    • Greetings,
      
      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.
      
      Any suggestions?
      Thanks!
    • Hi Scionwest,
      
      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#.
  • $ build
    2 Posts | Last post March 04, 2012
    • Hiya :-)
      
      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 :-)
      
      Ste
    • 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 "$", "$"
  • Great Tool
    2 Posts | Last post July 19, 2011
    • 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?
    • Hi Francis, I updated my profile here (biography section) to include a feedback email address. :) I'm glad to hear the tools are helping you out, and I hope we can resolve this quickly.
  • $ support
    2 Posts | Last post July 13, 2011
    • I love using StringTemplate as a templating environment, but I use the $ delimiters extensively, when do you think that this will be supported?
    • 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.