[Previous] [Next] [Contents] [Index]


   Using the SDL Editor

Menu Bars

The SDL Editor's menu bar provides commands available in menus and menu choices for editing diagrams and pages of diagrams. Most of the functionality that the SDL Editor offers is contained within the commands from the menu bar. The menu bar provides the following menus:

The File menu is described in File Menu and the Help menu in Help Menu.

In addition, other menus may appear; one is the Simulator menu which appears when you set breakpoints in the SDL Editor (see Connect-To-Editor).

Edit Menu

The Edit menu provides editing functions that you can perform on the objects in the drawing area. The Edit menu functions that are available differ depending on the type of diagram you edit, either:

The Edit functions are as follows:

Undo

With this command you restore the content of the drawing area to its state prior to the operation you performed most recently. It is only available for operations on symbols, lines and text attributes. You can undo the following operations:

Note:  Undo for text editing

You cannot undo text editing operations, but an Undo function is available for text entered via the Grammar Help or Signal Dictionary functions. See Undo.

Cut

This command removes the current selection from the drawing area or text window, and saves it in the clipboard buffer.

Also see Deleting an Object.

Copy

This command makes a copy of the current selection, and saves it in the clipboard buffer.

Paste

This command inserts the contents of the clipboard buffer into the drawing area or text window.

No lines will be drawn between the pasted symbols and the symbols already present in the drawing area.

You can interrupt the Paste operation by pressing <Esc>.

Also see Pasting an Object.

Insert Paste

This function has the similar functionality as the Paste function, but is only available for flow pages. It inserts necessary space after the selected symbol before pasting the clipboard buffer and connecting the two flows.

The function requires that the clipboard is not empty and that you have selected exactly one symbol or line. Otherwise, the menu choice is dimmed. The menu choice is also dimmed if connecting the two symbol flows would violate the Z.100 syntax rules.

The functionality differs depending on if you have selected a symbol or a line. If you have selected a symbol the pasted symbols are inserted following the selected symbol. If for example you have selected a decision, the Insert Paste command will create a new branch. Also if a line following the selected symbol joins another line and the selected symbol only can have one follower, the inserted symbols will be placed following both the lines.

If you have selected only a line the pasted symbols will be inserted onto that line. For example if a line following a decision is selected, the inserted symbols will be inserted into the selected decision branch.

Before inserting the selection, the SDL Editor allocates the necessary space by pushing the required objects downwards. If this is not possible, a dialog is displayed.

Paste As

Pastes the currently copied object (from the OM or Text Editor) as an SDL object in the drawing area. The object is transformed and a link is optionally created between the copied and pasted objects.

The Paste As dialog is opened. See The Paste As Command for more information.

Clear

This command removes the current selection from the drawing area or text window. The content of the clipboard buffer is not affected by this menu choice.

Also see Deleting an Object.

Collapse/Expand

This command is available for symbols that can be clipped. These are the package reference symbol, additional heading symbol, text symbol, comment symbol and text extension symbol. A collapsed symbol has the minimum size and an expanded symbol will automatically adjust its size to the text.

Redirect

This command changes the direction of a selected channel, signal route or gate. The new direction is denoted by changing the orientation and position of the arrow, leaving the arrowhead pointing in the opposite direction. Subsequent redirections result in the signal list toggling between two directions.

Note: 

The only way to draw a channel from the environment to a symbol is to:

  1. Draw a channel from that symbol to the environment
  2. Redirect the channel.

Bidirect

This command changes the selected channel, signal route or gate to be bidirectional. A new arrowhead and an empty signal list are generated.

Note: 

You can change a bidirected channel or signal route back into a uni-directional object by clicking on the unwanted arrowhead and selecting the Clear function from the Edit menu.

Flip

This command creates a vertically symmetrical copy of the symbol(s) you have selected. It is valid on the following symbols only:

The flow lines connected to a mirrored text extension symbol or comment symbol are redrawn in order to reconnect them to the opposite side.

Dash/Undash

