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 - Module code completion does not work inside exports.property body
Summary: Module code completion does not work inside exports.property body
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Node.js (show other bugs)
Version: 8.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-08 17:01 UTC by Vladimir Riha
Modified: 2015-03-28 08:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project (205.80 KB, application/zip)
2015-02-08 17:01 UTC, Vladimir Riha
Details
sample project #2 (3.47 KB, application/zip)
2015-02-10 09:42 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
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