开发者

Code Assist Doesn't Work for Aptana Ver 3 Plug-in to Eclipse Ver 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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