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 250298

Summary: Module code completion does not work inside exports.property body
Product: javascript Reporter: Vladimir Riha <vriha>
Component: Node.jsAssignee: Petr Pisl <ppisl>
Status: RESOLVED FIXED    
Severity: normal CC: tmysik
Priority: P2    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: sample project
sample project #2

Description Vladimir Riha 2015-02-08 17:01:54 UTC
Created attachment 151886 [details]
sample project

Please check the attached project:
 - open it in IDE and invoke NPM install
 - open server/api/test.js and invoke cc on line 48 after "mi."
 => endsWith or listFiles should be offered, but it is not.

It works fine if I use

module.exports = function (app) {
    app.get("/api/string/:text", function (req, res) {



or if I try it outside of exports.registerRoute.

 

Thank you



Product Version: NetBeans IDE Dev (Build 201502080001)
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-43-generic running on amd64; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2015-02-10 09:42:21 UTC
Created attachment 151915 [details]
sample project #2

Here are some couple more examples with different type of inner score. Please try to open s2, s3 or s4.js. Thank you

Unlike in issue 250329, the used module is declared via 

   exports.property

The difference is that this works when used in 

   module.exports = function(){
   // works here
   }

In issue 250329, the snippet above does not work.


Thank you
Comment 2 Petr Pisl 2015-03-27 13:20:55 UTC
Should work now correctly in web-main.
Comment 3 Quality Engineering 2015-03-28 08:19:24 UTC
Integrated into 'main-silver', will be available in build *201503280001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b5609124d3f7
User: Petr Pisl <ppisl@netbeans.org>
Log: #250298 - Module code completion does not work inside exports.property body