loading javascript file to library. Follow
Hi,
Can anybody please tell how to load a pure javascript file in to the global library programmaticaly.
I did it via creating a library of a jar file which contains that javascript file. But it did not serve the purpose. ( I need to inherit some syntax highlighting like in Ajax.js, HTML5.js).
Thanks..!!
Please sign in to leave a comment.
Hi,
I could load the js file using following procedure. But it is not loaded as javascript library.
But it is not loaded as javascript library.
For an example I want to do the fllowing procedure programatically.
Settings ----> Project Settings ----->Javascript ----->Libraries ------------> Configure ---------> Load the js file.
Above code loaded the .js file as library but not configured as javascript library.( File loaded is not shown in Javascript libraries)
How can I achieve that. Where have I gone wrong?. Can I achieve it through scripting libraries. But the source code for getting scripting libraries are not available.
Your kind help is highly appreciated.
Thanks..!!
JS plug-in has an extension point called JSPredefinedLibraryProvider which allows other dependent plug-ins have bundled js libraries. In turn it also depends on webcore module but it's not a part of the public API. Just adding a file like a class root type will not work because normally roots are expected to be directories. The best you can do is to add a parent directory as a root instead.
Hi,
Thanks for the exact answer Rustam.
Needed to extend JSPredefinedLibraryProvider defined in Javascript jar. (It was in the IDEA installation folder).
Thanks ..!!