If you like coding and can’t live without that autocomplete feature, you might be interested in setting up IntelliJ for developing with Caplin JS libraries.
IntelliJ will typically carry out the autocomplete on the library files itself, like so:
What you will need
Essentially, an instance of IntelliJ IDEA up and running with an open or empty project. And of course, access to Caplin JS Libraries!
.js files to include.
In the following example, we’ll start by creating an empty project in IntelliJ. We’ll then add the external Caplin JS libraries that you have stored outside of your project root directory.
If you look at the panel of options on the left side of the pop up box, you’ll find Static Web. Select Web Module underneath, give the project a name and click Finish to continue.
Go to File, and open up Settings.
From here you can import the
A dialog box will pop up showing you all the files and roots detected by IntelliJ following a scan. They may contain any debug or release versions of the JS files from the Library that you can choose to attach via the green add (+) button. From this box, you can select and deselect any library files to be included in the import. Click OK when you’re done.
Choose, and then highlight the project module(s) you wish to include the libraries in. Then click OK to confirm the addition of the libraries.
You should now see the library files that have been added, as shown in the screenshot. At the top, you can give the library a name of your choice. Hit Apply, then click OK to close the dialog box.
You’ve just added the libraries. You can now begin testing the code completion feature on the newly added Caplin JS library files and objects. Recognising method, property, and other names.
The example below shows the PresentationModel method being implemented with the code completion feature:
Here’s a useful PDF showing you the IntelliJ Keymap (Keyboard Shortcuts): IntelliJ IDEA Default Keymap