[stringtemplate-interest] Javadoc generation using ST ?
Terence Parr
parrt at cs.usfca.edu
Fri Apr 18 11:26:53 PDT 2008
On Apr 18, 2008, at 10:06 AM, 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!
>
> On Fri, Apr 18, 2008 at 08:51:37AM -0700, Terence Parr wrote:
>> I always forget this too. Try toString(width). toString() doesnt
>> wrap.
>
> Am I missing something here?
>
> I can't call toString, since I'm doing the writer thing - writing
> directly out to a file using StringTemplateWriter (as mentioned at
> point
> 2) above), so I'm limited to using st.write, no toString for me,
> unless
> I'm missing something?
ah. I'm not at office at moment. can you look to see what tostring
(int) invokes with write? Perhaps I made a special writer that wraps.
Ter
More information about the stringtemplate-interest
mailing list