开发者

How to auto linewrap comments in .NET?

I'd like to have a single command to auto-linewrap the XML-style comments in .NET.

Example:

/// <summary>
/// This comment line should be
/// on one line, and other lines in this <summary> block should be wordwrapped.
/// </summary>

I wouldn't mind buying some of the commercial Visual Studi开发者_如何学Goo plugins, if they are capable of doing this.


Try the trial of ReSharper, it states it formats XML Doc Comments (Go Here and search for XML doc comments for more information) and tends to be very customisable.

If that doesn't work, the closest thing I could find was on CodeProject , it's intended for Visual Studio 2003; however is open source so you may be able to get it working without the expensive of a third party plugin.


I've written an addin for Visual Studio, AtomineerUtils Pro Documentation which will update and word-wrap both normal comments and documentation comments (in XML, Doxygen, Qt and JavaDoc formats). (It's not free, but it's very inexpensive and there's a 30 day free trial)

It tries to intelligently preserve important newlines - text such as indentation, bullet lists, blank lines or a double space at the end of a line (among other things) will all be used as hints to the wrapping engine to ensure that your formatting is not lost.


Add a <para /> in your comments

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