Table of Contents Previous Chapter 22 The SDT Organizer

22 The SDT Organizer

Organizer Log Window

The Organizer Log window works as a console for the SDT-3 system. The window could be active (raised or iconified) or inactive. All log information is put in this window independently of whether the window is active or inactive.

The window is used in the following situations:

The window is opened or raised when the menu choice Organizer Log is selected from the Tools Menu, or when something is written in the log. The preference ShowLogLevel controls which output to the window should cause a raise (see chapter 30, The Preference Manager).

There is only one Organizer Log window. The Organizer is not locked by the Organizer Log window.

The Organizer Log window is a sub window to the Organizer's Main window. The general characteristics of such a window are described in the chapter "The SDT Graphical User Interface" on page 1021.

Figure 256 : The Organizer Log Window. 
-----
(fig)  
       
-----

Quick Buttons

The following quick buttons are special to the Organizer Log window. The general quick buttons are described in "Quick Buttons" on page 1035.

----------------------------------------------------------------------------
(fig)  Close                                                                  
       Exactly the same as Close in the File menu; see "Close" on page 1137.  
(fig)  Show Error                                                             
       Exactly the same as Show Error in the View menu; see "Show Error"      
       on page 1138.                                                          
(fig)  Help on Error                                                          
       Exactly the same as Help on Error in the View menu; see "Help on       
       Error" on page 1138.                                                   
----------------------------------------------------------------------------

The File Menu

Figure 257 : The File Menu. 
-----
(fig)  
       
-----

Open

This menu choice opens an existing organizer log file from the Organizer. The Open dialog is a standard file selection dialog, with the filter set to *.log.

Save

This menu choice saves the information in the Organizer Log window in a file.

The Save dialog is a standard file selection dialog with the same filter as in the Open menu choice above.

Close

This menu choice closes the Organizer Log window. The user is not prompted whether to save the contents in the window. The information in the window is lost.

The Edit Menu

Figure 258 : The Edit Menu. 
-----
(fig)  
       
-----

Copy

This menu choice copies the selected text to the clipboard buffer.

Select All

This menu choice selects all text in the Organizer Log window.

Clear Log

This menu choice clears all text in the Organizer Log window.

The Tools Menu

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

Show Error

This menu choice opens an SDL Editor and shows the diagram symbol that corresponds to a selected error/warning. If no text in the log is selected, the menu choice operates on the first error/warning in the log, which becomes selected. If this menu choice is invoked several times without changing the selection manually, the selection is updated automatically to point to the next error/warning before opening the SDL Editor and selecting the corresponding symbol.

Help on Error

This menu choice activates the Help tool on the selected error/warning or the next found error/warning. The selection is not updated automatically when selecting this command repeated times (as opposed to Show Error, above).

Show Organizer

This menu choice raises the Organizer's Main window.

The Text Viewer Window

The Text Viewer window is used for viewing text files, such as SDL PR or C files. It is not possible to edit the files using the Text Viewer.

The window is opened or raised in the following cases:

There is only one Text Viewer window. The Organizer is not locked by the Text Viewer window.

The Text Viewer window is a sub window to the Organizer's Main window. The general characteristics of such a window are described in the chapter "The SDT Graphical User Interface" on page 1021.

Figure 260 : The Text Viewer Window. 
-----
(fig)  
       
-----

The File Menu

Figure 261 : The File Menu. 
-----
(fig)  
       
-----

Open

This menu choice opens an existing text file. The Open dialog is a Standard File Selection Dialog, with the filter set to *.txt.

Close

This menu choice closes the Text Viewer window.

The Edit Menu

Figure 262 : The Edit Menu. 
-----
(fig)  
       
-----

Copy

This menu choice copies the selected text to the clipboard buffer.

Select All

This menu choice selects all text in the Text Viewer window.

Go To Line

This menu choice moves the text cursor and focus to a certain line number in the file. The line number is specified in the following dialog:

Figure 263 : The Go To Line Dialog. 
-----
(fig)  
       
-----

The Tools Menu

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

Show Organizer

This menu choice raises the Organizer's Main window.

The System File

The Organizer maintains a system file that contains a description of all files that are included in the system, together with all settings the user has made to this particular system. The default file suffix for a system file is .sdt.

