Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module exports are not shown in code completion #2

Open
gyszalai opened this issue Mar 1, 2013 · 4 comments
Open

Module exports are not shown in code completion #2

gyszalai opened this issue Mar 1, 2013 · 4 comments

Comments

@gyszalai
Copy link

gyszalai commented Mar 1, 2013

It may be the NB JavaScript editor's fault, but Node module exports are not shown in code completion. E.g. if you require the http module, the createServer exported function is not shown if I press CTRL-SPACE.

@gyszalai
Copy link
Author

gyszalai commented Mar 1, 2013

Forgot to mention it's NetBeans 7.3 final and Ubuntu 12.10.

@timboudreau
Copy link
Owner

It is, but there may some things we can do about it from the Node module. The Javascript editor support in NetBeans was rewritten from scratch for 7.3 - and it does do better with commonjs stuff. Code completion has improved, but isn't perfect (and, given the nature of Javascript, probably never will be). I am in touch with my former colleagues who rewrote the JS editor in NetBeans, so I hope to find out more.

The old JS editor support let you supply a ClassPath object (inherited from the Java editor API) to point to library sources. Probably this needs some revisiting in the new editor, but there's certainly some way of doing it.

@gyszalai
Copy link
Author

gyszalai commented Mar 1, 2013

Thanks! I hope it'll improve in the upcoming NetBeans versions. I think NetBeans with your plugin is far better for Node.js development than any other tool we tried so far. Though we are very new to Node.js.

@timboudreau
Copy link
Owner

FWIW, version 2.10 and up have an API for resolving require() references by name, and a set of stub js files with the signatures of Node's built-in modules exports. Writing something that will actually use it is a longer project - NetBeans' API for javascript code completion is not for the faint of heart - I've been looking at the implementation of JQuery completion...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants