This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 194140 - Support for JsDoc inheritance properties to improve code assistant and outline.
Summary: Support for JsDoc inheritance properties to improve code assistant and outline.
Status: RESOLVED DUPLICATE of bug 224727
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-08 15:24 UTC by kaisellgren
Modified: 2013-01-11 06:43 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kaisellgren 2011-01-08 15:24:47 UTC
Many JavaScript based libraries offer inheritance similar to this:

    App.ComponentA = Base.extend({
        init: function() {
        }
    });

    var cmp = new App.ComponentA();

NetBeans' code assistant and outlines break with these kinds of inheritance models, which is completely understandable. However, NetBeans should support JsDoc defines a way for a developer to define which types extend which. The following should work in future NetBeans:

    /**
     * Description...
     *
     * @augments Library.Some.Component
     */
    App.ComponentA = Library.Some.Component.extend({
        /**
         * @constructor
         */
        init: function() {
        }
    });

    var cmp = new App.ComponentA();

NetBeans should now understand that App.ComponentA extends the specified @augments object. It should also understand that this extendee has a function init(), which is its constructor.

More on the tags:

@augments: http://code.google.com/p/jsdoc-toolkit/wiki/TagAugments
@class: http://code.google.com/p/jsdoc-toolkit/wiki/TagClass
@constructor: http://code.google.com/p/jsdoc-toolkit/wiki/TagConstructor
@memberOf: http://code.google.com/p/jsdoc-toolkit/wiki/TagMemberOf

Any questions? Just ask.
Comment 1 Martin Fousek 2013-01-11 06:42:52 UTC
(In reply to comment #0)

Thanks for reporting this. BTW, please enter could you enter issue per element you would like to have supported. It should to be evaluated per every jsDoc tag.

> More on the tags:
> 
> @augments: http://code.google.com/p/jsdoc-toolkit/wiki/TagAugments
> @class: http://code.google.com/p/jsdoc-toolkit/wiki/TagClass
> @constructor: http://code.google.com/p/jsdoc-toolkit/wiki/TagConstructor
> @memberOf: http://code.google.com/p/jsdoc-toolkit/wiki/TagMemberOf
> 
> Any questions? Just ask.

@class and @constructor are already supported in the new JavaScript editor.
@augments is part of issue #224727
@memberOf wasn't reported separately so far, feel free to raise an issue for that if you feel needs for it - ideally with sample code (you can be sure then, that we will support your cases)

Marking as duplicate of newer issue #224727 which is entered only for the @augments tag, I believe you are ok with that. Thanks again for reporting.

*** This bug has been marked as a duplicate of bug 224727 ***