Table of Contents Previous Chapter 2 Editing SDL Diagrams

2 Editing SDL Diagrams

Editing Text

If you select an object in the SDL Editor window, the text window is updated to contain the text associated with that object. This is explained in detail in "Selecting a Symbol that has Associated Objects" on page 72 and "Selecting a Line that has Associated Objects" on page 109.

If you select more than one text object, the text window is not updated.

Each line (except for the last line) in the text window is terminated by a carriage return, and may consist of any number of legal characters.

The SDL Editor also supports editing text outside the context of SDT, by transferring text to / from a file of your choice. This allows you to take advantage of your favorite text editor when editing for instance SDL text symbols holding a large amount of text.

The main text editing functions you can perform are:

Resizing the Text Window

You can resize the text window pane by dragging the sash, the small square at the upper right of the text window, up or down as shown in Figure 64. The smallest possible size makes it impossible to view text within the text area. However, the drawing area will be correspondingly larger. A largest possible size covers the entire SDL Editor window, leaving no room for the drawing area. The text window can only be resized vertically.

Figure 64 : Resizing the Text Window. 
-----
(fig)  
       
-----

Hiding and Showing the Text Window

You can hide and show the text window with the Window Options command from the View menu.

To hide or show the text window:

Selecting a Portion of Text

You can select a portion of text displayed in the text window by performing either of the following sequences of operations:

Selecting by Dragging

  1. Point to the beginning or the end of the portion of text to be selected within the text window.
  2. Drag the I-beam pointer to the other end of the text to be selected. If the pointer is moved beyond the limit of the text window, the window will automatically scroll. The selected text is highlighted as you move the mouse.
  3. Release the mouse button.
    Figure 65 : Some Selected Text. 
    -----
    (fig)  
           
    -----
    

Selecting by Clicking

  1. Point to the beginning or the end of the text to be selected and click.
  2. Move the I-beam pointer to the other end of the text to be selected.
  3. Press <Shift> and click.

Selecting a Word

You can select a single word, delimited by white space, by double-clicking it.

Selecting a Line of Text

You can select one line of text by triple-clicking it.

Basic Text Editing Functions

Delayed Updating of the Drawing Area

When you alter the content of the text window, both the text window and corresponding text in the drawing area will be updated, the drawing area after a slight time delay.

In addition, any attempt to enter an illegal character will always result in an audible warning.

Functionality

The standardized text editing functions include:

Searching and Replacing Text

You can search for, and possibly replace, text in a diagram or in a diagram structure that is managed by the Organizer.

Searching for Text in a Diagram

To search for text in the current page:

  1. Make sure the window showing the diagram where to search is open and active.
  2. Select the command Show Organizer from the Tools menu. This not only raises the Organizer window but also sets the selection on the diagram currently being edited.
  3. Select the Search command from the Organizer's Tools menu.
    ---------------------------------------------------------------------
    (fig)  
  4. Alternatively, click the Organizer quick button for Search. ---------------------------------------------------------------------
  5. Specify the text to be found in the Search for text field.
  6. Click the Search button to order search. The object where the next occurrence of text will be selected and the text window updated accordingly.
  7. When the Search dialog is no longer needed, close it by clicking Done.

Searching and Replacing Text

To search and replace text:

  1. Open the Search dialog as when Searching for Text in a Diagram (see above).
  2. Specify the text to be found in the Search for text field.
  3. Specify the text to be replaced with in the Replace with text field.
  4. Click the Search button to find the first occurrence.
  5. If the text is found, the object where the next occurrence of text will be selected and the text window updated accordingly. You may use any of the following options:
  6. When the Search dialog is no longer needed, close it by clicking Done.

Importing / Exporting Text

SDT allows you to import and export text from / to a file. You can, for instance, import text from files that contain SDL-PR into text symbols and export the contents of text symbols to files.

Importing Text from a File

