Profiles and Status

From RAD Studio
Jump to: navigation, search

Go Up to Formatter Options


Tools > Options > Language > Formatter > Profiles and Status

In this page you can manage sets of formatter options, enable the source code formatter, and enable the Confirmation prompting message before the formatting commands.


Item Description

Select profile

You can switch between several sets of formatting options used by the source code formatter. Such sets of formatting options are stored in profiles (configuration files). By selecting a profile you activate the set of formatting options stored in this profile.

Configuration files store sets of formatting options. To create a configuration file use the Save As command button. By default, configuration files have the .config extension.

Profiles are a special kind of configuration files. Profiles have the following additional properties:

  • Profiles should match the Formatter_*.config file mask (profile mask).
  • Profiles should be located in the RAD Studio working directory. By default, this is the C:\Users\<username>\AppData\Roaming\Embarcadero\BDS\20.0 directory.
Button Description

Profiles

Click Profiles to show the list of accessible profiles and select a profile. The selected profile name appears in Profiles.
The Profiles list shows only configuration files that match the profile mask (Formatter_*.config) and that are stored in the RAD Studio working directory.
By default, this directory contains the Formatter_Compact.config, Formatter_Default.config, and Formatter_Wide.config profiles.

Sets of formatter options stored in profiles can be treated as formatter profiles.

Apply

Select a profile in the Profiles list and click Apply. This command loads the set of formatting options stored in the selected profile.

Load/Save/Restore profile

You can manage sets of formatting options using the Load and Save As command buttons. You can customize the active set of formatting options and save it in a configuration file using Save As. You can load the set of options (stored in a configuration file) using Load.

Button Description

Load

Click Load to open the Load Formatter Profile dialog box. Use Files of type to set the file mask. The following file masks can be used:

  • Profiles (Formatter_*.config) -- to show only files matching the profile mask.
  • Configuration files (*.config) -- to show only configuration files (files with the .config extension).
  • All files (*.*) -- to show all files.

Browse for the configuration file storing the set of formatting options to load and click Open. The set of formatting options stored in the selected configuration file becomes the active formatting options for the formatter.

By default, in the Load Formatter Profile dialog box:

  • The RAD Studio working directory is selected. By default, this is the C:\Users\<username>\AppData\Roaming\Embarcadero\BDS\20.0 directory.
  • File of type is Profiles (Formatter_*.config).
That is, by default, this dialog box shows only the list of accessible profiles.

Save As

Clicking Save As opens the Save Formatter Profile dialog box.

Save Formatter Profile has the following defaults:

  • The RAD Studio working directory is selected.
  • Save as type is Profiles (Formatter_*.config).
That is, by default, this dialog box suggests you to save the current set of formatting options in a configuration file that matches the profile requirements. If you create a new profile, then its name appears in the profile list in Profiles.

Restore defaults

The Restore defaults command button restores all default profiles from the standard configuration files stored in the RAD Studio installation directory.

The source code formatter has several predefined sets of formatting options stored in the default configuration files. By default, these are the Formatter_Compact.config, Formatter_Default.config, and Formatter_Wide.config files stored in the the RAD Studio installation directory. By default, this is the C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\config directory.

Attention! We recommend that you do not modify these default configuration files.

When you click Profiles to open the profiles list, the formatter checks whether the default profiles Formatter_Compact.config, Formatter_Default.config, and Formatter_Wide.config exist in the RAD Studio working directory. If any of these files is absent, then the formatter copies this file from the RAD Studio installation directory. Thus absent default profiles are restored from the default configuration files with the predefined sets of formatting options.

Formatter Status

Options in this group define the formatter behavior:

Check box Description

Enable Formatter

Select this option to enable the formatter. If this option is unselected, then all menu commands responsible for the formatting of source code files (the Format Source and Format Project Sources commands) become hidden and inaccessible.

Show Confirmation

When selected, the Confirmation prompting message appears each time you try to run any formatting command.


See Also