Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code assist - external javascript library in Aptana

Trying to get Easeljs js library in Aptana 3 (as web project). Dragged the files in the project (files are indexed). It doesn't recognize the library as code assist. Is the only way for external js library to make a sdocml (if so is there a generator ?) or is there a other way to get code assist ?

like image 905
user1114103 Avatar asked Dec 23 '11 23:12

user1114103


People also ask

How can we add an external js library to a webpage?

To include an external JavaScript file, we can use the script tag with the attribute src . You've already used the src attribute when using images. The value for the src attribute should be the path to your JavaScript file. This script tag should be included between the <head> tags in your HTML document.

What is an external JavaScript library?

All JavaScript libraries consists of two parts: The external JavaScript itself, which is simply a text file with the containing JavaScript code, saved as a . js file. A <script> tag referencing the external JavaScript file and defined on the page(s) that uses the library.


1 Answers

Ugg I know it's off topic but i've found the code assist in Aptana3 and Eclipse to be poor in general, and a really memory hog, in many case I've turned it off, as the IDE has become unresponsive for the constant "rebuilding workspace"...

So with that out the way...

If you follow these instructions they should help you

https://wiki.appcelerator.org/display/guides2/Using+JavaScript+Libraries

Generally as long as the code is visible to the project (in say a gitignored lib folder), and it's documented using ScriptDoc (which isn't that much off jsdoc) standard, my understanding is it will do it's best to do code assist.

https://wiki.appcelerator.org/display/guides2/ScriptDoc+%28SDOC%29+2.0+Specification

You can apparently improve the code assist by using actual sdocml file for particular libraries, but I'm yet to see any improvement myself.

Just make sure there's a copy of easejs in your project, your editing js files in the javascript editor (right click open with javascript editor), and your project is a web/php project,

note it's pretty terrible at closures so i wouldn't expect everything to auto complete as you'd expect.

If your doing alot of commercial work, would recommend intellij as a good enterprise quality javascript IDE, or the web storm, html5/js cut of the code, they both support code completion in javascript alot better than Aptana3/Eclipse.

If not the community version is still better than Aptana3/Eclipse at javascript.

like image 177
aqm Avatar answered Oct 04 '22 07:10

aqm