How to comment for ReSharper so Intellisense displays documentation? - javascript

I want to see my methods' documentation when I use CTRL-space on a method name while coding.
How should I format comments in my JavaScript methods and classes for re#er?

ReSharper 6 added support for JavaScript, CSS and HTML. ReSharper is using the same XML documentation annotations that are driving the JavaScript IntelliSense in Visual Studio. The XML format is an extension of the format that C# and VB.NET are using so it should look familiar to .NET developers. The main differences are the additional attributes that have been added to convey the (optional) type information that is not provided by the language itself and the place where those comments are written.
For more information take a look at these pages:
The format for JavaScript doc comments
VS 2008 JavaScript Intellisense
AjaxDoc: Generates documentation for JavaScript script libraries

Related

Use Visual Studio Code JavaScript IntelliSense (OmniSharp) in own C# projects

Can anybody tell me if (and how) it is possible to use the Visual Studio Code JavaScript IntelliSense (OmniSharp i think) (or other) in own C# projects?
I have a textbox in which a user can add JS code and it would be nice to support the user with IntelliSense.
Thanks.
I recommend looking at this thread, as this seems a duplicate.
Intellisense supported TextBox in WPf
The Intellisense for Javascript projects in VS Code is powered by the typescript compiler and the tools around it, not by Omnisharp (which provides Intellisense for C# projects).
You can integrate it into your own projects through the typescript language service and server. For details you should refer to the typescript documentation: https://github.com/Microsoft/TypeScript/wiki/Architectural-Overview

Reflect.js, What is it?

Github repo says:
Implementation of Mozilla's Parser API in JavaScript. There are few examples on github and mozilla's reference link. I have seen this library being used in one of Angular 2 seed project as well.
But what is the use of this library? Can someone explain in easy words to elaborate purpose/advantage of this library.
Thanks
It is literally just a javascript shell, much like node you can use it to write JS interactively in the shell or run JS files with it.
SpiderMonkey is Mozilla's JavaScript engine written in C/C++.
Parser, is a JS API version of that, you can use it to write tools that manipulate JS files, like a linter or compiler.
Reflect is a super old version of that which, as far as I know, is not a viable option given the other tools we have today. Note that the repo was last updated in 2012, and the JS is only ES3 compliant.

Difference between *.intellisense.js and entry in _references.js

I've noticed in Visual Studio 2015 that, when creating a new ASP.NET MVC Web project, it automatically adds a jquery-1.10.2.intellisense.js file. Reading Microsoft's documentation on *.intellisense.js files provided me no clarity, and I'd like to know what this really does. If it adds intellisense into Visual Studio, then how is it different from the /// <reference path="jquery-1.10.2.js" /> entry in _references.js?
The _references.js file would give the user intellisense for what's in that file, which would be function names and signatures (parameter names).
The intellisense file contains additional XML comments that Visual Studio can read to give the user more information. E.g., it can add a ///<summary></summary> line to summarize the function, a list of ///<param name="">description</param> to give additional information for parameters, etc.
Since not all people use jQuery in a Visual Studio Environment, the intellisense file was created later after VS added in better support for JavaScript.
Here's an example of creating JavaScript XML comments for VS intellisense: https://msdn.microsoft.com/en-us/library/bb514138.aspx

Which comments documentation format is better for JavaScript?

Is there are any comments documentation format for JavaScript and processor for this format which generates HTML documentation?
Currently I am using VSDoc xml comments for providing IntelliSense help at developing time, but as I know there is no documentation generator for such comments.
So alternatively my question may sounds like: Is there are any utility which translates VSDoc comments from JavaScript files to HTML?
Have you looked at auto generated documentation from JavaDoc or VSDoc or JSDoc or anything like that.
They are all ugly and un-readable.
The solution is two fold
annotate your code with docco
Make your API documentation hand written.
There is a third option which is to revolutionize the way we do auto generated documentation, if you can then please do.
I've used Natural Docs for a few projects. The syntax is nice for reading the inline, but since it doesn't have "full language support" for JavaScript, you have to be somewhat explicit about each function/constant/class/whatever you want to document.
There is a utility that parses Javascript files and outputs the same XML format NDoc and Sandcastle use: AjaxDoc
That way you get the VS intellisense from the same comments and can output any format that you want.

How can I get Aptana's code assist to work with Google Maps API v3?

There's a Google Maps API v3 Visual Studio Intellisense Helper, which presumably works great for Visual Studio, but Aptana (based on Eclipse) uses a different JavaScript documentation format - ScriptDoc (.sdoc files). ScriptDoc is also the name of a VS utility to convert JS files with Intellisense comments into XML, just to confuse things.
I've tried adding the Intellisense files as file / global references in Aptana, but all this gives is completion for the word google and no completion or documentation in the google namespace.
Possible solutions:
Find someone who's already done this for Aptana. I've Google'd quite a bit already but couldn't find anything.
Convert the Visual Studio Intellisense Helper into a format Aptana can understand.
Scrape the API page and convert it into a format Aptana can understand.
Can't you put the JS file in the Project's references ?
I'm using Aptana and ScriptDoc is the worst decision they made and they seem to be attached to it, it's the main reason I have considered switching to Eclipse.
I've been thinking in using jsdoc-toolkit to generate .sdoc files from jsdoc notations (using some type of templates), but to use .sdoc files you must insert #id tags all over your code, and that discouraged me.
This helper is for Visual Studio. I don't think Aptana can work with vsdoc.js files
Aptana Plugin for Eclipse and jQuery code assist
I found this and I'm checking if it helps
http://code.google.com/p/closure-compiler/source/browse/#svn%2Ftrunk%2Fcontrib%2Fexterns%2Fmaps

Categories

Resources