if you are using spket in eclipse you can generate a .jsb file which will tell eclipse what js files to include for code complete w/ spket.
I wrote this small perl script to parse our source directory & build a stripped down .jsb file (which is all that is needed for code complete) , this was written to run on a windows machine. You need to set the $jsbFile and $source variables to where you want the $jsbFile written out and the locaiton of yoru $source directory that holds all your js files.
Note: This script uses the find binary installed as part of cygwin.
- Code: Select all
open(JSB, ">$jsbFile"); # open jsb file for overwrite
print "Finding .js files:\n";
open(FIND, "cd $source;find * -name '*.js' |"); # find gives us a stream of .js files relative to $source
print "Writing .jsb:\n";
print JSB "<?xml version='1.0' encoding='utf-8'?><project path='' name='Portal'><target name='Everything'>";
while(<FIND>) {
chomp();
s/\//\\/g; # replace all / with \
print JSB "\n<include name='$_'/>";
}
close(FIND);
print JSB "\n</target></project>";
close(JSB);
you can right click on your project & reload javascript profile which will reload all contents of all js files in your $source folder.
Hope this is helpful.