Oliver
Oliver

Reputation: 71

Handling lots of JavaScript code with Aptana Studio

I've written some lines of JS code with Aptana Studio 3 (Web project) and tried out-sourcing.

Original structure:

(function(window) {
 var App = { // properties and functions...
 };

 App.SubObject1 = { // properties and functions...
 };
 App.SubObject2 = { // properties and functions...
 };
 // more sub objects here...

 window.App = App;

})(window);

Now, the code was growing to much (> 1000 lines), so I decided to move subobjects into single JS files (all in the same folder) for convenient developing. I also removed the anonymous self calling function, so Aptana Code Assist can find the code inside...

The Problem

The code assist (code completion etc.) doesn't seem to know all code of all JS files or doesn't work proper. Some files know the code of some other files. Other files doesn't know the code of the other files.

I tried indexing, refreshing, project clean-up -> No changes. I also checked that there are no parse errors in my code.

Can I do something to connect the files?
How do you work with mass JS in Aptana?

Thank you!

Upvotes: 2

Views: 658

Answers (2)

shovemedia
shovemedia

Reputation: 191

I did my best to document the work-around(s) I'm using here: http://karoshiethos.com/2012/05/11/hacking-code-assist-in-aptana-3-javascript/

Upvotes: 1

user1046355
user1046355

Reputation:

I did have a similar problem, I have solved it by creating a new web project. After that I have drag and drop all the files I wanted to work with and I choosed the option link to files, so I don't have to change my directories structure. In your case, I guess that you only would need to drag and drop the files with the functions you want to expose, to the project in wich you want to used the functions, and choose the option 'link to files'. Hope this works for you.

Upvotes: 0

Related Questions