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 247377 - Completion offers instance properties for contruction function
Summary: Completion offers instance properties for contruction function
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: PC Linux
: P4 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-22 19:20 UTC by Vladimir Riha
Modified: 2015-04-02 11:46 UTC (History)
0 users

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-09-22 19:20:37 UTC
Please try following:

promiseError.js:
============================
"use strict";
function TPError(type, msg, data) {
    this.type = type;
    this.msg = msg || "unknown";
    this.data = data;
}

TPError.BadRequest = "BadRequest";
TPError.DatabaseError = "DatabaseError";

module.exports = TPError;


file.js
=============================
var TPError = require("promiseError");
TPError.


- invoke cc after the dot in file.js
=> msg, data and type are offered although they are instance properties, not "class"


Thank you


Product Version: NetBeans IDE Dev (Build 201409220001)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.13.0-35-generic running on amd64; UTF-8; en_US (nb)
Comment 1 Petr Pisl 2014-09-23 14:55:33 UTC
This will not be easy to fix. In file file.js the editor only knows that TPError is probably type of promiseError module. It doesn't know, whether the module exports the instance of the class. This has to be changed in the core js editor module.
Comment 2 Petr Pisl 2015-04-02 11:46:06 UTC
Marking as P4. IMHO it is not serious issue.