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 247711 - Go to declaration fails for anonymous object
Summary: Go to declaration fails for anonymous object
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-06 08:26 UTC by Vladimir Riha
Modified: 2014-10-06 08:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2014-10-06 08:26:34 UTC
Please try following:

File func.js:
=========================

function SampleFunc() {
    this.ale = 1;
    this.ale2 = {
        f: 2,
        f1: 3
    };
    this.bar = function () {
        return new Date();
    };
}

module.exports = SampleFunc;


File main.js:
==========================
var o3 = require("func");
new o3().bar();


If you Ctrl+Click on the bar() call in main.js, it should navigate to the method declaration in func.js. It works in following case

var x = new o3(); x.bar();


Thank you


Product Version: NetBeans IDE Dev (Build 201410060001)
Java: 1.8.0_20; Java HotSpot(TM) Client VM 25.20-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)