Table of Contents Previous Chapter 30 The Preference Manager

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 Manager Window

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

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)  
       
-----

Node Syntax

Each node in the tree represents either a:

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).

Dirty Notification

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)  
       
-----

Preference-Obeying SDT Tools

The tools for which preferences may be set up are:

The Interface Area

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

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

The File menu looks like this:

Figure 490 : The File Menu 
-----
(fig)  
       
-----
The items on this menu are:

Save

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)  
       
       
-----

Revert

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)  
       
-----

Print

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.

Info

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:

See "Preference Files" on page 1499 for more information on preference files and search order.

Exit

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)  
       
-----

The Edit Menu

The Edit menu looks like this:

Figure 496 : The Edit Menu 
-----
(fig)  
       
-----
The available menu-choices are:

Set Saved Value

This command restores the selected parameter to its currently saved value. The menu choice is also available on the Popup Menu.

Set Default Value

This command restores the selected parameter to its default value (i.e. factory setting). The menu choice is also available on the Popup Menu.

Unsave

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)  
       
-----

The View Menu

The View menu looks like this:

Figure 498 : The File Menu 
-----
(fig)  
       
-----
The menu choices available beneath the View menu are:

Expand

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.

Expand All

This command expands the entire tree, thus making all parameter nodes visible.

The operation is also available on the Popup Menu.

Collapse

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.

Collapse All

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

View Options

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:

Tool Bar

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.

Status Bar

This option determines whether the Status Bar (where messages are displayed) should be visible or not.

The status bar is by default visible.

Filter Field and Filter Button

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.

Tool Names

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.

Saved Values

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.

Default Values

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.

Value Sources

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:

Source values are displayed within brackets [] and are not visible by default.

Descriptions

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.

Apply

Clicking this button applies the settings as currently defined in the dialog. The dialog remains active.

Default

Clicking this button restores all View Options to their default values. The dialog remains active.

Done

Clicking this button closes the View Options dialog.

Set Scale

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 Tools Menu

The Tools menu looks like this:

Figure 501 : The Tools Menu. 
-----
(fig)  
       
-----

Show Organizer

Raises the parent Organizer Main Window.

The Help Menu

The Help command invokes the generic SDT Help Utility. See "The Help Menu" on page 1496 for a description of the functionality.

The Popup Menu

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:

On Root Node

----------------------------
Collapse All  See page 1492.  
Expand All    See page 1492.  
----------------------------

On Tool Node

------------------------
Collapse  See page 1492.  
Expand    See page 1492.  
------------------------

On Value Node

-----------------------------------------------------------
Set Saved Value    See page 1490.                            
Set Default Value  See page 1490.                            
Help               Request on-line help for the preference   
                   parameter in question.                    
-----------------------------------------------------------

Keyboard Accelerators

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                        
-------------------------------------------------------

Preference Files

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.

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                     
[Default]          The default factory settings.                   
-----------------------------------------------------------------

The 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 by:

$HOME/.sdtpref
-------------------------------------------------------------
Note:  $HOME                                                   
$HOME is assumed always to be defined in an UNIX environment.  
-------------------------------------------------------------

The project preference file

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.                                                                
----------------------------------------------------------------------

The company preference file

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.  
--------------------------------------------------------------

factory settings

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.

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 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.

Search order when Reading Preference Parameters

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:

  1. First, fallback values (default factory settings) are loaded.
  2. Then, if the environment variable SDTPREF is set:
  3. 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)  
       
-----

Save of Preference Values

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