[stringtemplate-interest] Javadoc generation using ST ?

Zenaan Harkness zen at freedbms.net
Thu Apr 17 20:49:50 PDT 2008


On Thu, Apr 17, 2008 at 11:03:28AM -0700, Terence Parr wrote:
>
> On Apr 17, 2008, at 8:59 AM, Zenaan Harkness wrote:
>
>> I have some javadoc comments which span more than one line, in my model.
>> Is it possible to have the proper indentation (with asterisks) be
>> generated using st?
>
> Absolutely!  The wrap=" * " option will do this for you. You can even do 
> Fortran style line continuations with.  Give it a shot. I think you'll 
> enjoy.

I will, when I can make it work.

My ST usage model is:
1) All my templates are in group files (none generated in code).
2) When I generate my output, I use a StringTemplateWriter, to write the
output into a file.

Despite setting stWriter.setLineWidth(16), _and_ adding wrap option to
my templates, I get no wrappin!

STWriter has a write(String str, String wrap) method, but StringTemplate
(which is my top level object for generating my output) only has a
write(StringTemplateWriter) method, with no wrapping/width option.

It's probably easy to add, and I'll look at it in time if no one beats
me to it. Just an overloaded method or two I hope...

Zen

-- 
Homepage: www.SoulSound.net -- Free Australia: www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.


More information about the stringtemplate-interest mailing list