HOCON Configuration File Editor

The HOCON Configuration File Editor is a validating HOCON editor that is aware of the structure that defines the HOCON syntax of StreamBase configuration files. The Editor validates StreamBase's extension of standard HOCON, which itself is an extension of standard JSON.

HOCON Type Chooser

Invoke the HOCON Configuration File Editor in one of the following ways:

  1. From the Project Explorer, double-click an existing .conf file from your project's src/main/configurations or src/test/configurations folder.

  2. From Studio, File>New>StreamBase HOCON Configuration File.

When you use the second method to create a new configuration file, Studio presents a dialog that offers to guide you through the file creation process.

Guide Me tab

Allows you to search by property name to narrow down a list of HOCON types and root objects that support the specified property.

Browse All Types tab

Allows you to choose the HOCON type and root object.

From the Guide Me tab, enter a search string in the search across type and property names field to reduce the list to HOCON types that match that string. For example:

To view a list of every available configuration type, click the Browse All Types tab. Enter a search string in the type filter text field to reduce the list to types that match that string.

Using the HOCON Configuration Editor

Take advantage of the following features while editing your configuration files:

Generate Sample Values

When creating a configuration file, the Editor presents the option to generate every available configuration property for the specified HOCON configuration type. These properties, when generated, include descriptive comments.

Typechecking Support

The Editor typechecks your configuration file as you compose or edit it. The Editor places a red X () marker on the left margin next to lines that fail to pass, and places a red location marker in the scroll bar. Hover the mouse over the red X icon on the left or the location marker on the right to see a text message explaining the error detected. Press F2 to see long error messages wrapped into readable format.

Syntax Color Coding

In Source view, the Editor provides syntax color coding of the HOCON text.

Mouseover Property Description

Place your mouse over a property or object to view a description of it.

Autocompletion

When typing a new property, press Ctrl+Space after the first few letters. The Editor shows its content assistance window with one or more candidates to complete the property. If there is one candidate, press Enter to complete it.

Tag Proposal of Default Properties

Place your cursor after an opening curly brace, then Ctrl+Space. The Editor's content assistance window shows you all the default properties and their values that are valid to enter in the current location. Selecting <defaults> populates the configuration file with the appropriate properties.

TIBCO encourages using the HOCON Configuration File Editor in Studio to edit all configuration files. If you use a different editor, be sure to load the resulting file at least once into Studio's HOCON Configuration File Editor so that your edits can be confirmed as valid.

Note

TIBCO discourages editing a project's HOCON configuration file in another editor outside of Studio while Studio is running. Nevertheless, if you do so, you must perform the following steps in this order:

  1. Refresh the Studio project after such external edits. That is, select the project in the Project Explorer view, right-click, and select Refresh from the context menu (or select the project and press F5).

  2. Refresh the project's typecheck environment. That is, select the project in the Project Explorer view, right-click, and select StreamBase>Refresh Project Typecheck Environment from the context menu (or select the project and press Ctrl+F5).