Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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? If so, what steps are necessary to accomplish this?

In BlueJ there is an option to translate Javadoc-style comments into an html file.

Like the following picture shows for Java using BlueJ I want to do the same with Visual Studio : http://www.time-tripper.com/uipatterns/Patterns/Titled_Sections/javadoc.gif
(source: time-tripper.com)

like image 852
Brandon Tiqui Avatar asked Dec 20 '09 09:12

Brandon Tiqui


People also ask

How do I get javadoc in HTML?

From the main menu, select Tools | Generate JavaDoc. In the dialog that opens, select a scope — a set of files or directories for which you want to generate the reference, and set the output directory where the generated documentation will be placed.

How do you code javadoc in Visual Studio?

The main command for this extension is accessed using CTRL+Shift+P and then selecting "Javadoc Generator: Generate Javadoc". This generator will first attempt to use the Javadoc located in the JDK referenced in your JAVA_HOME.

How do I create a javadoc comment?

Writing Javadoc Comments In general, Javadoc comments are any multi-line comments (" /** ... */ ") that are placed before class, field, or method declarations. They must begin with a slash and two stars, and they can include special tags to describe characteristics like method parameters or return values.

What is javadoc documentation?

Javadoc (originally cased JavaDoc) is a documentation generator created by Sun Microsystems for the Java language (now owned by Oracle Corporation) for generating API documentation in HTML format from Java source code.


2 Answers

Do you actually mean JavaDoc, in Java? If so, I don't believe so - just use javadoc itself. Visual Studio doesn't really support 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). It's not as easy as it might be, admittedly.

EDIT: If you're using C++, you should probably look at Doxygen. There may be Visual Studio plugins, but you may be best off just running Doxygen as part of your build process. If you're using C++/CLI there may be some equivalent of C# XML comments, but I don't know of it.

like image 82
Jon Skeet Avatar answered Nov 13 '22 05:11

Jon Skeet


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. Then to generate external documentation, use doxygen, which reads javadoc happily.

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. It's a less human-readable format, but gives you significant advantages within the Visual Studio environment, so it's a bit more flexible.

Both approaches will work for C#, C++, C (although C# works better on the intellisense side of things)

like image 39
Jason Williams Avatar answered Nov 13 '22 03:11

Jason Williams