- Index

< Previous |  | Next >

# 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 lets you choose the HOCON type and root object.

Enter a search string in the filter text field to reduce the list to HOCON root objects that match that string. For example:

## Using the HOCON Configuration Editor

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

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