我需要为 JavaScript 项目生成文档,并且我想使用 Javadoc 来完成。
不幸的是,我必须在 Visual Studio 2013 上执行此操作,而且看起来没有任何东西可以帮助 Javadoc 注释 block 。我至少希望当我这样做时:
/**
+ enter
生成:
/**
*
*/
我在 Stackoverflow 和 Microsoft 网站上寻找过插件或类似问题,但我只找到了 Doxygen 的插件或解决方案。
我真的在寻找不存在的东西吗,还是我错过了一些东西? (希望如此)
最佳答案
对于 Visual Studio,您可以使用 DocStubsJs , Visual Studio 2012+ 的扩展,用于在 JavaScript 和 TypeScript 编辑器中自动生成 JSDoc 和 VSDoc 的文档注释 stub 。
源代码位于 GitHub
引自 GitHub 自述文件:
DocStubsJs is a fairly straight-forward plugin that uses events and string parsing to determine when and how to insert a document stub. It essentially just watches key-strokes for the identifying documentation comment bock initializers. ("///" for VSDoc, and "/**" for JSDoc) Once it has determined that these have been entered on an empty line, then it parses the lines surrounding it to determine whether to add a new comment line, create a documentation comment stub, or do nothing.
注意:
对于JSDoc在函数头上方的行中键入“/**”后,将添加注释、参数标签以及返回标签。 (Web Essentials 用户请注意:您可能必须在 Web Essentials 的 JavaScript 选项中禁用自动完成多行注释才能使其正常工作。)
关于javascript - 在 Visual Studio 中为 JavaScript 生成 javadoc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29675002/