Contents of the System File

The contents of the system file summarizes the information that the Organizer manages:

The system file may contain a mapping between disk drive names in MS-DOS and directory paths on Unix to allow the system to be accessed on both platforms. See "MS-DOS and Unix File Compatibility" on page 1152 for more information.

A number of options are also stored in the system file, but only if they differ from the values in the preference file:

Format of the System File

The system file is a line-oriented, human-readable text file. The system file is divided into sections that may appear in any order. Each section contains lines formatted in the same way. Any lines before the first section are skipped.

-------------------------------------------------------------------
Caution!                                                             
The sections that describe the diagram and document structure        
should not be modified by the human unless absolutely necessary.     
Modifying these sections in a such a way that errors or inconsisten  
cies are introduced may corrupt the system file.                     
-------------------------------------------------------------------
The file has the following format:

<file> ::= SDT-SYSTEM-3.0 (<drives> | $) (<dir> | $)
           (<diagram> | $) (<document> | $) (<view> | $)
           (<analys> | $)(<make> | $) (print | $)
<drives> ::= [DRIVES] <drive>*
<drive> ::= <drive spec> <directory>
<diagram> ::= [DIAGRAMS] <dia>*
<dia> ::= <indent> <type> <name>
          (<path> | <fileName> | Unconnected)
          <isSeparate> <timeStamp> <separateName> 
<documents> ::= [DOCUMENTS] <doc>*
<doc>::=<refDiagram> <type> <name> (<path>|Unconnected)
<dir> ::= [SOURCE-TARGET-DIRECTORY] <option>*
<view> ::= [VIEWOPTIONS] <option>*
<analys> ::= [ANALYSEROPTIONS] <option>*
<make> ::= [MAKEOPTIONS] <option>*
<print> ::= [PRINTOPTIONS] <option>*
<drive spec> ::= <string>
The drive letter of a disk on a PC, including the colon, e.g. C:
<directory> ::= <string>
A Unix directory path corresponding to the <drive spec>.
<indent> ::= <int>
The indentation level. 0 is root.
<type> ::= <int>
Type of diagram or document. If the diagram has some kind of virtuality, the value is factored with a number with the base 100. The value correspond to the kind of virtuality. These numbers correspond to an enumerated value found in the file sdt.h.
<name> ::= <string>
Logical name of diagram or document.
<path> ::= <string>
File path including a directory.
<fileName> ::= <string>
File name.
<isSeparate> ::= <bool>
If true (1), this unit is separately generated.
<timeStamp> ::= <quoted string> 
Last time analyzed. Only applicable for units separately analyzed. Otherwise set to an empty string ("").
<separateName> ::= <string>
Name of separation. Only applicable for units separately analyzed.
<refDiagram> ::= <int>
The value indexes a diagram in the diagram section. This value then identifies this document to be an associated document to the indexed diagram.
<option> ::= (<option-name> = <option-value>)
<option-name> ::= <string>
Any option found in the named dialogs.
<option-value> ::= <string>
Any valid value bound to an option.
If a section is missing entirely from the system file a warning will be logged. If no recognizable sections could be found, the file is a not valid system file.

When loading system files, warnings will be registered in the Organizer Log window if any non-recognized option is encountered, but not if an option was never initialized.

The Drives Section

The purpose of the DRIVES section in the system file is to achieve file compatibility between Unix and MS-DOS systems. It specifies the drive table; a mapping between MS-DOS disk drive names and the beginning of corresponding Unix directory paths. Whether or not the mapping in the DRIVES section will be used in SDT is determined by the platform mode. See "MS-DOS and Unix File Compatibility" on page 1152 for more information.

The DRIVES section is only actively used when the mode is mixed, but it is preserved by the Organizer when the mode is not mixed.

The format of directory paths stored in the system file depends on the platform mode. In mixed mode, paths are stored in normal Unix format, i.e. starting with a slash `/' and directories separated by slashes. Otherwise, the path format of the current platform is used: Unix path names on Unix systems, and MS-DOS path names on PC systems (i.e. starting with a disk drive letter "x:" and directories separated by backslashes `\').

