gpt4 book ai didi

javascript - Code Assist 不适用于 Eclipse Ver 3 的 Aptana Ver 3 插件

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:47:00 25 4
gpt4 key购买 nike

2011 年 9 月 5 日更新:问题已解决 -- 查看底部的详细信息


我在使用 Aptana Ver 3.0.4 中的 Code Assist 时遇到问题。 Eclipse 3.7.0 的插件。

我已经安装了 NetSuite 插件,但是当我按下 CTRL+SPACE 时,我没有收到任何代码建议。有许多以“nlapi”开头的 NetSuite 功能,但 Code Assist 不提供任何帮助。

这是为了与 Javascript 编辑器一起使用。

这适用于 Aptana Ver 2。如何让它在 Ver 3 中运行?

更新:我已将 NetSuite SuiteScript_API.js 文件添加到我的项目中,但我仍然没有完成任何代码。我相信该文件符合 ScriptDoc 规范,因此它应该可以工作。

这是该文件的示例:

/**
* Return a new record using values from an existing record.
* @governance 10 units for transactions, 2 for custom records, 4 for all other records
*
* @param {string} type The record type name.
* @param {int} id The internal ID for the record.
* @param {Object} initializeValues Contains an array of name/value pairs of defaults to be used during record initialization.
* @return {nlobjRecord} Returns an nlobjRecord object of a copied record.
*
* @since 2007.0
*/
function nlapiCopyRecord(type, id, initializeValues) { ; }


更新:问题已解决!

感谢我的一位同事,我已经弄清楚如何使代码辅助工作/使用 NetSuite SuiteScirpt API 文件来提供代码完成。

Code Completion works differently in the new version. Right-click on your project and choose Properties, then go to Project Natures and make it a Web project.

Then, absolutely all .js files in your project will be indexed for auto-completion, including the SuiteScript API file if it's in your project.

We have a large number of .js files, so I'd rather be able to select which file to reference for auto-complete. Version 3 doesn't currently allow that, unlike Version 2

最佳答案

版本 3.0.5 在这方面发生了变化,可能会让您更接近您想要的。

首先,您可以从索引中排除文件和整个目录,方法是右键单击它们,选择“索引”,然后选择“从索引中排除”。

接下来,在 3.0.5 中,有一种将库与 Web 项目相关联的新机制。右键单击该项目,选择“项目构建路径”。您应该看到可以与项目索引相关联的文件列表。例如,如果您安装了 javascript-jquery ruble,您将看到 jQuery 1.4.2 和 1.6.2 的条目。可以通过卢布将新条目添加到列表中。在 javascript-jquery ruble 菜单中选择“编辑此包”以查看其工作原理的示例。例如:

bundle 'myBundle' do |bundle|
bundle.project_build_path["My Library 1.0"] =
"#{File.dirname($0)}/support/myLib.sdocml"
end

此示例在项目构建路径中创建一个名为“My Library 1.0”的新条目,并指向项目中名为 myLib.sdocml 的文件,其中 bundle.rb 文件位于名为 support 的文件夹中。您可以将一个简单的 bundle.rb 文件添加到您的项目中,以使您的 api 文件出现在类似于上面的列表中。

请注意,您可能需要使用 Commands->Bundle Development->Update User Bundles 来确保您拥有所有 bundle 的最新版本。

喂,凯文

关于javascript - Code Assist 不适用于 Eclipse Ver 3 的 Aptana Ver 3 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7296109/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com