IBM
Contents Index Previous Next



Preference Files


All of the preference parameters along with their values (exception made for the default settings which are programmed into the tools) are stored on dedicated files, the preference files. The preference files may be edited with any text editor since the information is stored in textual form.

The Preference Manager manages these files and provides a graphical user support for customizing tools in an easy way.

Note:

The TTCN Suite cannot be customized by preferences. Instead, see Customizing the TTCN Suite (on UNIX).

Preference Source

The following files build up the preference environment:

The following items constitute the various sources for preference parameters. The source identifier may be made visible with the Value Sources options in the View Options dialog.

Source Identifier Source Description
[User]

The User's Preference File

[User (No Save)]

The User's Preference File, will be removed from the user's preference file next time the parameters are saved

[Project]

The Project Preference File

[Company]

The Company Preference File

[Locale]

The Locale Preference File

[Default]

The default Factory Settings.

User's Preference File

This file stores the preferences parameters that a user has modified. The file is created / updated as a result of the Save command.

The user's preference file is identified on UNIX by:

$HOME/.sdtpref

and in Windows by:

%HOME%\sdt.ini

Note: $HOME and %HOME%

On UNIX, $HOME is assumed always to be defined in the computer environment.

In Windows, if %HOME% is not set, the user's preferences will be stored in the directory from which SDL Suite and TTCN Suite is started.

Project Preference File

This file stores the preference values that are to be applied to a specific instance of a project where the SDL Suite is used.

The project preference file is identified on UNIX by:

$SDTPREF/.sdtpref

and in Windows by:

%SDTPREF%\sdt.ini

Note: $SDTPREF and %SDTPREF%

If $SDTPREF (on UNIX) or %SDTPREF% (in Windows) is not set, the project preference file feature will be disabled. In a multi-user environment, it is strongly recommended to use a directory resident on a network drive for the project preferences. All project members should have read access to this directory.

Company Preference File

This file stores the preference values that are common for an entire company or organization and therefore should be applied to all projects and users of SDL Suite and TTCN Suite.

The company preference file is identified on UNIX by:

$telelogic/.sdtpref

and in Windows by:

<Installation directory>\sdt.ini

Note:

On UNIX, $telelogic is assumed always to be set in the environment.

In Windows, to function properly (in the sense of being unique) in a multi-user environment, the company preference file should be stored on a directory on a network drive, e.g. if SDL Suite is installed on a network. Also, all users should have read access to the company preference file.

Locale Preference File

This file stores the preference values that are locale dependent and should therefore be applied to all projects and users of the SDL Suite tool.

Factory Settings

These are the settings that are defined by default in the SDL Suite and TTCN Suite tools. The factory settings will be used whenever a preference parameter could not be found in the Preference Files.

Syntax of Preference Files

A line in the preference file contains two items:

  1. The first item specifies a tool and a parameter, separated by an asterisk.
  2. The second item specifies the current value that is to be assigned to that parameter when starting up the tool.

The syntax is:

tool*parameter: value

Example 14 : A Line in Preferences File

An example line in a preferences file could look like this:
Print*Scale:100
Meaning that the scale when printing is 100%.

The order of appearance of the parameters in a file is of no significance.

Search Order When Reading Preference Parameters

This section discusses how the tools read the preference parameters.

When a tool starts, it will automatically (i.e. no user-interaction is required) retrieve the preference values in an incremental way, following the order of search described below and illustrated in Figure 66 and Figure 67:

  1. First, fallback values (default factory settings) are loaded, followed by the locale settings.
  2. Then, if the environment variable SDTPREF is set:
    • If $SDTPREF/.sdtpref (on UNIX), or %SDTPREF%\sdt.ini (in Windows) exists, that file is read incrementally1 as the project preference file.
    • Otherwise, the tools will look for organization preferences in the installation directory, in the file designated by $telelogic/.sdtpref (on UNIX) or <Installation directory>\sdt.ini (in Windows).
  3. Finally, if the HOME environment variable is set, and $HOME/.sdtpref (on UNIX) or %HOME%\sdt.ini (in Windows) exists, that file is read incrementally as the user's preference file.
    • Otherwise, if HOME is not set, the preference file in the directory from which SDL Suite was started is read incrementally as the user's preference file.

The method above allows to configure a tool environment by defining some preferences as company-wide or project-wide, while allowing users to customize other preferences.

Figure 66 :How the tool searches for
preference parameters (on UNIX)

Figure 67 : How the tool searches for
preference parameters (in Windows)

Save of Preference Values

When a preference parameter is saved, it is always stored as a user-defined preference parameter in the user's preference file, i.e. -$HOME/.sdtpref (on UNIX), or %HOME%\sdt.ini (in Windows), if HOME is set. If HOME is not set, the preference parameters are stored in a preference file in the directory from which SDL Suite was started.

The above implies that modifying a parameter that was originally defined as a project or organization parameter, the parameter will from now on be considered as a user-defined parameter. The user is however notified about this (see Figure 61).

1

Incrementally in the sense that only parameters that are stored in the project preference file will override previous settings.


http://www.ibm.com/rational
Contents Index Previous Next