9.3. The File Menu

These are actions concerned with input and output and the overall management of projects and the ArgoUML system.

9.3.1.  New

Shortcut Ctrl-N.

This initializes a new project within ArgoUML. The project is created without a the name. It contains a (top-level) Model named untitledModel and two empty diagrams: a class diagram and a use case diagram.

[Caution]Caution

untitledModel is not a conventional model name (most processes suggest models should start with an upper case letter). ArgoUML permits you to use a lower case letter, but a critic will trigger to warn that this is not conventional. See Section 15.2, “The Model” for a discussion of this.

If the model has been altered (as indicated by the "*" in the titlebar of ArgoUML's window), then activating the "New" function is potentionally not the user's intention, since it will erase the changes. Hence a confirmation dialog appears to allow the user to save his work first, or cancel the operation completely.

Figure 9.1. The confirmation dialog for New.

The confirmation dialog for New.

9.3.2.  Open Project…

Shortcut Ctrl-O.

This opens an existing project from a file. Selecting this menu option will open a file selection dialog (see Figure 9.2, “The file selection dialog for Open Project….”).

Figure 9.2. The file selection dialog for Open Project….

The file selection dialog for Open Project….

At the top of the dialog is a drop down selector labeled Look in:, specifying the currently selected directory preceded by the folder icon, . The drop down selector gives access to all directories above this directory.

Next to this are four icons: to move up a directory; to select the users home directory, to specify that a simple file list is displayed; and that shows details of all files.

The main body of the dialog is a text area with a listing of all directories and files in the currently selected directory which match the current filter (see below). If these will not all fit on the display, scroll bars are provided to browse through the list.

Hence, navigating up a directory tree is possible by selecting a directory in the drop down selector at the top of this dialog. Navigating deeper in the tree happens by double clicking button 1 on the directory shown in the main text area.

In the lower portion of the dialog is a text box labeled File name: for the name of the file to be opened. The file name may be typed directly in here, or selected from the directory listing above using button 1 click.

Beneath this is a drop down selector labeled Files of type: to specify a filter on the files to be shown in the directory listing. Only files that match the filter are listed. The available filters are listed below. The default filter is the second one (.zargo).

  • All Files

  • Argo compressed project files (*.zargo)

  • Argo uncompressed project file (*.argo)

  • XMI Metadata Interchange (*.xmi)

Argo uncompressed project files (*.argo) were produced by earlier releases of ArgoUML. XMI files allow you to use diagrams from other tools (which may not alweays work, since ArgoUML is only compatible with XMI for UML 1.3).

To the right of the file name and filter are two buttons, Open and Cancel to open the selected project or cancel the operation.

[Note]Note

Open will only succeed if a valid filename is provided.

9.3.3.  Save Project

Shortcut Ctrl-S.

This saves the project using its current file name. Use Save Project As… to save the project to a different file. If no filename is given yet (e.g. after New), then this function works exactly as Save Project As….

[Note]Note

In certain circumstances, there is nothing to save, and this menuitem is downlighted. E.g. when the user did not yet alter a loaded project. The presence of a "*" in the titlebar of ArgoUML's window indicates that the current project is “dirty” (has been altered), and can be saved.

9.3.4.  Save Project As…

This opens a dialog allowing you to save the project under a different file name (or to specify a file name for the first time if the project is a new project).

The dialog box is almost identical to that for Open Project (see Figure 9.2, “The file selection dialog for Open Project….”). The Files of type: drop down selector also specifies the file type used for saving, but only the .zargo format is available. The extension of the filename is automatically set.

9.3.5. Revert to Saved

This menu-item allows you to throw away all your recent changes, and reload the last saved version of the current project. It works a bit like an Undo feature, but only restores changes done since the last time the file was saved.

This menu-item is downlighted unless the currentproject has been saved or loaded before (i.e. it has a name), and it has been altered.

When this menu-item is activated, a small confirmation dialog box opens, as shown in the figure below. This warning that all recent changes will be discarded, is needed because the action can not be undone. Selecting No cancels the whole action as if you did not select the menu-item in the first place. Selecting Yes reloads the last saved file.

Figure 9.3. The warning dialog for Revert to Saved.

The warning dialog for Revert to Saved.

9.3.6.  Import Sources…

A very powerful feature of ArgoUML is that it can “Reverse Engineer” Java code to yield a class diagram. This sub-menu entry specifies Java code to be imported for reverse engineering.

The dialog box is very similar to that for Open Project (see Figure 9.2, “The file selection dialog for Open Project….”), but with two extra tabs placed alongside the directory listing, as shown in Figure 9.4, “The file selection dialog for Import Sources….”).

