User Functions Editor

The user functions editor is an integrated environment where you can create, edit or delete user functions that can later be used in newFASANT. Open Tools | User Functions, to start the User Functions editor.



Figure 1. the User Functions menu item.

This is the User Functions Editor. On your left, there is a sidebar with the different Java files currently registered in newFASANT. There is a main container where the editor will appear once a file is opened. At the top, a toolbar lets you perform several actions on the files or on the opened user functions.



Figure 2. The User Functions tab panel.

The following buttons are available on the toolbar for working with user function files.



Figure 3. User Functions toolbar (left button group).
  • New user function creates an empty and unsaved user function.
  • Open function once a function is selected in the sidebar, it will open the selected function in the editor.
  • Import user function if you have a .java file on your file system that you want to quickly import into newFASANT for later usage, such as a user function downloaded from our Scripts Center, you can use this button to copy a Java file into your user functions directory, instead of manually copying and pasting the contents.
  • Open user functions directory this will open your file explorer at the folder where all the Java user functions files are actually stored at the newFASANT installation directory.

When a user function is opened, the following buttons are also available.



Figure 4. User Functions toolbar (right button group).
  • Save user function saves the contents of the user function editor to disk.
  • Rename user function it will ask the user for a new name for this user function file. Note that the names given to the user function files are only relevant to the user as a way for managing the content of the different user function files added to newFASANT. There is no real difference on how the user interface will later execute these functions depending on the name.
  • Delete user function it will ask the user for confirmation, before deleting the selected user function file from the hard disk. This operation cannot be undone. Keep in mind that once an user function is deleted, projects that depend on that user function may behave unexpectedly unless it is created again. User functions are not saved in project files.
  • Undo undo the latest modification made to the editor.
  • Redo redo the latest modification undone.

To open a user function, double click it from the sidebar, or click it on the sidebar and then press the Open User Function button in the toolbar. This will display the file in the editor. The editor can keep multiple files opened at the same time.



Figure 5. The User Functions editor with a few files opened.

You can close a user function by clicking at the Close (X) button on the tab for the user function you want to close. Additionally, you can close the User Functions editor in order to close all the user functions at once and remove the editor from your desktop interface. Note that if you have unsaved changes it will ask for confirmation.



Figure 6. Asking for confirmation before closing the User Functions editor because there are unsaved changes.