用于 Eclipse 和 jQuery 代码辅助的 Aptana 插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1351847/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 11:16:37  来源:igfitidea点击:

Aptana Plugin for Eclipse and jQuery code assist

jqueryeclipseeclipse-pluginaptana

提问by cupakob

I want to use autocomplete for jQuery in Eclipse. The Aptana Plugin is installed:

我想在 Eclipse 中为 jQuery 使用自动完成功能。安装了 Aptana 插件:

Aptana Web Development Tools
Version: 1.5.1.25495-787Y07jbcbrChz-Tq2k383275

Support for jQuery also:

还支持 jQuery:

Aptana Support for jQuery
Version: 1.3.2.00005

JavaScript/WTP is installed:

已安装 JavaScript/WTP:

JavaScript Developer Tools
Version: 1.1.1.v200906091427-77-FGBCcNBC-BeMcEeOm
Build id: 20090616035105

But the autocomplete doesn't work. Does anyone have an idea of where the problem could be?

但自动完成不起作用。有谁知道问题可能出在哪里?

回答by jmohr

Turn on JavaScript Code Assist Feature

打开 JavaScript 代码辅助功能

When you install additional AJAX library support the Code Assist for that library isn't turned on by default.

当您安装额外的 AJAX 库支持时,默认情况下不会打开该库的代码助手。

To turn on the Code Assist feature after you install additional AJAX Libraries:

要在安装其他 AJAX 库后打开代码辅助功能:

Preferences > Aptana > Editors > JavaScript > Code Assist > Check jQuery

Aptana AJAX Code Assist Settings

Aptana AJAX 代码辅助设置

Switch to the Aptana Perspective

切换到 Aptana 透视图

If you just installed the Aptana plugin and are trying to get this to work you'll have to make sure you're using the Aptana Perspective to utilize the AJAX library Code Assist feature:

如果您刚刚安装了 Aptana 插件并试图使其工作,则必须确保您正在使用 Aptana Perspective 来利用 AJAX 库代码辅助功能:

Window > Open Perspective > Other... > Aptana

Using Eclipse PDT with Aptana Plugin

将 Eclipse PDT 与 Aptana 插件配合使用

I installed the Aptana plugin to Eclipse PDT and the jQuery Code Assist worked fine once I realized that I was still using the PDT PHP Perspective instead of the Aptana Perspective.

我将 Aptana 插件安装到 Eclipse PDT 并且当我意识到我仍在使用 PDT PHP Perspective 而不是 Aptana Perspective 时,jQuery Code Assist 运行良好。

When I switched to the Aptana Perspective it started working.

当我切换到 Aptana Perspective 时,它​​开始工作。

Install Aptana Plugin before PDT

在 PDT 之前安装 Aptana 插件

Sirokov pointed out that he was unable to get the Code Assist to work with PDT and Aptana Plugin unless he installed the Aptana Plugin first and then installed PDT second.

Sirokov 指出,他无法让 Code Assist 与 PDT 和 Aptana Plugin 一起工作,除非他先安装 Aptana Plugin,然后再安装 PDT。

回答by Abraham Adam

I actually Had a hard time finding out how to install Aptana Plugins , so I am adding this in hopes that if someone else is confused they find it helpful.

我实际上很难找到如何安装 Aptana 插件,所以我添加了这个,希望如果其他人感到困惑,他们会发现它有帮助。

whether in Aptana itself or eclipse its the same.

无论是在 Aptana 本身还是 eclipse 中都是一样的。

Help >> Install Aptana Features . you will find all the plugins here

帮助 >> 安装 Aptana 功能。你会在这里找到所有的插件

took me like 30 minutes to find it hopefully I can save that for someone else

我花了大约 30 分钟才找到它,希望我可以将它保存给其他人

回答by Jamie

Also read this to get the code complete working.

另请阅读本文以使代码完整工作。

https://aptanastudio.tenderapp.com/discussions/problems/356-jquery-code-assist-no-utility-function-support

https://aptanastudio.tenderapp.com/discussions/problems/356-jquery-code-assist-no-utility-function-support

Basically, you need to update the File Associations to make *.js files use the Aptana editor.

基本上,您需要更新文件关联以使 *.js 文件使用 Aptana 编辑器。

回答by James Drinkard

I had this same question as well.

我也有同样的问题。

What I use is the JSDT jQuery pluginfor Eclipse Indigo (has to be this version though) It has basic functionality, but I like it. There is an installation guide in the wiki.

我使用的是Eclipse Indigo的JSDT jQuery 插件(虽然必须是这个版本)它有基本的功能,但我喜欢它。wiki 中有安装指南。

I also use Notepad++ for the autocomplete outside of Eclipse and to run jQuery snippets in a stand alone mode. The plugin for Notepad++ is located here.

我还在 Eclipse 之外使用 Notepad++ 进行自动完成,并在独立模式下运行 jQuery 片段。Notepad++ 的插件位于此处