Page 1 of 1

JSDoc documentation of the basic JavaScript methods/objects

Posted: Tue Mar 27, 2012 8:01 am
by Sorbing
Again, code completion issue...
I would describe JSDoc documentation for the standard JavaScript objects and methods (String, Array, Arguments, Event, etc...).
But Spket always replace documentation basic methods their internal documentation and does not show a description from my costom JSDoc file.
I can describe only additional methods of basic objects or methods of other objects.
Example:

Code: Select all

/**
 * Custom description Arguments Object [OK. DISPLAYED]
 * @type {Arguments}
 */
var arguments = new Arguments();

/**
 * Custom description Arguments.calee2() [OK. DISPLAYED]
 * @deprecated
 * @return	{Function}
 */
Arguments.prototype.callee2 = function() {};

/**
 * Custom description Arguments.calee() [NOT DISPLAYED]
 * @deprecated
 * @return	{Function}
 */
Arguments.prototype.callee = function() {};

(function() {
	arguments.ca // Description methods callee() not displayed! For callee2() methods my description is displayed.
})();
Image

Thanks.

Re: JSDoc documentation of the basic JavaScript methods/obje

Posted: Wed Mar 28, 2012 4:19 pm
by eric_suen
the library for standard objects are in folder com.spket.js_x.x.x.jar/config, if you really want add document, you can add there

Re: JSDoc documentation of the basic JavaScript methods/obje

Posted: Wed Mar 28, 2012 7:34 pm
by Sorbing
Yes, I know.
But there are not allow add description @param, @examples in the file (com.spket.js_x.x.x.jar/config) , and other tags (parser does not handle them).
Methods will be available in code completion, but without descriptions (documentation).
And convenient include JSDoc file than the modify com.spket.js_x.x.x.jar/config.
I want to write documentation of JavaScript methods and include into IDE.
Currently all of IDE does not have a good documentation of JavaScript - I want to write it.
Thanks.

Re: JSDoc documentation of the basic JavaScript methods/obje

Posted: Thu Mar 29, 2012 7:43 am
by eric_suen
Then you can add that file in your profile, choose jQuery as the library type.

Re: JSDoc documentation of the basic JavaScript methods/obje

Posted: Thu Mar 29, 2012 6:05 pm
by Sorbing
Which file? com.spket.js_x.x.x.jar/config or JSDoc?
JSDoc for jQuery works fine. Not works Core JavaScript methods (String, Array, Arguments, Event).
How can I document these objects and their methods?

Re: JSDoc documentation of the basic JavaScript methods/obje

Posted: Thu Mar 29, 2012 6:31 pm
by eric_suen
The one with document for Core JavaScript methods (String, Array, Arguments, Event).

Re: JSDoc documentation of the basic JavaScript methods/obje

Posted: Fri Mar 30, 2012 9:06 am
by Sorbing
OK. I realized. Prior to this I added JSDoc in common or not jQuery section: Window - Preferences - Spket - JavaScript Profile - [Your Profile] - Add Library - Common. Do not work, not display documentation of CORE objects.
Necessary added JSDoc only in jQuery Library Section. Thanks. Although I wonder why JSDoc of Core JS Methods does not work in Common Lib?

Now I have another problem - Documentation does not work and not completion of children-methods (pardon the my english). Example:

Code: Select all

/**
 * Description callee
 * @return	{Object}
 */
Arguments.prototype.callee = {}; // OK

/**
 * Description callee.caller
 * @return	{Object}
 */
Arguments.prototype.callee.caller = {}; // Completion NOT works

/**
 * Description callee2
 * @return	{Object}
 */
Arguments.prototype.callee2 = {}; // OK

/**
 * Description callee2.caller
 * @return	{Object}
 */
Arguments.prototype.callee2.caller = {}; // OK
Not display completion method caller for arguments.callee.

Code: Select all

arguments.callee. | this not display caller method
Image
Image

How to describe such a construction? Thanks.

Re: JSDoc documentation of the basic JavaScript methods/obje

Posted: Fri Mar 30, 2012 5:07 pm
by eric_suen
It's a bug, please download http://www.agpad.com/downloads/com.spket.js_1.6.22.jar and try again

Re: JSDoc documentation of the basic JavaScript methods/obje

Posted: Sat Mar 31, 2012 4:19 pm
by Sorbing
Everything works fine! Thank you very much!