You can import the contents of a text file into an object managed by the SDL Editor the following way:

  1. Select the object where to import the contents of file.
  2. Select the Import command from the text window's File menu. Import issues a Standard File Selection Dialog, where you should specify the file to import. The general properties of the file selection dialog are described in chapter 21, The SDT Graphical User Interface.
  3. Clicking OK replaces the contents of the text window with the contents of file that you have specified in the file selection dialog.
    -----------------------------------------------------------------------
    Caution!                                                                 
    Importing text from a file replaces existing text as well. There is no   
    Undo facility.                                                           
    -----------------------------------------------------------------------
    

Exporting Text from a File

To export the contents of the text window into a file:

  1. Select the object which text to export to a file.
  2. Select the Export command from the text window's File menu. Export issues a Standard File Selection Dialog, where you should specify the file to export the text to.
  3. Clicking OK possibly creates a new file and replaces the contents of the file with the contents of the text window.

Copying, Cutting and Pasting Text

The text window provides clipboard functions for copying, cutting and pasting text between different symbols, lines and text attributes (these functions do not interfere with the clipboard functions for Cutting, Copying and Pasting Symbols).

Copying Text

To copy a portion of text:

  1. Select the text to be copied (see "Selecting a Portion of Text" on page 124).
  2. Select the Copy menu choice from the Edit menu of the text window. The selected text is copied to the text clipboard buffer, awaiting further instructions, typically Paste.

Cutting Text

To cut a portion of text:

  1. Select the text to be cut (see "Selecting a Portion of Text" on page 124).
  2. Select the Cut menu choice from the Edit menu of the text window. The selected text is removed from the text window and is copied to the text clipboard buffer, awaiting further instructions, typically Paste.

Pasting Text

To paste a portion of text:

  1. First copy or cut some text (see "Copying Text" and "Cutting Text", above). You cannot paste any text if the text clipboard is empty.
  2. Select, if required, the object where to paste the text. Place the I-beam cursor where to paste the text. Any text that is selected in the text window will be replaced when pasting.
  3. Select the Paste menu choice from the Edit menu of the text window. The contents of the text clipboard are pasted into the text window.

Using Grammar Help

To assist you in ensuring you enter the correct text in the selected text attribute to an object, there is a grammar help support function.

Opening the Grammar Help Window

To open the grammar help window:

Requesting Grammar Help

If you select the object you need assistance on, you will see the keywords and options available for use in given situations, and the corresponding reference to sections of the ITU Z.100 SDL Definition, followed by the grammar syntax of the meta language.

To request grammar help:

Inserting Text

This operation signifies inserting the contents of the grammar help window into the SDL Editor text window.

To insert the text related to a given "use case":

  1. Locate the "use case" of interest. The left part of the window provides a list of situations, named using some abbreviation that associates to the situation.
  2. Click on the item of interest to select it.
  3. Use the Insert command from the Edit menu. The contents of the right part of the window are inserted into the SDL Editor text window, at the current I-beam cursor position.
  4. Finally, replace the formal notation with the appropriate values, variables, signals, etc. used in your diagram.

Replacing Text

This operation signifies replacing the contents of the SDL Editor text window with the contents of the grammar help window.

The operation is very similar to Inserting Text, above.

To replace text:

Customizing the Grammar Help

With SDT, a standard grammar help template file is provided. In addition to this, the SDL Editor allows you to use your own templates and to merge these with the standard templates.

To create grammar help definitions:

  1. Copy an existing grammar help file.
  2. Edit the file using any text editor (the grammar help file is an ASCII, human readable file). See "The Grammar Help File" on page 1244 in chapter 23, The SDL Editor for a description of the contents and syntax of the file.
To use another grammar template definitions:

To merge the current grammar template definitions with another one:

Closing the Grammar Help Window

The grammar help window is closed by operating the Close menu choice from its File menu. The SDL Editor window is left unaffected.

Using the Signal Dictionary

Designing using SDL implies to large extent defining, sending and receiving signals. A signal dictionary assists you in reducing the time it takes to find out names and parameters for a signal that you already have used somewhere in a diagram. The signal dictionary also incorporates timers.

Messages from a Message Sequence Chart and signals from an external signal dictionary may be included into the SDL Editor's signal dictionary.

All functionality is provided in the signal dictionary window.

Opening the Signal Dictionary Window

To open the signal dictionary window:

Setting the Mode to Graphical or Textual

The signal dictionary window can take advantage of your computer's font capabilities to present the information in a graphical way, using SDL-like notation. This is the default mode.

If the information is presented in using strange characters, your terminal does not support the font family used by the signal dictionary window. You should use the textual mode.

To turn the mode to textual:

  1. Set the environment variable SDLENOGRAPHICS
  2. Exit all SDT tools.
  3. Restart SDT to have the environment variable affect the behavior.

Requesting Signal Dictionary Services

When you select an object where a reference or definition of a signal makes sense, the signal dictionary window is automatically updated to reflect the signals and signal conveyors(1) that are available according to what options you have selected.

The signal dictionary function responds when selecting the following objects (see page 1256 in chapter 23, The SDL Editor for more details):

Updating the Signal Dictionary

The signal dictionary is automatically updated each time you save an SDL diagram or an MSC that is referred to in the Organizer's Diagram Structure Area.

When modifying an SDL diagram, you may have unintentionally introduced SDL constructs that are incomplete and thus cause the signal dictionary to fail in providing signal information for that diagram.

Where the signal dictionary fails on a diagram, a bug symbol will appear after the diagram name in the signal list. Correct the source of error and save the diagram again. See page 1263 in chapter 23, The SDL Editor for a reference on signal dictionary errors.

Specifying the Signal Dictionary Options

The signal dictionary can be customized to fit your needs, by restricting or extending the amount of information that is presented through a set of options that you can activate or deactivate.

Depending on the method you are following when designing with SDL, you should activate the required options.

Next follows a guide for when to use the available options.

To enable an option:

  1. Activate the the Select menu.
  2. Toggle the appropriate option on by selecting it (an option which is enabled is indicated with an asterisk preceding the option name). Selecting the option once again disables it.
Below follow a few general guidelines for enabling the various options, depending on the approach you are following when designing with SDL.

Working Top-Down

This expression means starting by designing the root diagram (e.g. the system diagram) and continuing with the block diagrams, next the process diagrams and so forth.

If you follow this approach, selecting the Up option will enable access to signals used one level up in the SDL hierarchy. This option is enabled by default.

Working Bottom-Up

Following this method means starting with the diagrams at a deeper level (e.g. procedures) and working upwardly in the SDL hierarchy.

If you work bottom-up, select the Down option to enable access to signals used one level down in the SDL hierarchy. This option is enabled by default.

Working with Local Signals

If you look for entities that used locally in a diagram, select the This option. Remember, a diagram needs to be saved in order to update the signal dictionary.

Listing all Signals

You can list all signals that are visible according to the SDL scope rules by turning the All option on. For instance, a signal that you declare on the system level will be available in all diagrams in the SDL hierarchy.

Using Packages

If you want to gain access to signals that you have declared in a package, you should enable the All option.

Using Diagram Types

If you use the diagram type concept, you should enable the All option to gain access to the signals that are defined in the diagram types.

Listing MSC Messages

If you describe the dynamic behavior of an SDL diagram using the SDT Message Sequence Chart Editor, you may take advantage of this by turning the MSC option on.

----------------------------------------------------------------------
Note:                                                                   
Messages used in an MSC will be available in the signal dictionary      
only if the Organizer Diagram Structure Area refers to the MSC, i.e.    
the MSC is linked into the diagram structure. It is not sufficient to   
include the MSC in the Organizer's Associated Documents Area.           
----------------------------------------------------------------------

Importing an External Signal Dictionary

You may import an external signal dictionary into SDT through The SDT PostMaster interface. In section "Load External Signal Definitions into the Information Server" on page 496, in chapter 10, How to Use the SDT Public Interface is described how you proceed to import a file with external signal definitions.

Locating the Source Diagram

-------------------------------------------------------------------------
Note:  Signal Dictionary and OO                                            
If you are looking for a source diagram that is an SDL-92 type (sys        
tem type, block type, process type or service type) and that you ac        
cess through an instance of the type, the following conditions must        
be respected in order to have the signal dictionary window list the        
diagram and list all of the signals and signal conveyors that are used     
in the diagram:                                                            
·  The type diagram must be referred in the same diagram as                
where it is instantiated. In the signal dictionary window, only            
the type will be listed, not the instance. Figure 70 below shows           
an example of this.                                                        
  • As a consequence of this, you will not be able to look into the instance of a type that is defined in a package diagram and used in the current SDL system. · In the case the type is inherited from a supertype, the entities that you are looking for must be defined in the child type. The main cause of this limitation is that channels and signal routes are connected to the instance, not to the type. -------------------------------------------------------------------------
  • Figure 70 : The Type is Referred where Instantiated.Figure legend: The process 
    		typeController is instantiated as Cl. The process instance Cl will be visualized 
    		asthe process type Controller, and you can list signals conveyed on the gates A, 
    		B,C, D and E. 
    -----
    (fig)  
           
           
           
           
    -----
    
    To locate the source diagram (i.e the diagram where the signal is used or where the signal conveyor is available):

    1. Locate the section of your choice (Up, This, Down, All, MSC and External) by scrolling up or down. The sections are listed in that order and the start of each section is identified with a separator with the corresponding name.
    2. Identify the source diagram by its type and name. Diagrams are listed alphabetically by their name. The diagram type is identified either by a graphical SDL-like symbol (see Figure 330 on page 1258 in chapter 23, The SDL Editor) in the left margin or by a text string that consists of the diagram type.

    Updating the Text in the Target Diagram

    Once you have located the source diagram your next task is to insert the text belonging to the object you have selected in the target diagram (the diagram where the change is to be done).

    Updating a Signal / Timer Output, Input, Priority Input or Save

    This operation makes sense only on pages where the implementation is described, i.e. the flow pages.

    1. Locate the matching signal or timer in the signal list.
    2. Make sure the signal output, input, priority input or save symbol to be updated is selected in the target diagram.
    3. Select the signal or timer item in the signal list by clicking on it. Use the Insert or Replace commands from the Edit menu to update the symbol contents. The target symbol is updated with the signal name and its formal parameters.
      Figure 72 : Selecting the Signal Display. 
      -----
      (fig)  
             
      -----
      
    4. Update the signal's formal parameter type with a current parameter.

    Updating a Signal Conveyor (Channel, Signal Route, Connection Point or Gate)

    1. Locate the signal conveyor that constitutes the corresponding item that interfaces to the channel, signal route or gate that you are update in the current diagram.
    2. Make sure the signal list is selected in the target diagram.
    3. Select the signal conveyor by clicking on it. Use the Insert or Replace commands from the Edit menu to update the signal list contents.
      Figure 73 : Selecting the Gate B. 
      -----
      (fig)  
             
      -----
      
    4. In the case of a bi-directional conveyor, you will see lines of text in the right window, each one corresponding to a signal list (as in Figure 73, above). You should copy each line of text to the corresponding signal list. Select the signal list in the SDL Editor and the line of your choice, then use the Insert or Replace commands to update the signal list.

    Updating a Text Symbol

    When updating a text symbol, you are likely to declare signals and timers that you have referred to in the current diagram or referred to in the SDL hierarchy descending from the current diagram.

    1. You should make sure the Down and This options are selected.
    2. Remember to add a SIGNAL or TIMER statement in the text symbol, before the enumeration of signals.
    3. Locate all diagrams of interest. Look for signals / timers that you want to declare. Double-click each signal, and insert the necessary commas to create a syntactically correct declaration. Terminate the operation by inserting a semicolon.

    Finding a Definition

    When an object is selected in the SDL Editor's drawing area, typing <ctrl-f> looks for the first occurrence of the first word in the object and selects it in the This section.

    Closing the Signal Dictionary Window

    The signal dictionary window is closed by operating the Close menu choice from its File menu. The SDL Editor window is left unaffected.

    Changing Fonts on Text Objects

    You may change the font faces and font sizes used in the textual objects displayed by the SDL Editor. All textual objects use the same font faces and font sizes, meaning that they cannot be changed individually and cannot be changed during an SDL Editor session.

    The font faces which are available depend on the target system on which you are running SDT.

    Defining what Font to Use

    To modify the desired font size and font face, you must use the Preference Manager. See chapter 5, Managing Preferences.

    Font Naming Problems

    When this setting is in effect, SDT will use the font face names given by the preference settings:

    Editor*ScreenFontFamily:
    Editor*PrintFontFamily:
    
    to select font face names.

    Note that in this way you can select different font names for displaying on the screen and for printing; it is up to you to make sure that the printer font you select is similar in appearance to the font you use when displaying.

    If you leave the Editor*ScreenFontFamily preference setting empty you will edit your documents using the SDT Draft font, but print them using the font you specified with the Editor*PrintFontFamily setting.

    Determining which Scalable Fonts Your Server Can Access

    Use the xlsfonts command to list installed fonts. Font names containing 0 for width and height are scalable.

    Example 3 : How to Determine what Fonts are Available.  
    
    From the OS prompt, typing:

    hostname% xlsfonts | grep "\-0\-O\-" | more
    
    will return a list of accessible scalable fonts.

      
    

    Scalable Fonts Under R5 Servers

    To use scalable fonts under X11R5 you must normally first connect to a font server.

    Example 4 : How to Start the Font Server.  
    
    1. Start the font server on any local host:
    hostname% fs
    
    1. Connect the server to fs indicating which host the font server is running on (which can be the same host that the X server is running on):
    hostname2% xset +fp tcp/<hostname>:7000
        
    
    For further information see the X11R5 documentation or use man fs to read the manual page describing the font server you are running.

    Disabling Font Scaling

    If the fonts look poor on the screen, a possible work-around is to disable the scaling option.

    ----------------------------------------------------
    Note:                                                 
    Disabling font scaling effectively disables WYSIWYG!  
    ----------------------------------------------------
    
    To do this, you should edit the SDT resource file.

    1. Locate the file SDT and open it in a text editor.
    2. Look for the line with the text: SDT*sdtUseScalableFonts
    3. Change the line to SDT*sdtUseScalableFonts: false
    4. Save the file and restart the SDT environment.

    Scrolling and Scaling

    The viewport allows you to view a portion of the page that you are working on within the SDL Editor. That page is currently displayed in the drawing area. Any portion of the page located outside the limits of the viewport is out of view, unless you scroll the viewport to display that area.

    The SDL Editor uses any scale of your choice when displaying the page in the viewport.

    Manual Scrolling

    The viewport can be scrolled vertically and horizontally by using the scrollbars.

    Automatic Scrolling

    An automatic scrolling feature is provided. It automatically scrolls the viewport when you move the mouse pointer beyond the current limits of the viewport. This function is activated in following situations:

    The automatic scrolling function works at two different speeds. If you move the mouse pointer so that it is close to the edge of the viewport, the viewport is scrolled slowly. If you move the mouse pointer outside of the current viewport boundaries, then it is scrolled more quickly. The scrolling stops when you release the mouse button, or move the mouse pointer back into the current viewport.

    Scaling the View

    Scaling the view can be done either by specifying a scale to use or by zooming in and out.

    To specify a scale:

    1. Select the Set Scale command from the View menu.
    2. A dialog is issued, where you have the following options:
      Figure 74 : Adjusting the Scale. 
      -----
      (fig)  
             
      -----
      
    To zoom in or out:

    Click the zoom in / zoom out quick button.

    ----------------------------------------
    (fig)  
  • The quick button for zoom out. (fig)
  • The quick button for zoom in. ----------------------------------------

  • Footnotes

    (1)
    The term signal conveyor denotes a communication path that conveys signals; a channel, signal route, a gate or connection point.
     
    Table of Contents Next Chapter