Features
The BBj Language Server provides a comprehensive set of features to enhance your BBj development experience in VS Code.
Code Completion
Get intelligent suggestions as you type:
- BBj Keywords: All BBj verbs and statements
- Built-in Functions: Complete list of BBj functions with documentation
- Variables: Global and local variable suggestions
- Java Classes: Full Java class, method, and field completions
- Snippets: Common code patterns and templates
Completion Triggers
Completions automatically appear when:
- Typing after a dot (
.) for method/field access - Starting a new statement
- Inside function parameters
- After
usestatements for class imports
Syntax Highlighting
Rich semantic highlighting for:
- Keywords and verbs
- String literals and numbers
- Comments (single-line and multi-line)
- Class and method names
- Variable references
- Labels and line numbers
Validation and Diagnostics
Real-time error detection:
- Syntax Errors: Invalid BBj syntax
- Undefined References: Missing variables, labels, or classes
- Access Violations: Incorrect access to class members
- Type Mismatches: Incompatible type operations
Errors appear as you type with detailed messages and quick fixes where available.
Live Compiler Diagnostics
With BBj 26.03 or later, the BBj compiler's own parser checks the currently open file as you
type, and its syntax errors appear in the editor without saving — the same errors bbjcpl would
report on save, shown earlier.
The bbj.compiler.trigger setting controls when these compiler checks run:
debounced— the default; checks about 500 ms after you stop typing, and when you open or save a file. The delay is fixed and cannot be configured.on-save— checks only when you open or save a file. Typing runs no compiler work; lines you type or change are checked by the language server's own diagnostics instead. The last check's errors stay visible on their lines while you edit, until the next save replaces them.off— no compiler checks at all; only the language server's own checks remain. The Compile BBj Program command still works.
If files.autoSave is afterDelay, each auto-save counts as a save, so on-save then checks
about as often as debounced.
With an earlier BBj, or when BBjServices is not running, bbjcpl compiles the saved file instead
after the same pause, so its errors reflect the last save.
Changing the setting takes effect immediately, without restarting.
Use on-save in large workspaces.
Hover Information
Hover over elements to see:
- Functions: Parameter signatures and documentation
- Variables: Type information
- Classes: Java class documentation (JavaDoc)
- Methods: Method signatures with parameter names
Code Navigation
Go to Definition
F12orCtrl+Clickto jump to definitions- Works for classes, methods, variables, labels, and the program file named in a
RUNorCALLstatement - Hovering that file name shows its resolved file-system path
- Supports cross-file navigation
Find All References
Shift+F12to find all usages- Useful for refactoring and understanding code
Document Symbols
Ctrl+Shift+Oto list all symbols in the file- Quick navigation within large files
- Shows classes, methods, variables, and labels
Code Formatting
Format Document, Format Selection and format on save run through the BBj language server and are controlled by 15 settings. Denumber removes the line numbers from a line-numbered program. See Formatting for the details.
Developer Commands
Run Commands
| Command | Shortcut | Description |
|---|---|---|
| Run As BBj Program | Alt+G | Run program in BBj GUI mode |
| Run As BUI Program | Alt+B | Run program as BUI web application |
| Run As DWC Program | Alt+D | Run program as DWC application |
Build Commands
| Command | Shortcut | Description |
|---|---|---|
| Compile BBj Program | Alt+C | Compile BBj program to bytecode |
| Denumber BBj Program | Alt+N | Remove line numbers from program |
Configuration Commands
- Show the Active Config File: Open the active BBj configuration file
- Show the BBj.properties file: Open BBj properties file
- Open Enterprise Manager: Launch the EM web interface
- Show Available Classpath Entries: Display available classpath entries
Java Integration
Seamless integration with Java classes:
- Class Completions: All classes from configured classpath
- Method Signatures: Full parameter information
- Field Access: Public field completions
- JavaDoc: Documentation from Java sources
- Import Suggestions: Automatic
usestatement suggestions
Snippets
Built-in code snippets for common patterns:
- Comment blocks
- Routine definitions
- Interface declarations
- Boolean constants (
BBjAPI.TRUE/BBjAPI.FALSE) - Control structures
Access snippets by typing the prefix and pressing Tab.
File Support
The extension supports multiple BBj file types:
| Extension | Description |
|---|---|
.bbj | BBj source files |
.bbjt | BBj template files |
.src | BBj source files (legacy) |
.bbx | BBx program files |
config.bbx, config.min | BBj/BBx configuration files (dedicated config syntax highlighting) |
Note:
.bbl(BBj library) files are not supported by the extension. They are excluded from workspace indexing and do not receive language features.
Workspace Features
- Multi-file Support: Cross-file references and navigation
- Class Indexing: Automatic indexing of class definitions
- Import Resolution: Resolve imports across workspace
- Symbol Search: Workspace-wide symbol search
Auto-Save
Configure automatic saving before running programs:
{
"bbj.web.AutoSaveUponRun": true
}