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.
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 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 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 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:
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 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).