Figure 9.4. The file selection dialog for Import Sources….

The file selection dialog for Import Sources….

Those fields that are the same as Open Project behave in the same way (see Section 9.3.2, “ Open Project…”).

Next to the "All Files" file filter, there is only the default filter "Java Source File (*.java)".

The first of the two tabs is labeled General and is selected by button 1 click on its tab. It provides a combo box for the language selection (in V0.14 of ArgoUML only Java can be chosen), and the following check boxes:

  • Descend directories recursively. If enabled (the default), reverse engineering will track through sub-directories for any further Java files. If not it will restrict to the selected directory.

  • Create diagrams from imported code

  • Minimise Class icons in diagrams. If enabled, then the attributes and operations compartiments will not be shown in the classes on the generated class diagrams.

  • Perform Automatic Diagram Layout

The second of the two tabs is labeled Java and is selected by button 1 click on its tab. It provides two pairs of radio boxes.

  • The first radio box allows selection between modeling attributes of Java classes as UML attributes (the default) or as UML associations to the class specified.

  • The second radio box allows selection between modeling arrays as new datatypes in their own right (the default) or as their base datatype with multiplicity.

9.3.7.  Page Setup…

This brings up the standard dialog box provided by the operating system to adjust printer paper size, orientation, and other options.

9.3.8.  Print…

Shortcut Ctrl-P.

This brings up the standard dialog box provided by the operating system allowing the current diagram to be printed out.

In some cases, when the printing is started, the dialog box of Figure 9.5, “The diagram exceeds page size dialog. ” appears. Selecting the "Fit to page" button does print the whole diagram fitted on one page by scaling it down. Which might cause all text to be too small to read in case of big diagrams, but it is a quick and easy way to get an usable printout. Selecting the "Multiple pages" option does print unscaled, by dividing the diagram in pieces, on as many pages as needed. Pressing the close button of the dialog does the former option.

Figure 9.5. The diagram exceeds page size dialog.

The diagram exceeds page size dialog.

[Warning]Warning

If the current diagram contains no selected artifacts, then the whole diagram is printed. However, if one or more artifacts are selected, then only the area they cover is printed! If scaling is selected (by the "Fit to page" choice in the dialog box descibed above), then the scaling is done on basis of the selected artifacts only. If scaling is not chosen (or in case it is not needed), then all pages containing a selected artifact are printed.

9.3.9. Save Graphics…

This menu entry brings up a dialog box allowing the currently selected diagram (in the editing pane) to be saved in one of a number of graphic formats.

The dialog box is identical to that for Open Project (see Figure 9.2, “The file selection dialog for Open Project….”), except for the Files of type:. The chosen filetype specifies the graphics format used for saving. The filename is automatically extended with the corresponding ending (if not entered already). A default filename is generated based on the diagram name.

The available graphics types are:

  • GIF image (*.gif)

  • Postscript file (*.ps)

  • Encapsulated Postscript file (*.eps)

  • Scalable Vector Graphics file (*.svg)

The GIF format is the default.

[Caution]Caution

You should be aware that there are patent issues surrounding GIF files and act accordingly. There are currently no such concerns about SVG.

9.3.10. Save Configuration

ArgoUML has various user specific configurations that can be set, both through the Settings… entry on the Edit menu (see Section 9.4.7, “ Settings…”) and directly on the various panes. This menu entry saves the information in the file argo.user.properties. The location of this file is in the "users home directory", which is defined as ${user.home}, and can be determined as described in Section 9.4.7.2, “Environment Tab”.

[Tip]Tip

This is a text file, which you can edit to configure ArgoUML.

9.3.11. Most Recent Used Files

ArgoUML remembers a few of the most recently saved files, and lists then here, to enable loading then in the most simple way.

The maximum number of files that is listed here, can be adjusted in the Edit -> Settings… menu. The list of files is stored in the argo.user.properties file in the user's home directory.

9.3.12. Exit

Shortcut Alt-F4.

This closes down ArgoUML. A warning message will pop-up if you have a project open with unsaved changes asking if you wish to save it. See Figure 9.6, “The save changes dialog. ”. The options are:

  • Yes (save the project and exit ArgoUML);

  • No (do not save the project, but still exit ArgoUML); and

  • Cancel (do not save the project and do not exit ArgoUML).

  • The dialog box can also be closed by clicking in the close button in the window border. The effect is the same as selecting "Cancel".

Figure 9.6. The save changes dialog.

The save changes dialog.