Visual Studio Code (VS Code) Extension Overview (Preview Feature)

Description

VS Code is a lightweight code editor made by Microsoft. It allows you to install third-party extensions to customize your programming environment. For BBj 25.00 and higher, the BBj Language Server project provides a language server and VS Code extension for the BBj language. You can install the BASIS extension from the Visual Studio Code Marketplace to run BBj code from the VS Code editor in the GUI, BUI, or DWC clients, all with a click of a button.

Work in Progress:

This feature is still a work in progress, so some sections may be incomplete or subject to change. BASIS would appreciate your feedback about this feature. Please see bbj-language-server issues for issue tracking.

Getting Started

To get started, ensure that you have Visual Studio Code installed. If you don’t have it yet, follow the instructions at Setting up Visual Studio Code. Then, install the BBj Programming Language Support extension. To install the extension in VS Code, click the Extensions(Extensions) icon, search for “BBj Programming Language Support” by BASIS International Ltd., and then click the [Install] button.

Note:

Since the extension is only available as a Pre-Release version, you’ll see the following message:

Click [Install Pre-Release] to continue.

VS Code Configuration

After installing the BBj Programming Language Support VS Code extension, configure it with the following steps:

  1. Click the Manage(Manage) icon. This is where the [Install] was before installing the extension:

  2. Select Settings

  3. Scroll down to "Bbj: Home"

  4. Click "Edit in settings.json"

  5. Set the following value for "bbj.home" to the file path to the BBj Home directory, <bbjhome>

  6. Save changes

  7. Repeat steps 3-6 to set up your EM Account using the following:

    Setting Name Key Value
    Bbj > Web: Username "bbj.web.username" Your EM username
    Bbj > Web: Password "bbj.web.password" Your EM password

BBj Language Server

The BBj Language Server helps the VS Code extension with BBj syntax highlighting, code completion, and code descriptions. To install it, simply mark the “BBj Language Server” checkbox on the Feature Selection screen of the BBj Installer:

BBj Language Server Configuration

The BBj Language Server comes pre-configured, but you have the option to customize the settings in EM > BBjServices > Server:

Configuration Description

Start

When checked, the BBj Language Server will start when BBjServices starts.

Hostname

This is the IP address or hostname on which the server machine accepts connections from clients. An address of 0.0.0.0 accepts connections on any IP address that the server supports. An address of 127.0.0.1 (localhost) only allows server access from that machine.

Port

This is the port this server listens on for connections. By default, it is 5008.

Note:

After configuring the BBj Language Server, save the changes and restart BBjServices.

Running BBj Programs

With the BBj Programming Language Support extension installed, the VS Code editor displays three icons in the top right when a .bbj file is open:

Icon Action Keyboard Shortcut
Run the program in the GUI client. Alt + G
Run the program in the BUI client. Alt + B
Run the program in the DWC client. Alt + D

Upgrading from Previous Extension

If you were using the previous extension called “BBj Language Support”, take these actions:

Uninstall BBj Language Support

  1. Open the ExtensionsExtensions panel for BBj Language Support

  2. Click the Manage(Manage) icon

  3. Select Uninstall

Remove the vscode Classpath

  1. Go to EM > BBjServices > Java Settings

  2. Click the Classpath tab

  3. Select the vscode classpath

  4. Click the Remove Claspath(Remove Classpath) icon

Remove the vscode Scheduled Task Group

  1. Go to EM > BBjServices > Scheduling

  2. Select the vscode task group

  3. Click the Remove Task Group(Remove Task Group) icon

Feedback:

BASIS would appreciate your feedback about this feature. Please see bbj-language-server issues for issue tracking.

See Also