如何在Eclipse中获得Node.js的代码完成? [英] How do I get code completion for Node.js in Eclipse?

查看:369
本文介绍了如何在Eclipse中获得Node.js的代码完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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?

模块

正如您在 outliner 中所见, Eclipse 知道了功能:

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还尝试了oldskool // @ import tools.js 但它看起来不像这样。

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?

推荐答案

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

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


  • Amateras插件

  • JSDT编辑

  • Aptana插件

  • SPKET插件

  • VJET插件

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

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

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.

我认为,根据您的具体发展需要, VJET 是你最好的选择。如果您可以在不破坏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.

http://eclipse.org/vjet/

这篇关于如何在Eclipse中获得Node.js的代码完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