APL Code Editor(3.1)
You use the APL Code Editor to create generic APL code, that is, code that can be imported and used by several agents and workflows.
You enter your APL code in the code area. Below the text area there are line, column and position indicators to help you find syntax errors.
Generic Code
You import generic code by adding the following code in the agent code area, using the keyword import
:
import apl.<foldername>.<APL Code configurationname>
If generic code is modified in the APL Code Editor, the change is automatically reflected in all agents that contain this code the next time each workflow is executed.
Note!
Not all functions work in a generic environment, for example, functions related to specific workflows or MIM related functions. This type of functionality must be included in the agent code area instead.
Example - An APL code definition
An APL code definition, saved as MyGenericCode
in the Default
directory, is available to an agent by adding the following into its code area:
import apl.Default.MyGenericCode;
Toolbar
The toolbar includes the following options:
Option | Description |
---|---|
New | Creates a new APL Code configuration in a new tab. You can only create a configuration of the same kind as the one in the tab you are working in. |
Open | Opens a saved configuration that is visible in a new tab. You can only open a configuration of the same kind as the one in the tab you are working in. |
Save | Saves the configuration. After you click Save, a dialog box opens. In the Version Comment text box, you can enter a description of the changes that you have made, then click . |
Save As | Select to save the configuration with a new name. You can only use a-z, A-Z, 0-9, "-" and "_" to name a configuration. After you click Save As, a dialog box opens. You are prompted to select in which folder you want to save the configuration. In the Version Comment text box, you can enter a description of the changes that you have made, then click . |
Permissions | To set the owner of the configuration as well as Read, Write and Execute permissions for the groups accessing the configuration. |
Validate | Compiles the current APL code. The status of the compilation is displayed in a dialog. Upon failure, the erroneous line is highlighted and a message, including the line number, is displayed. |
References | Select to see the listing references to and from the active configuration. The includes the following tabs:
|
Undo | Select this option to undo your last action. |
Redo | Select this option to redo the last action you "undid" with the Undo option. |
Cut | Cuts your selection and copies it to the clipboard. |
Copy | Copies your selection to the clipboard. |
Paste | Pastes the clipboard contents. |
Find | Displays a dialog where you can search for text and, if required, replace it. |
Find Again | Repeats the search for the last string entered in the Find dialog. |
APL Code Editor Assistance
To provide assistance when you are writing code in the APL code area, there are several features in place:
Syntax Highlighting - Different parts of the code are color coded according to type
Right-Click Menu - A menu which provides editor options
Code Completion - Code Completion which helps you to write APL code in the APL Code Editor by providing context-sensitive proposals.
For further information on these features, see APL Code Editor Assistance(3.1).
APL Code Editor Outline
To make it easier to navigate in an APL code configuration, there is an Outline navigation panel to the right of the APL Code Editor.
The APL Code Editor Outline provides a view of all the blocks, variables and methods in an APL code configuration and makes it possible to easily navigate between different types in the APL code. The entries in the navigation panel are automatically updated as you make valid entries in the APL Editor.
You can also filter what you want to display in the Outline navigation panel. You can search for a specific block, variable or method using the free text field, or by selecting one of the quick filter buttons for different types:
b | Click to display or hide the blocks within the APL code configuration displayed in the APL Code Editor. |
v | Click to display or hide the variables within the APL code configuration displayed in the APL Code Editor. |
m | Click to display or hide the methods within the APL code configuration displayed in the APL Code Editor. |
The Outline navigation panel can be hidden or visible. By default, it is visible and all the elements are displayed. To hide or display the navigation panel, click the vertical Outline button to the right of the APL Code Editor.
Configuration Diff Panel
Note!
The Configuration Diff panel is not available for the Analysis agent.
If you want to compare the current version of an APL configuration that you are displaying with a previous version of the same configuration, you can use Configuration Diff to compare the two versions side by side.
To hide or display the Configuration Diff panel, click the vertical Diff button to the right of the APL Code Editor. The panel can be hidden or visible. By default, it is hidden.
You can navigate through the differences by scrolling both panes in parallel using the scroll bar to the right of either pane. If you want to scroll through each pane separately, hover over the pane that you want to scroll through, and use the scroll wheel on your mouse.
If you want to skip through each difference in the panes, you can use the navigation buttons, Previous, Next and Refresh, which are described below.
Item | Description |
---|---|
History | Click the History drop box to select the version to which you want to compare the version currently displayed. You can also display and view encrypted configurations. If you select an encrypted configuration, you are prompted to enter the relevant password to decrypt the configuration. |
Previous | Click this button to skip to the previous difference in the configurations. The previous difference is highlighted in green. |
Next | Click this button to skip to the next difference in the configurations. The next difference is highlighted in green. |
Refresh | Click this button to display the updated version of the configuration. Configurations are not locked when you display them in Configuration Diff. If another user has modified and saved a configuration that you are viewing in this tool, you can click this button to view the latest updated version. |
This section contains the following: