How do I get code completion for Node.js in Eclipse?

为君一笑 提交于 2019-12-09 16:01:25

问题


When developing a Node.js application in Eclipse, you usually import your own modules with functionality tied to exports (append functions) or module.exports (allows popular object literal notation).

But how do you set this up for code completion in files where you import your module?

Module

As you can see in the outliner, Eclipse is "aware" of the function:

Yet importing the module as tools doesn't make it's functions available:

I also tried the oldskool //@import tools.js but it doesn't seem to work like this.

How do I get code completion for my own functions in my project?


回答1:


@Jey Keu: this question has some suggestions towards our mutual dream of code completion, namely:

  • Amateras plugin
  • JSDT editor
  • Aptana Plugin
  • SPKET plugin
  • VJET plugin

But it was closed by a bunch of people who know nothing about Eclipse. Profiling is the basis of code completion. But they think profiling is unicorns and rainbows and therefore not constructive.

I think, depending on your specific development needs, that VJET is your best bet. If you can get it to work without destroying every other function within Eclipse, please share your wizardry in this question.

http://eclipse.org/vjet/



来源:https://stackoverflow.com/questions/15472901/how-do-i-get-code-completion-for-node-js-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!