Format and Indent

With certain files, you can instruct Code Editor to format and indent the files, based on preferences defined in Genero Studio.

Supported file types

You can format and indent these file types:
  • Genero source files (.4gl). Code Editor offers more than simply formatting and indenting for these files; see Reformat Genero source files for more information.
  • XML files, to include Genero resource files (.4ad, .4tm, .4tb, .4st, and .4sm) and Genero configuration files (.xcf)
  • JSON files (.json)

Run with a file open in Code Editor

With the file open in the Code Editor, select Edit > Format and Indent. The open document is formatted and indented.

Format and indent rules

Genero source files formatting can be set from the Code Beautifier tab, and for the tab size only on the Behavior tab in the Preferences for the Genero language. See Reformat Genero source files for more information.

Default rules govern the indenting and formatting of XML and JSON files, with the following exceptions:
  • XML files can only set the tab size on the Behavior tab in the Preferences page for the XML language.

To modify a setting on the Behavior tab:

  1. Select Tools > Preferences (or, if you are on a Mac, Genero Studio > Preferences).
  2. Select Code Editor > Behavior & Display.
  3. In the Language field, select the language.
  4. Select the Use custom settings check box.
  5. Modify the settings on the Behavior tab.

For more information, see Behavior & Display preferences.