[stringtemplate-interest] Javadoc generation using ST ?

Terence Parr parrt at cs.usfca.edu
Fri Apr 18 08:51:37 PDT 2008


I always forget this too.  Try toString(width). toString() doesnt wrap.
Ter
On Apr 17, 2008, at 11:19 PM, Zenaan Harkness wrote:

> On Fri, Apr 18, 2008 at 01:49:50PM +1000, Zenaan Harkness wrote:
>> 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!
>
> BTW, my text to be inserted/ wrapped does also contain newlines,
> and the wrap option is not being applied (although this seems to
> be an API issue, I haven't tested it otherwise).
>
> Zen
>
> -- 
> Homepage: www.SoulSound.net -- Free Australia: www.UPMART.org
> Please respect the confidentiality of this email as sensibly  
> warranted.
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest



More information about the stringtemplate-interest mailing list