在Visual Studio中评论javascript方法 [英] Comment javascript methods in Visual Studio

查看:158
本文介绍了在Visual Studio中评论javascript方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一种方法可以在Visual Studio 2010中的JavaScript中使用自动生成的参数插入XML注释的代码段。

Is there a way to insert a snippet for XML comments in javascript in Visual Studio 2010 with automatically generated parameters?

如果输入 // here ...

If I type /// here...

function foo(a, b){

...应根据参数更改为:

...it should change to this (depending on the parameters):

function foo(a, b){
    /// <summary>$cursorhere</summary>
    /// <param name="a" type="string">Param a</param>
    /// <param name="b" type="string">Param b</param>
    /// <returns type="function">Return function</returns>

因此,如果我在C#代码中,它将类似于代码片段。

So it would be similar to the snippet generation if I'm in C# code.

编辑

EDIT

有一个快捷方式或现有的插件来实现上述功能

To clarify, I just want to know if there is a shortcut or existing plugin to achieve the functionality mentioned above approximately.

推荐答案

一个代码片段,但这似乎太麻烦了我。我使用 JScript vsdoc存根生成器,它会生成XML注释这些:

You can make a code snippet, but that seems too much trouble to me. I use JScript vsdoc Stub Generator, it generates XML comments like these ones:

p>


此扩展的目标是提供一个简单的方法来添加vsdocs到JavaScript,类似于Visual Studio提供的其他XML注释。当在新行上添加三斜线(///)时,创建注释存根。

This extension's goal is to provide a simple way to add vsdocs to JavaScript that acts similar to other XML comments provided by Visual Studio. A comment stub is created when a triple-slash ("///") is added on a new line.

这篇关于在Visual Studio中评论javascript方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