Update extra identifier sets with a .4id file

Create and import a .4id file to define custom sets of extra identifiers.

About this task

An Extra identifiers set allows you to group a specified list of keywords for the purpose of assigning a color and font for display in Code Editor. For example, if you wanted the terms FOO and BAR to appear using a specific color and/or font, you would add them to a keyword set, then define the style for that keyword set to use the color and font you desire.

Genero BDL provides eight sets of extra identifiers that you can customize, either from within the Genero Studio interface or with a .4id file. This procedure uses a .4id file to specify up to eight extra identifier sets.

  1. Create a .4id file.
    The .4id file is an XML file that defines extra identifier sets.
    <?xml version="1.0" encoding="UTF-8" ?>
    <ExtraIdentifiers [version="version"]>
      <ExtraIdentifiersSet identifiers="identifiers" name="name" set="set">
        [<Style [backgroundColor="bgcolor"] [foregroundColor="fgcolor"]>
          [<Font [family="family"] [size="size"] [bold={"TRUE"|"FALSE"}] [italic={"TRUE"|"FALSE"}]/>]
        </Style>]
      </ExtraIdentifiersSet>
      [...]
    </ExtraIdentifiers>
    where:
    • version is the version number of the .4id file. Set the value to "2" when the file includes the <Style> element. If the value is set to "1", or if the version attribute is not present, then the file is identified as an older format file and the <Style> and <Font> elements were not allowed.
    • identifiers is a space-separated list of identifiers.
    • name is the set name, which can be left empty. If the set name is left empty, a default set name is used.
    • set is the set number, from 1 to 8. There is a maximum of 8 sets of extra identifiers.
    • bgcolor specifies the color to use as the background color. Define the color using the hexadecimal format rrggbb, where rr, gg and bb defines the red, green and blue components of the color.
    • fgcolor specifies the color to use as the foreground color. Define the color using the hexadecimal format rrggbb, where rr, gg and bb defines the red, green and blue components of the color.
    • family is the font family.
    • size is the font size.
    For example, this .4id file creates an extra identifier set that includes the keywords FOO and BAR.
    <ExtraIdentifiers version="2">
      <ExtraIdentifiersSet identifiers="FOO BAR" name="Set A" set="1">
        <Style backgroundColor="ff0000" foregroundColor="00ff00" >
          <Font family="Arial Black" size="18" bold="TRUE" italic="FALSE" />
        </Style>
      </ExtraIdentifiersSet>
    </ExtraIdentifiers>
  2. Import the .4id file into Genero Studio.
    1. Select Tools > Preferences (or, if you are on a Mac, Genero Studio > Preferences).
    2. Navigate to Code Editor > Behavior & Display.
    3. In the Select Genero BDL in the Language combobox.
    4. Select the Language Specific tab.
    5. Check Use custom settings to enable the Extra identifiers section.
    6. Under Extra identifiers, click the Import extra identifiers icon.
    7. Select the .4id file to import.