Font size

Code completion master

AnyLogic supports intelli-sense mechanism. This significantly simplifies typing code since you do not need to type the whole names of functions, variables, and parameters. You can use the intelli-sense wizard to insert a variable name or a call of a function.

The wizard looks as a list, containing variables, parameters, and functions. You can simply select the name in the list, and it will be inserted in the expression automatically.

To insert a name using the code completion master

  1. Move cursor at the position where you want to place the element's name.
  2. Press Ctrl + Space (Mac OS: Option + Space). The wizard listing all model variables and predefined functions appears.

    Intelli-sense wizard

  3. Scroll to the name you want to add, or type the first letters of the name until it becomes visible in the list.
  4. Select the name by clicking. The wizard displays the detailed description of the selected object in the popup text box.
  5. Double-click the name to insert it into the equation expression.
Optionally you can change the key combination that invokes code completion in AnyLogic preferences dialog, on the Key combinations page.

Some tips for using code completion

  • You can use the mouse or the keyboard (Up Arrow, Down Arrow, Page Up, Page Down, Home, End, Enter) to navigate and select lines in the list.
  • If you select a line in the content assist list, you can view Javadoc description for that line in the window opened to the right.
  • Clicking or pressing Enter on a selected line in the list inserts the selection into the editor.
  • You can access specialized content assist features inside Javadoc comments.
How can we improve this article?