The Scriptlet Editor allows inline editing and pre-compilation of Java Scriptlets. To launch the editor right click within a Presence Text Area and select "Helpers > Scriptlet Editor" from the pop-up menu. Alternatively press control+j. If the cursor is within an existing scriptlet, that scriptlet will be edited. Otherwise a new blank text area will be shown.
Import directives will be shown in the drop-down list at the top right of the screen:
Click the add ( + ) button to add a class or package to be imported, and remove ( - ) to delete the current import. This list will be translated into a semi-colon separated list in the "import" attribute of the enclosing <java> tag when the editor is closed.
This attempts to compile the scriptlet code. If there are compilation errors, these will be displayed in an alert box (see below). If there are multiple errors you can scroll through them with the "Previous Error" and "Next Error" buttons. The code which caused the currently displayed error will be highlighted.
If the scriptlet has already been compiled and there have been no changes made, this will dismiss the editor and paste the scriptlet code (including the <java> tags) into the parent text area. Otherwise an attempt will be made to compile the code first:
The finished result after clicking "Okay".
This abandons any changes made to the script and dismisses the editor.