5.4 The Menu Bar

The majority of the commands in the menus operate on the active page. A page is made active either by clicking in the contents of the page, by clicking the titlebar of the surrounding window or by selecting the page from the Windows menu.

Many of the commands of the menus also operate on the current selection of the active page. The current selection is called current focus.

5.4.1 File Menu

New Diagram...
Makes a dialog popup. Entering a file name without extension and clicking ok will result in the creation of a minimal BETA library, which is given the entered file name. The result of this will be a diagram, like the one shown above, showing up on the active work sheet. The title of the diagram is the name of the new BETA fragment group (the file name: fee) followed by a dash (-) and the name of the new BETA fragment form (lib). The single attribute shown below the title corresponds to the single class attribute of the library:
ORIGIN '~beta/basiclib/betaenv'
-- lib: Attributes --
<<NameDecl>>: (# #)
Notice! 
[207 bytes 24x13 GIF] Notice:
Notice! 
[207 bytes 24x13 GIF] A general note:
New Graphics Page...
Invoking this command will create a new page entitled 'Graphics Page'.
Graphics pages are as the name implies ment for graphics only. That is all objects appearing on these pages are interpreted as having no other semantics than the purely graphical one. Basically the commands that apply on these pages are the purely graphical ones that can be found in the Graphics and Align menues. Also Clear from the Edit menu applies to purely graphical objects (whereas Cut, Copy and Paste regrettably are not yet implemented for these types of objecs).
Open...
Selecting Open... makes the open dialog popup. From here a .bet or .ast file can be selected and opened.
Selecting a .bet or .ast file will, depending on the category of the selected fragment, result in either a descriptor or attributes diagram on the active worksheet. This class diagram reflects the attributes of the opened fragment. One exception from this should be noted: When a file containing more than one fragmentform is opened the first thing to show up will be the group page with a diagram displaying the fragmentforms of the selected file (see The Group Page). Now, by doubleclicking one of these fragmentforms its attributes can be shown on the active worksheet as described above.

Notice! 
[207 bytes 24x13 GIF] Notice:
Save
Performs a save of all shown diagrams on all open pages to the currently open .diag file.
This means that the layout of the diagrams on the pages are saved, and that the fragments related to the diagrams are saved to their .bet and .ast files. The .diag file can then later be opened for further browsing and editing and eventually be saved again.

Notice! 
[207 bytes 24x13 GIF] Notice:
Save As...
Using this command invokes the dialog. Entering a name in the text field of the dialog with extension .diag and choosing Save will result in a save of all shown diagrams on all open pages to this file (as described above).
Revert
Reverts all edits done during the current Freja session. I.e. the diagram will appear as it did when it was initially opened.

Notice! 
[207 bytes 24x13 GIF] Notice:
Save Page As Graphics...
Using this command you can, using the dialog that pops up, save the current page on disc as graphics only. The graphics only format is Encapsulated PostScript.
Page Setup...
Use Page Setup before printing. To get a satisfactory print the recommended settings are:

Notice! 
[207 bytes 24x13 GIF] Notice:
Print...
Initiating the print command will bring up a dialog asking the user to indicate which pages are to be printed. If all pages are to be printed simply select the Print all pages field of the dialog.
You can choose to either print directly to a printer or to print to a file.
If printing directly to a printer, type in a print command - e.g. /usr/local/bin/lpr -P<PrinterName> on a unix system.
If printing to a file, type in the name and path to the file - e.g. /tmp/freja-print.ps.

Notice! 
[207 bytes 24x13 GIF] Notice:
Close
Hides all Freja windows.

5.4.2 Edit Menu

Undo
Choosing Undo from the Edit Menu will undo the latest editing operation on a work sheet in Freja. If this operation itself was Undo the state before the Undo will be restored.
The operations which can be undone are Cut, Copy, Paste, Insert Before, Insert After, Paste Before, Paste After, Expand.

Notice! 
[207 bytes 24x13 GIF] Notice:
Cut
Initiating Cut removes the contents of current focus on the active work sheet. The deleted part of the class diagram is moved onto a clipboard and can later be pasted into any other class diagram. Only titles and attributes can be cut from a class diagram (not any of the relations). Performing a Cut with a title of a class diagram as current focus results in the removal of the entire class diagram and the removal of the attribute of which this diagram is a detailed version. Notice that this type of cut will also cut the corresponding code.
Copy
Copies the contents of current focus on the active work sheet onto the clipboard and can later be pasted into any other class diagram. Only titles and attributes can be copied from a class diagram (not any of the relations).
Paste Before
When current focus is an attribute of a class diagram this command performs an Insert Before followed by a Paste.
Paste
If current focus is part of a class diagram - i.e. a title or an attribute - and if the clipboard contains part of a class diagram, then Paste can only be performed when the contents of current focus and the class diagram part on the clipboard are of exchangeable syntactic categories. If this is the case and a Paste is performed the effect is that the contents of current focus is replaced by the class diagram part on the clipboard and the code is updated correspondingly.
In this context when cutting or copying with a title of a class diagram as current focus the syntactic category is the same as the syntactic category of the attribute of which the class diagram is a detailed version.
Paste After
When current focus is an attribute of a class diagram this command performs an Insert After followed by a Paste.
Clear
Removes the contents of current focus on the active work sheet (nothing is moved to the clipboard).
Edit...
If current focus is an attribute of a class diagram or the title of a diagram detailed from such an attribute, this command will invoke the appropriate dialog the attribute or class. If a new name is entered, it must be a lexem (i.e. some legal name in BETA). Therefore before accepting it, the name is parsed and if unlegal the dialog will ask the to change it.
Open codeeditor
If current focus is an attribute of a class diagram or the title of a diagram detailed from such an attribute, this command will invoke a codeeditor on the code that corresponds to current focus. The functionality of a codeeditor is mainly identical to the functionality of the codeviewer/-editor of the browser window of Sif. Codeeditors are therefore typically used when textual structure editing on some part of the code is called for.
Insert Before
If the contents of current focus is an attribute of a class diagram this command will insert a new unexpanded attribute before current focus.
Insert After
If the contents of current focus is an attribute of a class diagram this command will insert a new unexpanded attribute after current focus.
Remove Optionals
If current focus is part of a class diagram this command removes all nonterminals representing optional productions from the contents of current focus.
Show Optionals
Inserts all nonterminals representing optional productions in current focus, if it is part of a class diagram.

5.4.3 New Menu

In general the New menu contains entries that are composed of two or more ordinary commands and are provided to make some of the more frequently used series of commands easier to perform.

Class...
This command basically creates a new class pattern and makes a corresponding class diagram show up on the active work sheet. The user is prompted for a class name and is furthermore able to decide whether the class should be declared virtual (virtual, binding of virtual or final binding of virtual).
The class is declared in what is called the current fragment diagram.
If the current focus is a title or an attribute of a class diagram P the current fragment diagram is the fragment diagram that is related to the same fragment as the diagram P.
Attribute...
This command creates a new attibute. The user is promted for name, type and whether it should be a static or dynamic reference attribute.
Operation
This command creates a new operation. It inserts the new operation in the class where current focus is set. That is, the class diagram which includes the title or attribute which is current focus. This diagram is called the current diagram. The user is prompted for a name for the new operation and is furthermore able to decide whether the operation should be declared virtual (virtual, binding of virtual or final binding of virtual).
Local Class
This command creates a new class. It inserts the new class in the class where current focus is set. That is, the class diagram which includes the title or attribute which is current focus. The user is prompted for a name for the new class and is furthermore able to decide whether the class should be declared virtual (virtual, binding of virtual or final binding of virtual).

5.4.4 Relations Menu

The commands of the Relations menu all relate one node to another. For this reason they are all basically used in the same manner: Choose the wanted relation, possibly a dialog appears, then fill in the wanted settings and click Ok, click the left mouse on the source of the relation and after that click the right mouse on the destination of the relation.

Notice! 
[207 bytes 24x13 GIF] Notice:

General Relationship
Any elements of a class diagram can be connected using through this relation. It has no formal semantics and no code results from creating it. It is intended as a purely informal symbol, used in situations where the user has not yet decided which type of concrete relation (typically aggregation or association) should exist between two classes.
Aggregation
When executing this command a dialog appears. The aggregation dialog makes it possible to:

  • give the aggregation a name,
  • specifify the multiplicities of the whole and the part,
  • specify the implementation of a one-to-many [2] aggregation; that is to specify if a repetition or one of the basic container classes should be used in the resulting code,
  • specify if the aggregation is to be implemented by-reference or by-value.

Note that default values are set, so that the user only has to specify the settings he actually wants to change.
When Ok has been clicked, click the left mouse on the source ("whole") of the relation and after that click the right mouse on the destination ("part") of the relation.
The destination (the part) must either be a class declaration, a virtual class declaration, a binding of a virtual class declaration or a final binding of a virtual class declaration. The destination may either be detailed or not.
If the source (the whole) of this operation is the title of a class symbol the result will be that a new attribute containing the corresponding code is inserted in the class. If the source is an attribute of a class and this attribute corresponds to a dynamic or static reference in the code the operation will result in this attribute being altered so that it now corresponds to the generated aggregation code.
Association
When executing this command a dialog appears. The Association dialog makes it possible to:

  • give the association a name,
  • specify role names for both sides of the association,
  • specify multiplicities for both sides of the association,
  • specify the implemention of a one-to-many or many-to-many association; that is to specify if a repetion or one of the basic container classes should be used in the resulting association code,
  • specify if the association should be embedded or not; that is to specify if the generated code is to result in a separate association class or if it is to be embedded in the source and destination classes,

Note that default values are set, so that the user only has to specify the settings he actually wants to change.
When Ok has been clicked in the dialog, click the left mouse on the source of the relation and after that click the right mouse on the destination of the relation.
Creating this relation the source and destination must be detailed versions of either class declarations, virtual class declarations, binding of virtual class declarations or final binding of virtual class declarations.
Specialization
Creating this relation the source and destination must be detailed versions of either class declarations, virtual class declarations, binding of virtual class declarations or final binding of virtual class declarations.
The result of creating a Specialization relation will be that the descriptor corresponding to the source diagram gets the destination class inserted as its prefix.
Binding of Virtual
For this relation the source must either be an attribute containing an unexpanded attribute declaration or an attribute containing a pattern, virtual or binding declaration. The destination must be an attribute containing a binding or virtual declaration.
Having created a relation like this the source will have become a binding of the virtual of the destination.

Notice! 
[207 bytes 24x13 GIF] Notice:
  • A possible descriptor of the source will not be lost through this operation.
Final Binding of Virtual
Behaves exactly like the Binding of Virtual relation except that the source in this case becomes a final binding of the virtual of the destination.
Pattern Variable
For the Variable Pattern relation the source must be an attribute containing either an unexpanded attribute declaration or some kind of simple declaration. The destination must either be the title of a diagram that is a detailed version of an attribute containing a pattern declaration or it must be an attribute containing a pattern declaration.
The result will be that the source becomes a declaration of a pattern variable with the destination pattern as qualification.

5.4.5 View Menu

Abstract
If current focus is a title of a class diagram Abstract will remove this class diagram and all diagrams detailed from it.
If current focus is an attribute that has been detailed the command will remove the detailed version of the attribute and all diagrams detailed from that.
Abstract Recursively
If current focus is a title of a class diagram Abstract Recursively will remove all diagrams detailed from it (but not the diagram to which the title belongs).
If current focus is an attribute that has been detailed the command will remove the detailed version of the attribute and all diagrams detailed from that.
Overview
If current focus is a title or an attribute of a class diagram this command will remove all class diagrams not on the "detail path" to the diagram which is current focus.

Detail
If current focus is an attribute of a class diagram and this attribute contains an object descriptor, like e.g. a pattern declaration does, Detail will display the attribute on detailed form; that is, as a class diagram displaying the attributes of this descriptor.
If current focus is a title of a class diagram Detail will perform a Detail on all attributes that can be detailed in the class diagram.

Notice! 
[207 bytes 24x13 GIF] Notice:
  • Doubleclicking a detailable attribute of a class diagram will perform a Detail on the attribute. If the attribute is already detailed doubleclicking it will make the title of the detailed version the new current focus.

Detail Recursively
If current focus is an attribute of a class diagram and this attribute contains an object descriptor, like e.g. a pattern declaration does, Detail Recursively will display the attribute on detailed form; that is, as a class diagram displaying the attributes of this descriptor. Then it will perform this command recursively on the detailable attributes of the diagram that has now been detailed.
If current focus is a title of a class diagram Detail Recursively will perform a Detail Recvrsively on all attributes that can be detailed in the class diagram.
Search...
By means of the Search command it is possible to search for a substring of a lexem, i.e. a name definition, a name application or a string.
Notice that this command does not search text auxillary to the class diagrams, e.g text in user created labels.
Replace...
Extends the search dialog with a replace text field so that the found text can be replaced with a text specified in this text field.
Layout Subclasses
If current focus is the title of a class diagram and if there are currently displayed sub-patterns of this pattern, Layout Sub-patterns will rearrange the positions of these sub-class diagrams in a manner that makes them appear "nicely" in a tree structure below the selected diagram.
Edged Specialization Connectors
If current focus is the title of a class diagram and if there are currently displayed sub-patterns of this pattern, Edged Specialization Connectors will make specialization connectors only follow horizontal and vertical lines.
Show All...
Hide All...
Show Attributes With...
The four following entries concerns the appearance of the information inside the atributes of the class diagrams - that is, the textual prettyprint of the attributes.

  • Name This is the default prettyprint mode for attributes. This prettyprint mode only displays the name (the NameDecl part) of the declaration.
  • Name and Type In this mode both the name and the type of the declaration inside an attribute is shown.
  • Type This prettyprint mode only displays the type of the declaration.
  • Type and Kind The Name and Kind prettyprint mode displays the name and the kind (e.g. static item symbolised by a '@') of the declaration.
Refresh Page
Redraws the contents of the page.
Scroll Selection Into View
If there is a selection on the current page, this page is scrolled so that the selection is visible.

5.4.6 Graphics Menu

The Create menu commands draw non-formal graphic objects (nodes and connectors).

Connector
Creates a connector between two graphical elements. Click the left mouse on the source and after that click the right mouse on the destination.
Rectangle
Left click to define a corner of the rectangle, drag the mouse untill the rectancle has the desired size and shape, then left click again.
Rounded rectangle
Left click to define a corner of the rectangle, drag the mouse untill the rectancle has the desired size and shape, then left click again.
Ellipse
Left click to define the center of the ellipse, drag the mouse untill the rectancleellipse has the desired size and shape, then left click again.
Polygon
Left click to define each edge of the polygon, then right click to connect the first and last edge.
Label
To create a text label left click the position where you want the text to start. Type the desired text and click anywhere to finish.

5.4.7 Align Menu

All entries in this menu aligns a number of graphical elements (like f.ex. two or more classes). Holding the shift-key down click on each of the elements you wish to align, then select the desired alignment. Alignment will be preserve the position of the first element you clicked, aligning the other elements with respect to this position.

Left side
The selected elements are repositioned so that the left-most edge (of the bounding box) of each of the selected elements appear on the same vertical axis.
Right side
The selected elements are repositioned so that the right-most edge (of the bounding box) of each of the selected elements appear on the same vertical axis.
Top edge
The selected elements are repositioned so that the top-most edge (of the bounding box) of each of the selected elements appear on the same horizontal axis.
Bottom edge
The selected elements are repositioned so that the bottom-most edge (of the bounding box) of each of the selected elements appear on the same horizontal axis.
Horizontal center
The selected elements are repositioned so that the center (of the bounding box) of each of the selected elements appear on the same horizontal axis.
Vertical center
The selected elements are repositioned so that the center (of the bounding box) of each of the selected elements appear on the same vertical axis.
Spacing

A dialog appears and either vertical or horizontal spacing (or both) can be specified.

In the case of vertical spacing the selected elements are repositioned so that the bottom-most edge (of the bounding box) of one element has a distance corresponding to the specified spacing to the top-most edge (of the bounding box) of the next element.

In the case of horizontal spacing the selected elements are repositioned so that the right-most edge (of the bounding box) of one element has a distance corresponding to the specified spacing to the left-most edge (of the bounding box) of the next element.


[2] An aggregation is said to be one-to-many if the multiplicity of the part is one and the multiplicity of the whole is more than one


Mjolner Integrated Development Tool - Reference Manual
© 1991-2004 Mjølner Informatics
[Modified: Friday October 5th 2001 at 10:46]