-----------------------------------------------------------------
Note:                                                              
Changing the preference MixedPlatform will not affect the format   
of paths in the system file until SDT is restarted.                
-----------------------------------------------------------------
When the mode is not mixed, the file specifications read from a system file must be in the correct format according to the current platform. Diagrams with file specifications that are of incorrect format are marked as Invalid in the Organizer.

When the mode is mixed, the behavior depends on the current platform:

Example   
The DRIVES section of the system file looks like this:

[DRIVES]
i:  /home/user
The file specification /home/user/mydir/a.ssy in the system file is converted to i:\mydir\a.ssy. The file specification
/usr/local/dir/a.ssy is converted to \usr\local\dir\a.ssy. Since no disk drive name could be matched, the file will not be found and the diagram will be marked as Invalid in the Organizer.

  
When the system file is saved in mixed mode, a check is made that all paths written into the system file has a corresponding entry in the disk drive mapping; see the note on page 1072.

Options in the System File

A number of sections contain options for the Organizer, representing values that can be set in the Organizer dialogs. If an option in the file is not recognized by the Organizer, it will be ignored, and if an option is not included in the file, a default preference value will be used. A few of the options have no corresponding preference in SDT.

The following tables lists the Organizer options that are saved in the system file. The user should not normally need to know or change these options in the system file. However, when running SDT in batch mode, it may be useful to change some options by editing a system file to be submitted as input to sdtbatch. See "SDT Batch Facilities" on page 1150 for more information.

The options must appear in the correct section of the system file, but the ordering of options within a section is not important. The options are stored in the system file according to the format:

NameOfOption=Value
The option names and option values are case insensitive.

Possible and allowed values are not specified; the user should run the Preference Manager in order to obtain a reference to the permitted values.

SOURCE-TARGET-DIRECTORY Section

----------------------------------------------------
Option           Default   Corresponding Preference   
----------------------------------------------------
AbsolutePath     true      Organizer*AbsolutePath     
SourceDirectory  ""        Organizer*SourceDirectory  
TargetDirectory  ""        Organizer*TargetDirectory  
----------------------------------------------------

VIEWOPTIONS Section

------------------------------------------------------
Option              Default   Corresponding Preference  
------------------------------------------------------
Scale               100       SDT*Scale                 
ShowToolBar         true      Organizer*Toolbar         
ShowStatusBar       true      Organizer*Statusbar       
TreeRepresentation  List      Organizer*
TreeRepresentation ShowLongMenus true Organizer*
ShowLongMenus ShowDiagrams true Organizer*ShowDiagrams ShowDocuments true Organizer*ShowDocuments ShowTypeName false Organizer*ShowTypeName ShowVirtuality true Organizer*ShowVirtuality ShowFileName false Organizer*ShowFileName ShowDirectories false Organizer*
ShowDirectories ShowInstances true Organizer*ShowInstances ShowDashed true Organizer*ShowDashed ShowPages false Organizer*ShowPages ShowLinks true Organizer*ShowLinks ShowSeparators false Organizer*ShowSeparators ------------------------------------------------------

ANALYZEROPTIONS Section

-----------------------------------------------------
Option            Default   Corresponding Preference   
-----------------------------------------------------
MacroExpansion    false     Organizer*
MacroExpansion SyntaxControl true Organizer*SyntaxControl SemanticControl true Organizer*
SemanticControl OutputControl true Organizer*OutputControl UsageControl true Organizer*UsageControl ReferenceControl true Organizer*
ReferenceControl ErrorLimit 30 Organizer*ErrorLimit ExpressionLimit 0 Organizer*ExpressionLimit SystemInstance "" Organizer*SystemInstance Xref true Organizer*XRef XrefFile x.xrf Not available PrettyPRFile x.sdl Not available ExpandPR false Organizer*ExpandPR UpperCase false Organizer*UpperCase -----------------------------------------------------

MAKEOPTIONS Section

