HelloYu / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

All @namespace fields & methods are marked static #261

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

First, I've changed all of our docs to use @name doclets, so this is no
longer blocking us.  Also, I seem to recall that you told me over a year
ago that this would not work, so I expect you'll resolve this "By Design."
 Nevertheless, I thought I'd mention it because this pattern was much more
convenient for us (compact, plus easier to write) than @name.

Repro:  Run the code below through jsdoc.

/**
* @namespace DomainFieldObject static class to describe a domain field for
a domain.
* @property {Integer} propertyId The unique ID of this property.
*/
LABKEY.Domain.DomainFieldObject = new function() {};

Observe: You'll see that the namespace's field is documented as static and
its path is fully specified (LABKEY.Domain.DomainFieldObject.propertyId)

What is the expected output?

Expected the style of documentation seen here:

https://www.labkey.org/download/clientapi_docs/javascript-api-9.2/symbols/LABKEY
.Domain.DomainFieldObject.html

Here, propertyId is not marked static and its path is not fully specified,
which is more readable.

What version of the product are you using? On what operating system?

We just moved to v2.3.2 from a beta or pre-beta copy of 2.0, snapped quite
a while back.  The link above shows documentation generated on the old
version.  The behavior change to static tags occurs in the new version.

Please provide any additional information below.

Background:  We liked the @namespace option for describing objects in our
API that we passed around via success callbacks.  These objects are not
explicitly visible in our code.  Most fields/methods on these objects are
instances, not statics.

Original issue reported on code.google.com by ekaynel...@gmail.com on 16 Oct 2009 at 2:24

GoogleCodeExporter commented 8 years ago
@namespace means "static class" in JsDoc, and any members of a static class 
are, by definition, also static. The 
tool is indeed working as designed, but you can always customize the template 
so it does not not show the static  
description and only outputs the short name. Email me if you need any help with 
that.

Original comment by micmath on 28 Oct 2009 at 11:38

GoogleCodeExporter commented 8 years ago
Thanks for confirming that this is intended behavior.  There's now some 
disagreement
now on my team about whether fully-qualified names are desirable or not, so 
I'll have
to pin that down before I figure out what to do.  You're right -- when that 
debate is
settled, I'll look at the template to see if I can figure out how to output only
short (not fully-qualified) names for static fields.  

Thanks again.  Your help is always much appreciated.

Elizabeth

Original comment by ekaynel...@gmail.com on 9 Nov 2009 at 2:08