简体   繁体   English

Visual Studio是否可以选择为Javadoc样式的注释生成html文档?

[英]Does Visual Studio have an option to generate html documentation for Javadoc-style comments?

Does Visual Studio have an option to generate html documentation for Javadoc-style comments? Visual Studio是否可以选择为Javadoc样式的注释生成html文档? If so, what steps are necessary to accomplish this? 如果是这样,完成此任务需要哪些步骤?

In BlueJ there is an option to translate Javadoc-style comments into an html file. 在BlueJ中,有一个选项可以将Javadoc样式的注释转换为html文件。

Like the following picture shows for Java using BlueJ I want to do the same with Visual Studio : 如下图所示,使用BlueJ的Java我想用Visual Studio做同样的事情: http://www.time-tripper.com/uipatterns/Patterns/Titled_Sections/javadoc.gif
(source: time-tripper.com ) (来源: time-tripper.com

Do you actually mean JavaDoc, in Java? 你真的是指Java中的JavaDoc吗? If so, I don't believe so - just use javadoc itself. 如果是这样,我不相信 - 只需使用javadoc本身。 Visual Studio doesn't really support Java. Visual Studio并不真正支持Java。

If you mean C# XML documentation comments, then you can change the project properties to build the XML file, and then use NDoc (discontinued) or Sandcastle to build HTML (or chm etc). 如果您指的是C#XML文档注释,那么您可以更改项目属性以构建XML文件,然后使用NDoc (已停止)或Sandcastle来构建HTML(或chm等)。 It's not as easy as it might be, admittedly. 诚然,它并不像它可能那么容易。

EDIT: If you're using C++, you should probably look at Doxygen . 编辑:如果你正在使用C ++,你应该看看Doxygen There may be Visual Studio plugins, but you may be best off just running Doxygen as part of your build process. 可能有Visual Studio插件,但您可能最好只运行Doxygen作为构建过程的一部分。 If you're using C++/CLI there may be some equivalent of C# XML comments, but I don't know of it. 如果您使用的是C ++ / CLI,可能会有一些相当于C#XML的注释,但我不知道。

You can use a Javadoc-compatible commenting style, either entering the comments by hand, or use my addin, Atomineer Pro Documentation to take most of the work out of it. 您可以使用兼容Javadoc的注释样式,手动输入注释,或使用我的addin, Atomineer Pro文档来完成大部分工作。 Then to generate external documentation, use doxygen , which reads javadoc happily. 然后要生成外部文档,请使用doxygen ,它会愉快地读取javadoc。

The alternative is (as Jon has said) to use XmlDoc format comments, which can be used by Visual Studio (for intellisense tooltips), Atomineer, Sandcastle and Doxygen. 另一种方法是(如Jon所说)使用XmlDoc格式注释,可以由Visual Studio(用于智能感知工具提示),Atomineer,Sandcastle和Doxygen使用。 It's a less human-readable format, but gives you significant advantages within the Visual Studio environment, so it's a bit more flexible. 它是一种人性化程度较低的格式,但在Visual Studio环境中为您提供了显着的优势,因此它更灵活一些。

Both approaches will work for C#, C++, C (although C# works better on the intellisense side of things) 这两种方法都适用于C#,C ++,C(尽管C#在智能感知方面效果更好)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Visual Studio中为typescript生成文档注释 - Generate documentation comments for typescript in Visual Studio Visual Studio 2013文档评论 - Visual studio 2013 documentation comments 在Visual Studio中为JavaScript生成Javadoc - Generate javadoc for JavaScript in Visual Studio 是否可以在没有“生成XML文档文件”的情况下自动创建XML注释标记(仅限VB.NET)? - Is it possible for Visual Studio 2008 Automatically create XML Comments tags without “Generate XML documentation file” checked (VB.NET only)? Visual Studio中的JavaScript-闭合样式注释 - JavaScript in Visual Studio - Closure style comments Visual Studio使用XSLT自动生成XML文档 - Visual Studio Automatically generate XML Documentation with XSLT 折叠Visual Studio中所有文档标题/注释的快捷方式 - Shortcut to collapse all documentation headers/comments in Visual Studio 如何在IntelliSense中为Visual Studio中的函数添加注释? - How to have comments in IntelliSense for function in Visual Studio? Intellisense中的HTML / Web文档和Visual Studio中的工具提示? - HTML/Web Documentation in Intellisense & Tooltips in Visual Studio? 在Visual Studio 2005中强制执行C样式的注释 - Enforce C-style comments in visual studio 2005
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM