开发者

Need intellisense or autocomplete feature for my own javascript file

Jquery comes with a vsdoc file that help us to get intellisense or autocomplete feature for jquery. if i want to have the same inte开发者_StackOverflow社区llisense or autocomplete feature for my own javascript file then what i need to do.....please help. thanks


Comment your code with JSDoc rules, then use this tool to convert it to VSDoc.

http://code.google.com/p/jsdoc-toolkit-vsdoc/

or learn VSdoc:

http://weblogs.asp.net/bleroy/archive/2007/04/23/the-format-for-javascript-doc-comments.aspx


Create a vsdoc file for your javascript and include it in your project in the same location as the .js file.


You don't actually need vsdocs. In my opinion, it's easier to just document your files using the vsdoc instructions. If you then minify and compile your JavaScript files for release using a tool like Google's Closure, comments and vsdoc remarks are automatically removed for you. This eliminates the need to maintain two separate files. You can even set the Closure compiler to run automatically when you build your VS project.

You'll also need to reference your JavaScript files to enable the IntelliSense. Place

/// <reference path="SomeJavaScript.js" />

at the top of each JavaScript file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