如何在Eclipse中获得Node.js的代码完成?

时间:2021-04-24 07:31:35

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).

在Eclipse中开发Node.js应用程序时,通常会导入自己的模块,其功能与导出(追加函数)或module.exports(允许流行的对象文字表示法)相关联。

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

但是,如何在导入模块的文件中为代码完成设置此项?

Module

如何在Eclipse中获得Node.js的代码完成?

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

正如您在outliner中看到的那样,Eclipse“了解”了该函数:

如何在Eclipse中获得Node.js的代码完成?

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

然而,将模块作为工具导入并不能使其功能可用:

如何在Eclipse中获得Node.js的代码完成?

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

我也试过了oldskool // @ import tools.js,但它似乎不像这样工作。

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

如何在项目中为自己的函数完成代码完成?

1 个解决方案

#1


4  

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

@Jey Keu:这个问题对我们共同完成代码的梦想有一些建议,即:

  • Amateras plugin
  • Amateras插件
  • JSDT editor
  • JSDT编辑
  • Aptana Plugin
  • Aptana插件
  • SPKET plugin
  • SPKET插件
  • VJET plugin
  • VJET插件

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.

但它被一群对Eclipse一无所知的人关闭了。分析是代码完成的基础。但他们认为剖析是独角兽和彩虹,因此不具有建设性。

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.

我认为,根据您的具体发展需求,VJET是您最好的选择。如果您可以在不破坏Eclipse中的所有其他功能的情况下使其工作,请在此问题中分享您的魔法。

http://eclipse.org/vjet/

http://eclipse.org/vjet/

#1


4  

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

@Jey Keu:这个问题对我们共同完成代码的梦想有一些建议,即:

  • Amateras plugin
  • Amateras插件
  • JSDT editor
  • JSDT编辑
  • Aptana Plugin
  • Aptana插件
  • SPKET plugin
  • SPKET插件
  • VJET plugin
  • VJET插件

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.

但它被一群对Eclipse一无所知的人关闭了。分析是代码完成的基础。但他们认为剖析是独角兽和彩虹,因此不具有建设性。

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.

我认为,根据您的具体发展需求,VJET是您最好的选择。如果您可以在不破坏Eclipse中的所有其他功能的情况下使其工作,请在此问题中分享您的魔法。

http://eclipse.org/vjet/

http://eclipse.org/vjet/