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 242434 - Ctrl+Click navigation for @link and @see in JsDoc
Summary: Ctrl+Click navigation for @link and @see in JsDoc
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 8.0
Hardware: PC Windows 7 x64
: P3 normal with 2 votes (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-27 22:24 UTC by NukemBy
Modified: 2015-04-22 15:44 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 NukemBy 2014-02-27 22:24:35 UTC
JsDoc defines the {@link } tag, which allows creating cross references within JsDoc comments. It would be very handy to have Ctrl+Click navigation for these links and @param/@return types in JsDoc.

Refer to http://usejsdoc.org/tags-link.html for more details.
Comment 1 NukemBy 2015-04-13 17:11:28 UTC
Another case - navigating from the @type attribute to actual implementation

/** @type MyLib.ObjA */
var a1 = MyLib.objA();
var res = a1.aproperty;
Comment 2 NukemBy 2015-04-22 15:44:10 UTC
More extensive test sample for this issue. In JsDoc of 'method2' Ctrl+Click for following should work:

1. {@link MyLib.Cls#method1}
2. @param {MyLib.Data} - works already
3. {@see MyLib.Cls}
4. /** @type MyLib.Data */ - works already for /** @type {MyLib.Data} */
   with type provided in curly braces. Some IDE's understand @type 
   without curly braces
5. // Ctrl+Click on 'value' should goto line #11

More details:
  http://usejsdoc.org/about-namepaths.html
  http://usejsdoc.org/tags-inline-link.html
  http://usejsdoc.org/tags-see.html
  

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
var MyLib = {};

/**
 * Data.
 * @constructor
 */
MyLib.Data = function Data () {
    /**
     * Value JsDoc
     */
    this.value = 1;
};

/**
 * Inner Cls class.
 * @constructor
 */
MyLib.Cls = function MyLibCls() {
    /**
     * JsDoc description
     *
     * @param a
     */
    this.method1 = function (a) {
    };
};
    

/**
 * Clone of {@link MyLib.Cls#method1}.
 *
 * @param {MyLib.Data} data     {@see MyLib.Cls}
 */
this.method2 = function(data) {
    /** @type MyLib.Data */
    var data2 = new MyLib.Data();
    
    // Ctrl+Click on 'value' should goto to line #11
    data2.value = data.value;
};