代码辅助不适用于 Eclipse Ver 3 的 Aptana Ver 3 插件

发布于 2024-12-02 17:17:03 字数 1423 浏览 1 评论 0原文

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


I am having trouble with Code Assist in Aptana Ver 3.0.4. plugin to 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) { ; }


UPDATE: PROBLEM SOLVED!

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

代码完成在新版本中的工作方式有所不同。右键单击您的项目并选择“属性”,然后转到“项目性质”并将其设为 Web 项目。

然后,您项目中的所有 .js 文件都将被索引以进行自动完成,包括 SuiteScript API 文件(如果它位于您的项目中)。

我们有大量 .js 文件,因此我宁愿能够选择要引用的文件以进行自动完成。与版本 2 不同,版本 3 目前不允许这样做

UPDATE ON 9/5/2011: PROBLEM SOLVED -- See details at bottom



I am having trouble with Code Assist in Aptana Ver 3.0.4. plugin to Eclipse 3.7.0.

I have installed the NetSuite plug-in but I do NOT get any suggestions/proposals for code when I press CTRL+SPACE. There are many NetSuite functions that start with "nlapi" yet Code Assist doesn't offer any help.

This is for use with the Javascript editor.

This worked with Aptana Ver 2. How do I get it to work in Ver 3?

UPDATE: I have added the NetSuite SuiteScript_API.js file to my project, but I still do NOT get any code completion. I believe the file conforms to the ScriptDoc spec, so it should work.

Here's a sample from this file:

/**
 * 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) { ; }



UPDATE: PROBLEM SOLVED!

Thanks to a colleague of mine, I have figured out how to make Code Assist work/use the NetSuite SuiteScirpt API file to provide code completion.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我一向站在原地 2024-12-09 17:17:03

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 文件出现在与上面类似的列表中。

请注意,您可能需要使用命令 -> 捆绑包开发 -> 更新用户捆绑包来确保您拥有所有捆绑包的最新版本。

哈特哈,
凯文

Version 3.0.5 has changed in this area and may to get you closer to what you're wanting.

First of all, you can exclude files and whole directories from indexing by right-clicking them, selecting "Indexing" and then selecting "Exclude from Index".

Next, in 3.0.5 there is a new mechanism for associating libraries with web projects. Right-click the project, select "Project Build Path". You should see a list of files that can be associated with the project's index. For example, if you have the javascript-jquery ruble installed, you will see entries for jQuery 1.4.2 and 1.6.2. New entries can be added to the list via rubles. Choose "Edit this bundle" in the javascript-jquery ruble menu to see an example of how that works. For example:

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

This example creates a new entry in the Project Build Path called "My Library 1.0" and points to a file named myLib.sdocml in the project where the bundle.rb file lives in a folder named support. You can add a simple bundle.rb file to your project to make your api file appear in that list similar to above.

Note that you may need to use Commands->Bundle Development->Update User Bundles to make sure you have the latest versions of all of the bundles.

HTH,
Kevin

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文