Table of Contents Previous Chapter 30 The Preference Manager
The Preference Manager is used for setting up the default behavior of the SDT tools.
This chapter is a reference to the Preference Manager; the functionality it provides, its menus, windows and symbols and a description of the preference parameters.
For a guide to how to use the Preference Manager to customize the behavior of the SDT tools, see chapter 5, Managing Preferences.
The Preferences Window looks like this:
Figure 486 : The Preference Manager Window.
-----
(fig)
-----
The items that build up the Preferences window will now be discussed in detail:
The tree area displays the SDT tools that obey to the preference mechanism in SDT and their respective preference parameters. The notation uses a graphical approach featuring a tree with icons symbolizing the various items that are managed by the tool.
Figure 487 : Node in the Tree Area.
-----
(fig)
-----
Each node in the tree represents either a:
- root node
The root node is identified by the name SDT Preference Manager, followed by a version number.
- tool node
A tool node is identified by the name of an SDT tool
- parameter node
Each parameter node in the tree is identified with an icon showing:
- the name of the parameter
- the current value for the parameter
- the saved value and the default value within one or two parentheses: (())
- the Preference Source within brackets, [], i.e. whether it is a company or project or user-defined setting
- a descriptive text providing additional information about the preference parameter.
Example 34 : A Line in the Preferences Window
Given the following line in the Preferences window, with all View Options turned "on":
Figure 488 : A Line in the Preferences Window.
-----
(fig)
-----
The information on the line in Figure 488 should be interpreted as:
---------------------------------------------------------------
Item Interpretation
---------------------------------------------------------------
(fig) The icon informing that the preference
parameter is a boolean parameter (0/1,
false/true or off/on parameter.
Editor*SymbolMenu The name of the preference parameter,
consisting of
· the name of the tool it affects,
Editor
· the name of the parameter,
SymbolMenu
Separated with an asterisk
off The current value for the parameter.
(off) The saved value for the parameter.
((on)) The default value for the parameter.
[User] The parameter's source, in this case the
parameter is defined by the user.
Show the symbol menu The parameter's description, i.e. what
tool property the parameter affects.
---------------------------------------------------------------
The tree is a visualization of the merged preference parameters, supplied from different sources (see "Search order when Reading Preference Parameters" on page 1501), as the SDT tools will perceive them. Furthermore, each node in the tree can be collapsed or expanded (see "Collapse" on page 1492) in order to reduce or extend the amount of information that is visible, thus facilitating the work with the tool. It is also possible to filter the information that is displayed with respect to various View Options (see page 1493).
When a preference parameter is modified but not saved, this is indicated by the icon appearance changing from a light color to a gray pattern. The parent tool node and the root node are also marked as dirty when any parameter is changed.
Figure 489 : Nodes Marked as Dirty.
-----
(fig)
-----
The tools for which preferences may be set up are:
The interface section located under the tree view is where values are edited in an Edit Area. The type of Edit Area varies with the type of value selected.
There are six types of preference parameters:
Selecting a parameter and editing its value with the provided UI device changes its value. The parameter's icon is set as dirty (see "Dirty Notification" on page 1483).
The Menu bar contains the following menus:
Some of the menu-choices available beneath the pull-down menus are also available in Popup Menu and / or Quick Buttons.
The File menu looks like this:
Figure 490 : The File Menu
-----
(fig)
-----
The items on this menu are:
This menu choice saves the parameters that have been modified in the user's preference file, $HOME/.sdtpref
But, before saving the preference settings, SDT will warn the user if he has modified preferences that are defined as company or project preferences:
Figure 491 : Attempting to Save a Modified Project or Organization Parameter
-----
(fig)
-----
The menu choice reverts all preference parameters to the currently saved values, as they were defined when starting the Preference Manager. The Revert command requires to be confirmed, in case any preference parameters are modified and have not been saved:
Figure 492 : The Confirm to Revert Dialog.
-----
(fig)
-----
- Clicking Revert confirms the operation
- Clicking Cancel cancels the operation.
Allows to print the Tree Area, showing the tools and their current preference settings. Only nodes that are expanded will be included in the printout. The Print dialog is issued upon activation of this menu choice:
Figure 493 : The Print Dialog.
-----
(fig)
-----
See also "Document" on page 1448 and "Destination" on page 1452 for a description of the various print options that are supported.
This menu choice issues a message with information about the Preference Source for the preference parameters.
Figure 494 : Information about Preference Sources.
-----
(fig)
-----
The message shows three items:
- [Company] - <file specifier>
The location of the company / organization preference file
- [Project] - <file specifier>
The location of the project preference file
- [User] - <file specifier>
The location of the user's preference file.
See "Preference Files" on page 1499 for more information on preference files and search order.
This menu choice closes the Preferences window and exits the Preference Manager.
If there are any parameter values that are modified but not saved, the tool prompts to save the changes.
Figure 495 : The Save Preferences at Exit Dialog.
-----
(fig)
-----
- Clicking Save in the dialog box first saves the preference parameters, then exits the Preference Manager.
- Clicking No Save, the Preference Manager will be exited without saving the changes.
- Clicking Cancel simply cancels the Exit command without doing anything and returns control to the tool.
The Edit menu looks like this:
Figure 496 : The Edit Menu
-----
(fig)
-----
The available menu-choices are:
This command restores the selected parameter to its currently saved value. The menu choice is also available on the Popup Menu.
This command restores the selected parameter to its default value (i.e. factory setting). The menu choice is also available on the Popup Menu.
This command allows to remove a preference parameter from the user's preference file when saving the file, i.e. Unsave it. The command is available on user-defined parameters only; user-defined parameters are shown with their Value Sources set to [User].
A dialog is displayed following invocation of the command:
Figure 497 : The Unsave Dialog.
-----
(fig)
-----
- Clicking OK, the parameter's source changes to [User (No Save)]. The preference parameter will be removed from the user's preference after the next Save command, changing its source to [Project] or [Company].
- Clicking Cancel, control is returned to the Preference Manager without
The View menu looks like this:
Figure 498 : The File Menu
-----
(fig)
-----
The menu choices available beneath the View menu are:
This menu choice is available only if the currently selected object is a tool node. The command expands the subtree starting from the selected tool, making all parameters for that tool visible.
The operation is also available on the Popup Menu and with a double-click.
This command expands the entire tree, thus making all parameter nodes visible.
The operation is also available on the Popup Menu.
This menu choice is available only if the currently selected object is a tool node. The command collapses the parameter nodes belonging to the current tool, leaving only the tool node visible in the subtree.
The operation is also available on the Popup Menu and with a double-click.
This menu choice collapses all tool nodes and hides the parameter nodes. Only the root node and the tool nodes are left visible.
The operation is also available on the Popup Menu
This menu choice issues a modeless dialog, the View Options dialog:
Figure 499 : The View Options Dialog.
-----
(fig)
-----
The dialog contains the following toggle buttons:
and the following push buttons:
This button controls the presence of the Quick Buttons (see page 1035) which features a number of handy quick buttons.
The tool bar is visible by default.
This option determines whether the Status Bar (where messages are displayed) should be visible or not.
The status bar is by default visible.
If the Filter Button is on, the Tree Area will only show the preference parameters which name contain the text string that is entered in the Filter Field.
---------------------------------------------------------------------
Note:
The name of a preference parameter consists of a combination of a
tool name and of the parameter itself (see "Syntax of Preference
Files" on page 1500).
The filter option compares the text strings without respect to upper
or lower case characters.
---------------------------------------------------------------------
By default, no filtering is applied.
This option controls whether the prefix in preference parameters (consisting of the tool name and of an asterisk) should be displayed or not (see "Syntax of Preference Files" on page 1500).
Tool names are not displayed by default.
This option determines whether the saved values should be made visible or not. The saved values are the values that are currently stored on the preference files.
Saved values are displayed within one level of parentheses (saved value). See Example 34 on page 1482.
Saved values are displayed by default.
This option determines whether the default values (i.e. factory settings) should be made visible or not. The factory settings are burnt-in in the SDT tools.
Default values are displayed within two levels of parentheses ((default value)). See Example 34 on page 1482.
Default values are not displayed by default.
This option determines whether the the Preference Source for the parameters should be displayed or not. A preference parameter may be retrieved from any of the following sources:
- The company settings
- The project settings
- The user's own settings.
Source values are displayed within brackets [] and are not visible by default.
This option determines whether an informative text should be displayed or not. The text is purely informational and provides an additional description of the function of the preference parameter. See Example 34 on page 1482.
Parameter descriptions are not displayed by default.
Clicking this button applies the settings as currently defined in the dialog. The dialog remains active.
Clicking this button restores all View Options to their default values. The dialog remains active.
Clicking this button closes the View Options dialog.
This menu choice sets the scale used in the Preferences window.
The scale is set using a modal dialog:
Figure 500 : The Set Scale Dialog.
-----
(fig)
-----
- The scale may be set between 20% and 800% by using the slider. 100% is the default.
- Dragging the slider performs coarse scale adjustments
- Clicking left or right on the slide bar adjusts the scale in steps of 1% for each click.
- Clicking Set changes the scale and brings down the dialog.
- Clicking Cancel closes the dialog without changing the scale.
The Tools menu looks like this:
Figure 501 : The Tools Menu.
-----
(fig)
-----
Raises the parent Organizer Main Window.
The Help command invokes the generic SDT Help Utility. See "The Help Menu" on page 1496 for a description of the functionality.
This section describes popup menus for different types of icons. The popup menu appears upon operation of the right mouse button. Its contents vary with the kind of node activated:
----------------------------
Collapse All See page 1492.
Expand All See page 1492.
----------------------------
------------------------
Collapse See page 1492.
Expand See page 1492.
------------------------
-----------------------------------------------------------
Set Saved Value See page 1490.
Set Default Value See page 1490.
Help Request on-line help for the preference
parameter in question.
-----------------------------------------------------------
Apart from the general keyboard accelerators, as described in "Accelerators and Mnemonics" on page 1048, the following accelerators can be used in the References window:
-------------------------------------------------------
Accelerator Operation
-------------------------------------------------------
Arrow Up Move selection up among the expanded nodes
Arrow Down Move selection down among the expanded
nodes
Page Up Scroll up
Page Down Scroll down
Home Scroll left
End Scroll right
Ctrl-Home Display first line
Ctrl-End Display last line
Space or Expand or Collapse node (see page 1492)
Return Traverse through option menu.
Toggle parameters on/off.
F2 Raise the Popup Menu
-------------------------------------------------------
All of the preference parameters along with their values (exception made for the default settings which are programmed into the SDT 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 Tool manages these files and provides the graphical user support for customizing SDT in an easy way.
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
[Default] The default factory settings.
-----------------------------------------------------------------
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 by:
$HOME/.sdtpref
-------------------------------------------------------------
Note: $HOME
$HOME is assumed always to be defined in an UNIX environment.
-------------------------------------------------------------
This file stores the preferences values that are to be applied to a specific instance of a project where SDT is used.
The project preference file is identified by:
$SDTPREF/.sdtpref
----------------------------------------------------------------------
Note: $SDTPREF
$SDTPREF, if not set, will simply disable the project preference file
feature.
----------------------------------------------------------------------
This file stores the preference values that are common for en entire company or organization and therefore should be applied to all projects and users of SDT.
The company preference file is identified by:
$sdtrelease/.sdtpref
--------------------------------------------------------------
Note: $sdtrelease
$sdtrelease is assumed always to be set in an SDT environment.
--------------------------------------------------------------
These are the settings that are defined by default in the SDT Tools. The factory settings will be used whenever a preference parameter could not be found in the Preference Files.
A line in the preference file contains two items:
- The first item specifies a tool and a parameter, separated by an asterisk.
- 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 35 : 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.
This section discusses how SDT reads the preference parameters.
When an SDT 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 502:
- First, fallback values (default factory settings) are loaded.
- Then, if the environment variable SDTPREF is set:
- If $SDTPREF/.sdtpref exists, that file is read incrementally(1) as the project preference file.
- Otherwise, SDT will look for organization preferences in the SDT installation directory, in the file designated by $sdtrelease/.sdtpref
- Finally, if the $HOME environment variable is set, and $HOME/.sdtpref exists, that file is read incrementally as the user's preference file.
The method above allows to configure an SDT environment by defining some preferences as company-wide or project-wide, while allowing users to customize other preferences.
Figure 502 : How SDT Searches for Preference Parameters.
-----
(fig)
-----
When a preference parameter is saved, it will be stored as an user-defined preference parameter in the user's preference file, i.e. $HOME/.sdtpref
The above implies modifying a parameter that was originally defined as a project or organization parameter, it will be from now on be considered as an user-defined parameter. The user is however be notified about this (see Figure 491 on page 1487).
Footnotes
- (1)
- Incrementally in the sense that only parameters that are stored in the file project preference file will override previous settings.
Table of Contents Next Chapter