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 247734

Summary: Module exporting constructor not fully resolved
Product: javascript Reporter: Vladimir Riha <vriha>
Component: Node.jsAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal CC: tmysik
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Vladimir Riha 2014-10-06 14:14:36 UTC
Please try following:


file.js
=====================

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

MyFnc.stNumber = 1;
MyFnc.stDate = new Date();
MyFnc.prototype.attempt = 1;
MyFnc.prototype.getAttempt = function () {
    return {aa: 1, ab: 2};
};

exports.foobar = MyFnc;



main.js
======================
var xx = require("file);
var p = new xx.foobar();

p.


=> code completion for "p" and Go To declaration (e.g. p.attempt) does not work.


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)
Comment 1 Roman Svitanic 2015-05-19 14:49:46 UTC
*** Bug 249852 has been marked as a duplicate of this bug. ***