A dashed reference symbol is used in an SDL subtype when referring to an object that is defined elsewhere in one of the supertypes of the current subtype.

In a similar fashion, a dashed gate indicates that the gate is already defined in one of the supertypes in the inheritance chain.

Figure 411 : A dashed process reference symbol and a dashed gate

Extracted pic [1]

The Dash/Undash command is available on the following diagrams:

The Undash is a toggle command.

Drawing Size

This menu choice sets the size of the drawing area for the current SDL page. A dialog is issued where you can type in the width and height. The values are saved on file when you save the diagram.

Note: 

Enlarging the drawing, the current SDL page may not fit any longer into the paper that is defined with the Print preferences; the result may be an SDL page that requires multiple sheets of paper when printed.

Select All

This command selects all of the text contained in the text window or all objects within the drawing area.

Complete Word

Note: 

You can also complete a word by having the mouse pointer in the drawing area and pressing the tab key, provided that the preference Editor* TabEqualsCompletion is true.

Word completion helps you complete long words that have already been used in the same context. Type the beginning of the already used word and invoke word completion to get the rest of the word. If there are several ways to complete the word, the word completion operation will initially give you the common part of the possible completions. If you invoke word completion again, you will get one of the alternatives. To get another alternative, invoke word completion once more.

Word completion takes the word closest to the current cursor position and tries to complete that word by adding characters at the end of the word.

The word completion operation uses the following sources to look for already used words:

Select Tail

This command selects the currently selected symbol and all objects beneath it within the tree (following the flow lines).

View Menu

The View menu provides rescaling functions and access to various options that affect the behavior of the SDL Editor.

The following menu choices are available in the View menu:

Set Scale

Issues a dialog where you can adjust the scale.

Window Options

This menu choice issues a dialog where you set the options that affect the window properties.

Diagram Options

This menu choice issues a dialog where you set the options that affect the editing properties applied on the current diagram.

Interaction and Flow Diagram Options

A dialog with the following options is displayed on interaction and flow diagrams.

Note: 

Turning the switch from off to on will not perform a retroactive syntax check for not allowed or interconnection of symbols. Only the objects that you add while syntax checking is enabled are checked. However, the syntax check on texts will be performed on all the texts when you set the syntax check to on.

The diagrams options are also saved on file when the diagram is saved.

Overview Diagram Options

A dialog with the following options is displayed on overview diagrams.

The diagrams options are also saved on file when the diagram is saved.

Editor Options

This menu choice issues a dialog where you can customize the behavior of the SDL Editor.

The options are controlled by toggle buttons. They are:

Pages Menu

The Pages menu contains the following menu choices:

First

This menu choice opens the first page contained in the diagram. The first page is defined according to the order of appearance in the Edit Pages dialog. If the page is already opened, its window is displayed.

<Page Name>

Activating the Page menu presents up to four menu choices that consist of the names of the two pages that are sequentially right before and after the page you edit. If you edit the first page of the diagram, the next four sequential pages are shown. If you edit the last page of the diagram, the previous four pages are shown.

When you select one of these page names, that page is opened or restored in the SDL Editor. Use the Edit menu choice if you want open other pages.

Last

This menu choice opens the last page of a diagram. See First for more information.

Add

This menu choice is a shortcut for adding one page to the current diagram. The Add Page dialog is issued and when you click OK the new page is shown.

Edit

This menu choice opens a dialog where you can Add, Rename, Clear, Cut, Copy and Paste an SDL Page. See Page Editing Functions.

Edit Reference Page

This menu choice opens (or, if already active, simply restores) the page in the parent diagram where the name of the current page is referred.

This menu choice is dimmed when the current page is one of the pages contained in the Organizer Root Document (in which case there is no parent diagram) or the diagram being edited is not known by the Organizer.

Diagrams Menu

The Diagrams menu records all diagrams and pages that are opened by the SDL Editor.

Back

This menu choice opens the diagram that was previously visible in the same window.

Forward

This menu choice opens the diagram that was displayed in the window before you pressed the back button.

<Diagram Name>

The last edited page always goes to the top of the list, and subsequently moves the other diagrams and pages down a position. A maximum of 9 open pages can be shown. A tenth one will be put at the top of the list, but any subsequent opening of a diagram or page will only show the last 9 that have been opened. Another option -- List All(at the bottom of the list) -- is available to list all the open diagrams in the SDL Editor.

Each item in the menu provides information about the diagram type, its name, a slash (`/') followed by a page name, a hyphen and, possibly, the file it is stored on. A diagram that is preceded by an asterisk (`*') denotes that it has been modified during the SDL Editor session.

List All

This menu choice becomes available when a maximum of 9 open pages has been surpassed. When you select List All a dialog is issued containing all diagrams and pages that are currently open in the SDL Editor and you have the possibility to display them.

Window Menu

The Window menu contains the following menu choices:

New Window

This command opens a new window containing a new view on the SDL page contained in the source window from where you selected this menu choice. You can edit the SDL page in any window.

Close Window

This option closes the open window, but, does not close the diagram. All but the last open window can be closed, the last one you must close from the File menu, possibly in conjunction with saving information (see Close Diagram).

Grammar Help

This menu choice opens the Grammar Help window, see Grammar Help and Signal Dictionary. Its purpose is to assist you in editing SDL textual elements that are correct according to the SDL grammar.

Each SDL Editor window has its associated Grammar Help window.

The SDL Editor tries to open a file with grammar help templates when opening the Grammar Help window (which file to open by default may be specified as an SDL Editor preference). If the file cannot be located, a dialog is issued where you can choose to select it manually. The filter in the file selection dialog will be set to *.tpl.

Signal Dictionary

This menu choice opens the Signal Dictionary window, see Using the Signal Dictionary. Its purpose is to assist you in gaining fast access to information about what signals are defined in an SDL hierarchy. Each SDL Editor window has its associated Signal Dictionary window.

Entity Dictionary

Opens the Entity Dictionary window. See The Entity Dictionary for more information.

<Window Name>

If more than one editor window is open the other windows are listed here. The behavior of this list will be similar with the diagrams list in the Diagrams menu. The only difference is that the menu items will not provide the diagram file information.

List All

This menu choice is available only if more than 9 editor windows are open, and has the same functionality as the List All menu command in the Diagrams menu.

Tools Menu

The Tools menu contains the following menu choices:

Show Organizer is described in Show Organizer and the Link commands are described in Link Commands in the Tools Menus.

Search

This menu choice opens a dialog that allows you to search for a text in the current diagram or document in any editor. You can search many diagrams and documents at the same time with this menu choice.

Tidy Up

This menu choice rearranges the graphical layout of the entire SDL diagram, using default layouting algorithms when calculating the location and size of graphical objects. Before tidying up, a confirmation dialog is issued.

Connect to Text Editor

This command issues an external text editor and creates a temporary file from the currently selected text. After this you can only edit the text from the external editor. The SDL Editor is updated every time the external text editor saves the temporary file. When you no longer edit the temporary file the editing control returns to the SDL Editor.

Which external text editor you are to use is defined by the preference SDT* TextEditor.

Navigate

This command navigates to another diagram or to another symbol within the current diagram depending on the selected symbol. It is available for the following symbols:

A double click on the symbol is an accelerator for the Navigate command.

The Show Sub Menu

All menu choices in the Show sub menu require a running index viewer loaded with an up-to-date cross reference file. You can get this for all SDL systems that passes through the SDL Analyzer, by pressing the Generate Index quick-button in the Organizer.

Show > Definition of X

This command takes the name of the word closest to the current cursor position as input. If the name represents an SDL entity listed in the index viewer, the SDL Editor will navigate to one of the definitions of that entity. Usually there is only one definition to show, but for states, each state symbol is considered to be a part of the definition and one of them is shown. If you invoke this command once more for the same state name, another state symbol is shown (if there are several).

Show > Use of X

This command takes the name of the word closest to the current cursor position as input. If the name represents an SDL entity listed in the index viewer, the SDL Editor will navigate to one of the uses of that entity. If you invoke this command once more for the same word, another use of that entity is shown (if there are several uses),

Show > Definition or Use of X

This command takes the name of the word closest to the current cursor position as input. If the name represents an SDL entity listed in the index viewer, a dialog is opened, allowing you to navigate to one of the definitions or uses of that SDL entity.

Show > Next (Definition or Use of) X

This command repeats the last Show > Definition of X, Show > Use of X or Show > Definition or Use of X command using the same word as last time as input.

Show GR Reference

This command issues a message where the graphical SDT reference for the object you have currently selected is displayed.

The syntax of the graphical references used in the SDT environment is described in SDT References.

Diff

With this menu choice you can compare the contents of two SDL diagrams. See Comparing Diagrams.

Generate PR

This command will generate SDL-PR/CIF for the current diagram. A dialog with the following options appears:

The File Menu of the Text Window

The File menu provides functions that transfer text from a file to the text window and vice-versa. The basic intention is to provide you the possibility to edit larger portions of text with a more suitable text editor (for instance signal definitions in text symbols). Another possibility to edit text externally is to use the Connect to Text Editor command in the Tools menu.

Import

Import imports the contents of a file into the text window and inserts the contents of the file at the text cursor position, possibly replacing selected text in the text window. In the file selection dialog, the filter is set to *.txt by default.

Export

Export exports the selected text to a file. If no text is selected in the text window, the entire text window contents will be exported to the file. In the file selection dialog, the filter is set to *.txt by default.

Menu Bar in Grammar Help Window and Signal Dictionary Window

These menu bars contains the following menus:

File Menu

The File menu contains menu choices that access files that contain SDL Grammar Help templates.

These commands are useful only when requesting Grammar Help support.

Load

This command opens a file selection dialog, where you can select and load the file with grammar help definitions.

Figure 412  : Load a Grammar Help file

Extracted pic [5]

Grammar template files normally have the file extension .tpl. With SDT, a standard template file, sdt.tpl, is enclosed. The SDL Editor attempts to locate a .tpl file each time you invoke the Load command.

Any template definitions that are already loaded will be replaced by the contents of the selected grammar help definition file.

Merge

Merge extends the current loaded grammar definitions with the contents of a grammar help definition file.

This command issues a file selection dialog, in which you can select and add a set of custom templates to the basic set provided in SDT.

Any template definitions that are already loaded will be extended with the contents of the merged template definition file.

Edit Menu

The Edit menu provides two utility functions that you can use when copying text from the Grammar window or the Signal Dictionary window to the SDL Editor's text window.

Undo

You can revert changes with the Undo command.

Insert

This menu choice copies the entire contents of the Grammar field or the signal definition and copies it into the text window at the current I-beam cursor location. Selected text will thus be overwritten.

A shortcut for Insert is to double-click on the template name in the name field.

Replace

This command replaces the contents of the text window with the contents of the grammar field. This function is a shortcut for the following sequence:

Select Menu

The commands on the Select menu define what functionality the Grammar Help window and the Signal Dictionary window should provide.

Each of the options can be individually turned on and off. In addition, an Options menu choice (see Options) allows you to enable and disable multiple options in one command only.

The options that are currently enabled are indicated by an asterisk (`*') preceding the corresponding menu choice.

When you invoke the Grammar Help, the Grammar option is enabled, while the remaining options are disabled.

These functions restrict or extend the scope of search for signals. The Signal Dictionary functionality can be extended to provide access to MSC Messages and an external signal library.

Grammar

This toggle option, when set to on, will enable the SDL Grammar Help function.

Up

This toggle option enables the Up option provided in the Signal Dictionary window. This option displays the SDL signals that are available when looking one level up in the SDL hierarchy.

This

Turning This on lists all signals that are used in the current diagram.

Down

This option displays the SDL signals that are available when looking one level down in the SDL hierarchy.

All

This option displays all signals that are defined and are visible according to the SDL scope rules, starting from the root document (see Root Document) in the SDL System Structure chapter.

MSC

This option displays all messages that are available in the Message Sequence Charts that are submitted as input to the Signal Dictionary function. Each message is mapped to an SDL signal, with its parameters mapped to SDL signal parameters.

An MSC is submitted as input to the Signal Dictionary if associated to an SDL diagram that is present in the Organizer's diagram structure.

External

This option displays all signals that have been imported from an external signal dictionary. Importing external signals is done through the Telelogic Tau Public Interface. See Load Definition File.

Options

Issues a dialog where you can turn on and off all options individually (see Select Menu for a description of the options).

The default options for the Signal Dictionary are Up and Down.

Tools Menu

The Tools menu provide various convenience functions.

Show Editor

This command displays the parent SDL Editor window.

Show Definition

An SDL Editor comes up showing the definition of the item which is selected in the signal list.

Page Editing Functions

When you select Edit from the Pages menu, the Edit Pages dialog will be opened. In this dialog, you can add, rename, clear, cut, copy and paste an SDL page. The items in the dialog will be described below:

Figure 413 : The Edit Pages dialog

Extracted pic [2]

The Page List

This list includes all SDL pages in the SDL diagram. The operations available in the dialog, are only possible to perform if a page is selected in this list.

Edit

This button opens the selected page in the SDL Editor.

Cut

This button removes the selected SDL page from the diagram and saves it in the clipboard buffer. The information in the Organizer that is dependent on this page, will also be removed.

If the page contains reference symbols and these have an underlying structure in the Organizer this structure will be restored when you paste the page in a new position. See Cutting, Copying and Pasting Reference Symbols.

The button is dimmed if the object you have selected is not an SDL page.

Copy

This button copies the selected page to the clipboard buffer.

The button is dimmed if the object you have selected is not an SDL page.

Paste

This button pastes a previously cut or copied page into the current diagram.

The Paste button will be dimmed if:

The SDL Editor checks that the contents of the page are syntactically correct. If required a warning will be issued. Then a new dialog is displayed, where you should assign the page a new name. You can specify:

Clear

This button removes the selected SDL page from the diagram. A confirmation dialog will be issued before the page is removed, and the SDL Editor will automatically rename autonumbered pages.

Caution! 

As stated in the dialog, Clear on a page cannot be undone.

If the page contains reference symbols and these symbols have a substructure, this substructure will be removed from the Organizer. As there is no undo for the Clear Page command, a warning will be issued and it is possible to keep the substructure as a new hierarchy instead.

Add

This button opens a dialog where you can change some settings before new page is created:

New pages are listed in the same order that they were added.

Rename

This button opens a dialog where you can rename the selected SDL page. If the page is part of a block or block type diagram, you can also change the page type (process interaction page or block interaction page) in this dialog.

Autonumbered pages cannot be renamed, unless you turn the option The Autonumbered Option off first.

The Autonumbered Option

If the option Autonumbered is on, a numeric name (1, 2, etc) will be applied to the selected page. In a dialog, you can select to auto-number the selected page or all pages in the diagram.

The Open This Page First Option

If the option Open This Page First is on, the selected page will be the page that will be displayed by default when you open the diagram. Only one page at the time can have this option set.

Comparing Diagrams

When you select Diff from the Tools menu, a dialog will be opened where you can select to compare the contents of two SDL diagrams. (It is also possible to compare more than one diagram in pair, but to this you should use the same menu choice in the Organizer. See Diff.)

Figure 414 : The Diff setup dialog

Extracted pic [3]

Specifying the Diagram to Compare With

There are two ways for specifying the diagram that should be compared with the currently displayed diagram:

Selecting the Report Type

In the dialog, there are four alternatives for reporting differences between diagrams: Textual Difference Report: Summary, Textual Difference Report: Details, Graphical Difference Report with Merge Facility and Detect Moved Symbols.

Textual Difference Report: Summary

A summary of how many differences that has been found is presented in the Organizer log. The summary may look like this:

When you read this report, notice the following:

If at least one of the two compared diagrams has more than one page, then a summary is also presented for each page pair. It may look like this:

Textual Difference Report: Details

This option will print information about each found difference in the Organizer log. This makes it possible to navigate from the Organizer log to every found difference by using the Show Error operation in the Organizer log. See Organizer Log Window.

The detailed textual difference report may look like this:

Graphical Difference Report with Merge Facility

This option will invoke the graphical difference report. Two SDL Editor windows, displaying the two diagrams and their differences, and one dialog will be opened. Make sure that the windows and dialog do not overlap and that the editor windows show as much as possible of the pages.

Figure 415 : The Diff Manager dialog

Extracted pic [4]

Note: 

The Accept button is not available when you have selected an SDL reference symbol or when you compare diagrams of different types. Instead, you have to merge reported differences manually.

Detect Moved Symbols

If this option is on, the diff operation tries to detect moved symbols by using symbol ids. This means that the diff operation is able to tell you that a symbol has moved from one place on the page to another, instead of just telling you that one symbol has been removed and another one added. You should only use this option if the two compared diagrams originates from the same diagram. If you create two diagrams from scratch and compare them with this option on, the diff operation might report a larger than necessary difference, and it might group unrelated differing symbols into the same difference group.

Differences That Will Be Reported

When you use Diff, the following object differences will be found:

An object is considered to be moved if it has been moved relative to the upper left corner of the diagram frame. This means that if you move the frame, it will have no effect.

Diagrams are compared one page pair at a time. A page pair is one page from the original diagram and one page from the other diagram where both pages have the same name. If there is no page with the same name in the other diagram, then the complete page is considered to be a difference.

Difference Groups

Differing objects from the same page pair are grouped into difference groups. Two differing objects are placed in the same group if:

Color and the Current Difference Group

In the graphical difference report, all differing objects in the current page pair are in general colored. The color is initially blue in the original diagram and red in the other diagram.

The dialog that will be opened during the graphical difference report, operates on the current difference group. All objects in the current difference group are selected. Important changes in a non-accepted current difference group, will be highlighted in the following ways:

When you have accepted the current difference group, all selected symbols in the original diagram are replaced by all selected symbols in the other diagram. To indicate this, the symbols from the other diagram are all colored red in the original diagram. At the same time, the Accept button changes name to Reject. If you click Reject, the original appearance of the current difference group will be restored.

GR to PR Conversion

It is possible to convert diagrams from SDL-GR to SDL-PR. In the conversion, SDL diagrams are translated from the SDT binary files into PR files, possibly containing CIF information. All graphical symbols in that diagram will be replaced by their corresponding keywords and any text in the symbols will be copied to the output file. When possible, the definitions in the output file will appear in the same order as in the input.

The conversion is used by the SDT Analyzer as the first step in the analysis process, and also by the SDT2CIF Converter to convert to PR that preserve the graphical layout information. You can also convert to PR by the Generate PR command in the Tools menu, or by using the Public Interface (see GRPR).

The PR/CIF files produced by SDT fill various purposes:

Mapping between GR and PR

The following list defines the mapping between the GR and PR forms:

Note: 

The order in which text symbols are converted may be of importance when it comes to code generation issues. This is, in particular, applicable when using the C Code Generator. Therefore, you should use one text symbol only for type definitions.

Error and Warning Message

This section contains a message that might be produced during the GR to PR conversion.

ERROR 5001 Unexpected end of flow

This message indicates that a symbol has been found that has no following flowline and according to the SDL syntax there must be one. In addition to the error message the following line is generated in the PR:

When using the Telelogic Tau Public Interface to perform the conversion, the above message will be displayed in the Organizer Log. The reply message on the service will indicate that the conversion has been done and it will also contain the number of errors produced.

If the conversion for some reason fails, the reply message will contain a text stating the kind of problem that has occurred. See further the GRPR service in the Public Interface.


[Previous] [Next] [Contents] [Index]