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.
The code completion of node.js framework is based on the downloaded sources, that are parsed and then used for editor features. Unfortunately the sources of Node.js 4.x.y are written in EcmaScript 6. We are not able to parse these sources yet and this is the problem. As a result of this, we are not able to offer code completion for most of modules, which are already written in ECMA Script 6. fs module is one of them.
One of the "temporary" solution would be to work internally with Node.js version 0.12.7 . It means download sources of Node.js 0.12.7, when user uses version 4.0 or newer. Put the sources 0.12.7 version on the project classpath. This has some consequences, like: - if user will navigate to the module file like fs.js, then it will not be opened his defined version (4.x.y), but sources from the version 0.12.7. - the code completion doesn't have to be exactly the same like for the version 4.x.y, because the methods of modules will be taken from version 0.12.7 - the previous point has to be applied to the documentation as well. The positive things is that this "hack" should be simple to implement and could be in the trunk and branch relase81 today. IMHO also this workaround should be mentioned in the release notes.
Should be "fixed" now. Simply pretend that all versions not-starting-by-zero (0.x) are the latest 0.12 version (0.12.7 at the moment). It means that everywhere in the IDE one can see only 0.12.7 as a version instead of 4.x or newer. This applies only for node.js and not for io.js. Petr promised to do the backport to the releases repo, branch release81, once the fix is verified. Thanks a lot Petře! http://hg.netbeans.org/web-main/rev/ffcccc73d724
Lado, could you please verify this as soon as new build from web-main repository [1] is built? Thanks! [1] http://deadlock.netbeans.org/job/web-main/
I've tried on trunk build with jar from Tomas and it seems to work fine (tested with NodeJS 0.12.6 and 4.1.1). It downloads docs for 0.12.6/0.12.7 without any ES6 code. Maybe there could be some explanation message in Tools->Options->HTML/JS->NodeJS when it won't use sources for major versions so that users will know why it shows 0.12.7 while their NodeJS is 4.1.1. Product Version: NetBeans IDE Dev (Build 201510120002) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14 System: Linux version 3.16.0-30-generic running on amd64; UTF-8; en_US (nb)
Small fix for documentation to get it work properly: http://hg.netbeans.org/web-main/rev/15c28a2c26ea
(In reply to Vladimir Riha from comment #4) > Maybe there could be some explanation message in > Tools->Options->HTML/JS->NodeJS when it won't use sources for major versions > so that users will know why it shows 0.12.7 while their NodeJS is 4.1.1. Information will be in Release Notes. I have also created issue #255878, marked as a patch candidate. Feel free to add your comment there. Petře, will you do the backport, please? Thanks.
Yes, I'm going to do it.
Thanks, I've tried the 2nd fix as well and JSDoc is displayed for both 0.12.6 and 4.1.1
So both fixes are transplanted in the releases repo: http://hg.netbeans.org/releases/rev/db49e2c0edde http://hg.netbeans.org/releases/rev/c2902e471e59 Should be mentioned in the release notes -> adding the keyword
Integrated into 'main-silver', will be available in build *201510130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ffcccc73d724 User: Tomas Mysik <tmysik@netbeans.org> Log: #255872 - Code completion doesn't work for Node.js 4.x version Just a hotfix/workaround: simply pretend that all versions 4.x or newer are the latest 0.12 version (0.12.7 at the moment). This applies only for node.js and not for io.js.
Thank you, verified in RC2 with NodeJS 0.12.6 and 4.1.1 Product Version: NetBeans IDE 8.1 RC2 (Build 201510122201) Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27 System: Linux version 3.16.0-30-generic running on amd64; UTF-8; en_US (nb)
Altering node sources of node-v0.12.14-linux-x64 and then node-v4.1.1-linux-x64 did not allow code completion for node projects.