Code Completion

Code completion makes it easier to work with BDL. It significantly reduces scripting errors and decreases the need to type text into BDL files by automatically completing functions, variables and constants. There are four code completion options:

Code completion works with both Silk Performer-defined and user-defined BDL files.

To enable code completion, you must name and save new BDL files as either .bdf or .bdh files. Once a BDL file has been saved, code completion recognizes changes you make to it using the BDL Editor and includes all files you reference via BDL use statements.

Note: At all times, with all features of code completion, you are only able to receive information regarding functions, variables and constants that are defined in your local .bdf files, or in the included .bdh files of those files.

Code List

One of the key features of code completion is the code list mechanism, which offers a list of functions, variables, and constants. The code list includes either:

  • The entire list of available functions, variables, and constants
  • Or, a list of functions, variables, and constants that match the characters of the word currently selected in the script

The code list can be manually invoked using Ctrl+Space. The code list is invoked automatically when you type one of the following API prefixes:

Attribute Iiop DB_ Dotnet Ora Pdce
Java Jolt Measure Odbc Web Xml
Set Str Tux Get

When the code list is invoked, a list control with the following behavior displays:

  • If the cursor is not within a word or at the border of a word, the list control is scrolled to the top, and the first item receives focus, but it is not selected.
  • If the cursor is within a word or at the border of a word, the list control is scrolled to the first (selected) item that matches the word, and the item is selected.
  • By pressing the Tab, Space, or Enter key, the currently selected string is inserted into the view. If a string is not selected, the string with the focus is selected.
  • Double-clicking an item in the list inserts the name into the view.

Code Completion

If a word that should be used with the code list feature is unique, the code list will not open when you invoke it via Ctrl+Space, however the full word will be inserted.

In this context, unique means that only one word in the list control matches the partial word in question.

Parameter Info

Parameter info is displayed when you place an opening bracket after a function name in a script. Parameter info can also be invoked manually by pressing Ctrl+I when the cursor is placed between the opening and closing brackets of a function call. Parameter info is displayed as a tool tip that remains visible until (1) the Esc key is hit, (2) a closing bracket is inserted, (3) the arrow keys are used to move outside the brackets, or (4) input focus is set to another control.

Parameter info includes the following for functions:

  • Function name
  • Function parameters with names, types and modifiers (for example, in, out, and allownull)
  • The current parameter is displayed with bold letters and, if available, an additional description
  • Return value type and, if available, a description

Quick Info

Quick info is similar to parameter info except it shows information not only for functions, but also for variables and constants.

Quick info is presented in a form similar to a tool tip when you hold your cursor over a function, variable, or constant name. Quick info tool tips disappear when you move your cursor away.

For functions, available information is the same as with parameter info, with the exception that all parameters are shown with their descriptions rather than only the current parameter.

For variables and constants, only name, data type and optional descriptions are displayed.

Smart Indention

Smart indention is enabled when the Enter key is pressed within a BDL related view and a new line is to be inserted. Upon invocation, it places the cursor at a position that is calculated with respect to the current context (for example, indenting after inserting an initial keyword).