Re: [SrcML] [ srcml-Bugs-1372850 ] line numbers wrong for javadoc
Status: Beta
Brought to you by:
crashchaos
|
From: Leif B. <lei...@un...> - 2005-12-05 23:22:26
|
> ..
> 10: something();
> 11: /**
> * this is a javadoc
> * comment spanning
> * multiple lines
> */
> 12: something_else();
>
> Possible solution: don't output the multiline comments
> as one string, but split them at newlines and force
> output of the corresponding newlines.
I tried a quick'n'dirty solution. Instead of
> outputIndent(f_javadoc);
> outputString(f_javadoc, sb.toString());
> newline(f_javadoc);
I tried to replace it with this:
> for (String line : sb.toString().split("\n")) {
> outputIndent(f_javadoc);
> outputString(f_javadoc, line);
> newline(f_javadoc);
> }
Works nice, but the outputString() method trims the String before
printing it, so instead of " *" in each line, the whitespace is
trimmed and only the star is printed.
So, i little frustrated i will go to bed now. Perhaps I will find an
answer in my dreams :)
> Leif
|