Thread: [SrcML] [ srcml-Bugs-1372850 ] line numbers wrong for javadoc
Status: Beta
Brought to you by:
crashchaos
From: SourceForge.net <no...@so...> - 2005-12-04 14:15:47
|
Bugs item #1372850, was opened at 2005-12-04 15:15 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=641278&aid=1372850&group_id=105448 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: View Group: None Status: Open Resolution: None Priority: 6 Submitted By: Raiser Frank (crashchaos) Assigned to: Leif Bladt (iknowjack) Summary: line numbers wrong for javadoc Initial Comment: When linenumbers:true is set for the ViewJava plugin there is an error in the numbering of lines for multi-line comments looking like this: .. 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=641278&aid=1372850&group_id=105448 |
From: SourceForge.net <no...@so...> - 2005-12-07 14:50:28
|
Bugs item #1372850, was opened at 2005-12-04 15:15 Message generated for change (Comment added) made by crashchaos You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=641278&aid=1372850&group_id=105448 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: View Group: None Status: Open Resolution: None Priority: 6 Submitted By: Raiser Frank (crashchaos) Assigned to: Leif Bladt (iknowjack) Summary: line numbers wrong for javadoc Initial Comment: When linenumbers:true is set for the ViewJava plugin there is an error in the numbering of lines for multi-line comments looking like this: .. 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. ---------------------------------------------------------------------- >Comment By: Raiser Frank (crashchaos) Date: 2005-12-07 15:50 Message: Logged In: YES user_id=298908 Another related problem is the displaying of the line numbers themselves. Whenever a new digit is needed to display a larger line number this leads to new lines being indented differently: 9: something(); 10: something(); instead of 9: something(); 10: something(); As we don't have a means of finding out the number of lines the view will create we'll have to either stick with right-aligning the numbers at a fixed size, or for a more correct result do the line numbering in a second pass, once we know how long the resulting document is. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=641278&aid=1372850&group_id=105448 |
From: SourceForge.net <no...@so...> - 2006-02-02 21:05:17
|
Bugs item #1372850, was opened at 2005-12-04 15:15 Message generated for change (Comment added) made by crashchaos You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=641278&aid=1372850&group_id=105448 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: View Group: None >Status: Closed >Resolution: Wont Fix Priority: 6 Submitted By: Raiser Frank (crashchaos) Assigned to: Leif Bladt (iknowjack) Summary: line numbers wrong for javadoc Initial Comment: When linenumbers:true is set for the ViewJava plugin there is an error in the numbering of lines for multi-line comments looking like this: .. 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. ---------------------------------------------------------------------- >Comment By: Raiser Frank (crashchaos) Date: 2006-02-02 22:05 Message: Logged In: YES user_id=298908 0.2 branch no longer supported. closing this bug. ---------------------------------------------------------------------- Comment By: Raiser Frank (crashchaos) Date: 2005-12-07 15:50 Message: Logged In: YES user_id=298908 Another related problem is the displaying of the line numbers themselves. Whenever a new digit is needed to display a larger line number this leads to new lines being indented differently: 9: something(); 10: something(); instead of 9: something(); 10: something(); As we don't have a means of finding out the number of lines the view will create we'll have to either stick with right-aligning the numbers at a fixed size, or for a more correct result do the line numbering in a second pass, once we know how long the resulting document is. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=641278&aid=1372850&group_id=105448 |
From: Leif B. <lei...@un...> - 2005-12-05 23:22:26
Attachments:
smime.p7s
|
> .. > 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 |
From: Frank R. <rai...@go...> - 2005-12-07 09:33:12
|
PiBJIHRyaWVkIGEgcXVpY2snbidkaXJ0eSBzb2x1dGlvbi4gSW5zdGVhZCBvZgo+ID4gb3V0cHV0 SW5kZW50KGZfamF2YWRvYyk7Cj4gPiBvdXRwdXRTdHJpbmcoZl9qYXZhZG9jLCBzYi50b1N0cmlu ZygpKTsKPiA+IG5ld2xpbmUoZl9qYXZhZG9jKTsKPgo+IEkgdHJpZWQgdG8gcmVwbGFjZSBpdCB3 aXRoIHRoaXM6Cj4KPiA+IGZvciAoU3RyaW5nIGxpbmUgOiBzYi50b1N0cmluZygpLnNwbGl0KCJc biIpKSB7Cj4gPiAgICAgb3V0cHV0SW5kZW50KGZfamF2YWRvYyk7Cj4gPiAgICAgb3V0cHV0U3Ry aW5nKGZfamF2YWRvYywgbGluZSk7Cj4gPiAgICAgbmV3bGluZShmX2phdmFkb2MpOwo+ID4gfQo+ Cj4gV29ya3MgbmljZSwgYnV0IHRoZSBvdXRwdXRTdHJpbmcoKSBtZXRob2QgdHJpbXMgdGhlIFN0 cmluZyBiZWZvcmUKPiBwcmludGluZyBpdCwgc28gaW5zdGVhZCBvZiAiICoiIGluIGVhY2ggbGlu ZSwgdGhlIHdoaXRlc3BhY2UgaXMKPiB0cmltbWVkIGFuZCBvbmx5IHRoZSBzdGFyIGlzIHByaW50 ZWQuCj4KPiBTbywgaSBsaXR0bGUgZnJ1c3RyYXRlZCBpIHdpbGwgZ28gdG8gYmVkIG5vdy4gUGVy aGFwcyBJIHdpbGwgZmluZCBhbgo+IGFuc3dlciBpbiBteSBkcmVhbXMgOikKCldlbGwgSSBob3Bl IHlvdSBmb3VuZCBhIHNvbHV0aW9uIGJ5IG5vdywgYnV0IHlvdXIgcXVpY2sgYW5kIGRpcnR5CnNv bHV0aW9uIHdvbid0IGRvIGl0LiBUaGUgY29tbWVudHMgYXJlIGRpc3NlY3RlZCBhbHJlYWR5IGFu ZCBuZWVkIHRvCmJlIHJlY3JlYXRlZCBmb3IgdGhlIHZpZXcgYW5kIHdlIGNhbid0IGp1c3QgY3Jl YXRlIHRoYXQgd2hvbGUgc3RyaW5nCmxpbmUgYnkgbGluZSBqdXN0IHRvIHNwbGl0IGl0IGFnYWlu IHJpZ2h0IGFmdGVyd2FyZHMuIFNvIHlvdSBiZXN0CmNoZWNrIG91dCB0aGUgY3JlYXRpb24gcHJv Y2VzcyBhIGJpdCBtb3JlIGNsb3NlbHkgYW5kIG1vZGlmeSB0aGF0LgoKLS0KUmFpc2VyLCBGcmFu ayAtIENvbXBTY2kgU3R1ZGVudCBAIFVuaXZlcnNpdHkgb2YgVWxtCkdyZWF0IG1pbmRzIGRpc2N1 c3MgaWRlYXM7CkF2ZXJhZ2UgbWluZHMgZGlzY3VzcyBldmVudHM7ClNtYWxsIG1pbmRzIGRpc2N1 c3MgcGVvcGxlLgo= |
From: Leif B. <lei...@un...> - 2005-12-07 23:11:58
|
After being very confused yesterday, it's somehow better now :) A will put a new version of the ViewJava plugin in the cvs (carefully tested of course). I changed the handleEvent(javadoc) to output javadoc comments correctly. Please criticise me, if the code is weird or wrong :) So that I can change the method for nomal comments too. Leif |
From: Frank R. <rai...@go...> - 2005-12-08 09:26:06
|
T24gMTIvOC8wNSwgTGVpZiBCbGFkdCA8bGVpZi5ibGFkdEB1bmktdWxtLmRlPiB3cm90ZToKPiBB IHdpbGwgcHV0IGEgbmV3IHZlcnNpb24gb2YgdGhlIFZpZXdKYXZhIHBsdWdpbiBpbiB0aGUgY3Z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