------------------------------------------------------
Option              Default   Corresponding Preference  
------------------------------------------------------
GenerateCode        true      Organizer*GenerateCode    
GenerateEnvHeader   false     Organizer*
GenerateEnvHeader EnablePartitioning false Organizer*
EnablePartitioning CompileAndLink true Organizer*
CompileAndLink MakefileMode Generate Organizer*MakefileMode StandardKernel true Organizer*StandardKernel TargetLanguage Cbasic Organizer*TargetLanguage PrefixType Full Organizer*PrefixType Separation UserDe Organizer*Separation fined Capitalization Lower Organizer*Capitalisation Case Kernel "" Organizer*Kernel UserKernel "" Organizer*UserKernel XCodeGenerator X Organizer*
XCodeGenerator UserMakefile "" Organizer*UserMakefile UserTemplate "" Organizer*UserTemplate ------------------------------------------------------

PRINTOPTIONS Section

--------------------------------------------------------
Option             Default      Corresponding Preference  
--------------------------------------------------------
PrinterCommand     "lpr -h -r"  Print*PrinterCommand      
PaperFormat        A4           Print*PaperFormat         
Landscape          false        Print*Landscape           
Scale              100          Print*Scale               
HeaderFile         ""           Print*HeaderFile          
FooterFile         ""           Print*FooterFile          
DestinationFormat  One Post     Print*DestinationFormat   
                   script File                            
FrameMakerCommand  "imaker"     Print*
FrameMakerCommand PageMarkers false Print*PageMarkers PrintToFile true Not available PrinterFile "" Not available FirstPageNo 1 Not available PrintFrom Not available PrintTo Not available --------------------------------------------------------

SDT Batch Facilities

SDT supports operations in batch mode, such as printing the documentation, analyzing an SDL structure and generating code. These operations are managed by the Organizer in a batch, windowless mode.

SDT Batch Syntax

The syntax for an SDT batch command is:

sdtbatch <systemfile> <options>
Where <systemfile> and <options> are described in "SDT Batch Options" on page 1151.

When the sdtbatch command is issued, the Organizer interprets the command line arguments, performs the requested operation and then terminates. Error logging is performed by the Organizer.

Information concerning the batch job is directed the standard output device.

------------------------------------------------------------
Note:                                                         
When executing an SDT Batch command, external service manage  
ment via the PostMaster interface is disabled.                
------------------------------------------------------------

Print Multiple Files

Syntax:

sdtbatch -p[rint] systemfile \
         [-s[elect] diagramfile] \
         [-o[ption] optionfile]
Prints the contents in the system file. Corresponds to clicking the Print quick button.

Print one File

Syntax:

sdtbatch -p[rint] \
         -s[elect] diagramfile \
         [-o[option] optionfile] 
Prints one file.

Analyze

Syntax:

sdtbatch -a[nalyse] systemfile \
[-s[elect] diagramfile] \
[-o[ption] optionfile] 
Analyzes the contents in the system file. Corresponds to the Analyze quick button.

Make

Syntax:

sdtbatch -m[ake] systemfile \
         [-s[elect] diagramfile] \
         [-o[ption] optionfile]
Makes a target as specified by the system file. Corresponds to the Make quick button.

SDT Batch Options

MS-DOS and Unix File Compatibility

Systems can be created with SDT on both the Unix and MS-DOS platforms. To allow systems to be accessed on both platforms, SDT provides a file compatibility concept that includes the following:

When the platform mode is mixed, an additional menu choice, Set Drives, is available in the Organizer's File Menu. This menu choice allows editing the drive table that is stored in the system file. See "Set Drives" on page 1078 for more information.

When working in mixed platform mode, the drive table takes care of translating between the two different file name formats (Unix and MS-DOS). On a Unix system, some restrictions apply to file names to be compatible with MS-DOS. These restrictions are checked whenever the user changes a file specification that is stored in the system file; if they are not followed, an error dialog is shown and the user is returned to the dialog where the file was specified. See "Filename Error Dialogs" on page 1045 for more information.

When the mode is not mixed, file specifications must be of the correct format according to the current platform.

In general, diagrams with file specifications that are of incorrect format (not mixed mode), or that cannot be translated to the correct format (mixed mode), are marked as Invalid in the Organizer.

------------------------------------------------------------------
Note:                                                               
Changing the preference MixedPlatform will not affect the file com  
patibility until SDT is restarted.                                  
------------------------------------------------------------------
 
Table of Contents Next Chapter