Cannot access other js project scripts

Hi all

I’ve been using Tern for a little while but I have found that I cannot access certain objects in other files although they are on my script path.

EG: if I type new…whatever constructor function… the content assist is unaware of it.

Any help would be appreciated.


What does ‘script path’ mean? Are you using a module system or simply different files adding stuff to the global scope? In the second case, you might need to configure them with the loadEagerly option, since Tern itself can’t figure out what you’re depending on.

Hi Marijn
Cheers for your quick reply.
By Script Path I mean Project->Properties->Javascript->Tern->Script Paths; where I have a list of dependent projects and their associated files.
Sure, my files are adding to the global space but I have tried to reduce that to a minimum by enclosing global functions and variables in an object literal and everything else is a constructor function with prototype appendages.
Also, I have no idea where this loadEagerly option can be found.

Doh! I forgot to add that I am using Eclipse Oxygen with Tern

Ah, you might want to ask this question to the Eclipse Tern maintainers, since I’ve never used that and can’t say much about it.