<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">You could use something similar to javadoc... &nbsp;put your formal arguments inside template comments $! ... !$ at the beginning of each template, then create a separate tool to read those and give you editor hints. &nbsp;<div><br></div><div>I use one-template-per-file like you for web sites, instead of the group syntax, &nbsp;so I would also appreciate something like this. &nbsp;I use Eclipse so an Eclipse plugin would be sweet. &nbsp;&nbsp;</div><div><br></div><div>Does anyone on the list have experience writing these? &nbsp;Such a plugin would need settings to allow the user to specify the location of multiple template folders and template groups, analogous to source folders &amp; jar files on a class path.</div><div><br></div><div>You could also write an interface file (<a href="http://www.antlr.org/wiki/display/ST/ST+condensed+--+File+syntax">http://www.antlr.org/wiki/display/ST/ST+condensed+--+File+syntax</a>) but I think for what you're doing that will be cumbersome to maintain.&nbsp;</div><div><br></div><div><br></div><div><div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>--</div><div>Jonathan Buhacoff</div><div><a href="mailto:jonathan@buhacoff.net">jonathan@buhacoff.net</a></div><div>--</div><div><br></div></div></div></span></div></span><br class="Apple-interchange-newline"> </div><br><div><div>On Oct 27, 2009, at 7:02 AM, Ran Tavory wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Thomas - am I asking for template reflection?&nbsp;<div>Not necessarily. I'd actually prefer if the template could declare its formal parameters at the beginning so that someone reading it would know what it needs without having to dig in.</div> <div><br><div class="gmail_quote">On Tue, Oct 27, 2009 at 3:58 PM, Thomas Jackson <span dir="ltr">&lt;<a href="mailto:thomas.jackson.iii@gmail.com">thomas.jackson.iii@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> Are you asking for Template Reflection to see possible the attributes that need setting for that template?<br> <br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"> A newbe question: Is it possible to define the list of formal parameters in a template where my use case would be for a web page?<br> <br> For example, in this template:<br> <br> </div><a href="http://layout.st" target="_blank">layout.st</a> &lt;<a href="http://layout.st" target="_blank">http://layout.st</a>&gt;<div class="im"><br> &lt;html&gt;<br> &lt;head&gt;<br> &lt;title&gt;$title$&lt;/title&gt;<br> &lt;body&gt;<br> $banner()$<br> &lt;hr&gt;<br> $body()$<br> &lt;/body&gt;<br> &lt;/html&gt;<br> <br> I'd like to say that *$title$* is a required parameter. Would even be better if types can be enforced, such as String, Number, Date, List of x etc, but even without static typing, simply listing the formal arguments the template expects would be great.<br> Thanks!<br></div> ------------------------------------------------------------------------<div class="im"><br> <br> _______________________________________________<br> stringtemplate-interest mailing list<br> <a href="mailto:stringtemplate-interest@antlr.org" target="_blank">stringtemplate-interest@antlr.org</a><br> <a href="http://www.antlr.org/mailman/listinfo/stringtemplate-interest" target="_blank">http://www.antlr.org/mailman/listinfo/stringtemplate-interest</a><br> &nbsp;<br> </div></blockquote> </blockquote></div><br></div></div> _______________________________________________<br>stringtemplate-interest mailing list<br><a href="mailto:stringtemplate-interest@antlr.org">stringtemplate-interest@antlr.org</a><br>http://www.antlr.org/mailman/listinfo/stringtemplate-interest<br></blockquote></div><br></div></div></body></html>