Purposes
The Arranger is a Structorizer component that allows you to manage a pool of opened diagrams. It is chiefly serving three purposes:
- Its original task is to offer the opportunity to graphically arrange (therefore the name) several Nassi-Shneiderman diagrams on a common canvas. Such an arrangement can be saved as PNG image, but can also be stored in a way that it may be reloaded some time later.
- In addition, Arranger serves as a pool of includable or callable subroutine diagrams for the Executor, i.e. as soon as diagram execution arrives at a Call element, a subroutine diagram with matching signature will be looked for among the diagrams parked in the Arranger. Likewise, diagrams named in the include list of an executed diagram are searched for in the Arranger.
- Closely related with the previous purpose, it may also serve to find and involve called subroutines on code export (also see export options).
Since release 3.29, the diagrams in Arranger are organised in groups, this way reflecting e.g. a common file origin, logical relations, or dependencies. Please see subsection Groups for more details.
How to open the Arranger?
There are four different ways to open the Arranger:
- By executing the shell script Arranger.sh in a Linux environment or the batch file Arranger.bat in a Windows environment, respectively. You find both files in the Structorizer folder (i.e. where you unpacked the downloaded Structorizer package) except you downloaded the Mac OS X version. Alternatively you might start the following command from the command line, provided the Structorizer directory is the working directory:
java -cp Structorizer.app/Contents/Resources/Java/Structorizer.jar lu.fisch.structorizer.arranger.Arranger In this case, the Arranger will start with an empty drawing area (see below how to push diagrams into the Arranger) and will play the role of the master of all Structorizer instances initiated from here. (The remaining ways below all establish the inverse Master-Slave relation, i.e. if Arranger is opened from a Structorizer instance then the latter will be the application master, whereas the Arranger and all Structorizer instances indirectly created via Arranger will depend on the original Structorizer instance.)
- By pressing the Arranger button () in the toolbox or the " Arrange" item in the "File" menu of Structorizer a first time. In this case, Arranger will be opened and the currently edited diagram will be pushed to the Arranger and pinned.
- By loading (or dragging) an arrangement file into Structorizer. In this case, too, the loaded diagrams will be associated to the Structorizer instance, be pinned, and form a group.
- By importing a source file, which contains more than a single main program or subroutine (and not more than the diagram number threshold configurable in the import preferences). All diagrams emerging from the source file will also form a group.
- By outsourcing parts of a diagram into a new subroutine diagram (the derived subroutine diagram will then automatically be placed and pinned in Arranger).
How to put diagrams into the Arranger?
There are several possible ways to put a diagram to an already open Arranger:
- Press the "New Diagram" button in the Arranger toolbar (see image above) to add an empty new diagram to the drawing area. To fill in content, just open a new Structorizer instance by double-clicking the diagram. Now you can edit the diagram in the usual way. All changes you perform will immediately be reflected within the Arranger canvas.
- Select one or more NSD files (e.g. in the respective GUI file manager of your operating system), drag the selection into the Arranger area, and drop it here.
- While working on a diagram with Structorizer, press the tool button or menu item "File › Arrange". This way, Structorizer and Arranger will nearby be associated, and all manipulations with the diagram will be synchronized to the Arranger. The diagram will automatically be "pinned" (see image), which protects it against replacement in the Arranger when the diagram is replaced in the Structorizer.
- Press <Ctrl><C> in an open Structorizer instance while the entire diagram (i.e. the outer framing element) is selected in order to copy it to the clipboard and then press <Ctrl><V> in the Arranger window to paste it here (cf. Copy Element).
- Load a stored arrangement (see next subsection).
- Import source code containing several subprograms (see import options).
- Outsource a subsection of a diagram you work on as a new subroutine diagram, which will automatically be created in the Arranger.
- By summoning the subroutine diagram referenced by a selected CALL element into an editor if that routine diagram hasn't been in Arranger - you will be asked whether you want to create it.
Arranger does its best to find a suited free place without overlapping for any introduced diagram on the canvas.
This may not always seem to work, however, e.g. on outsourcing subroutines, because the diagrams may change their shape after having been allocated based on their former dimension. When loading a stored arrangment (5th way above), the diagrams will in mos cases be placed at the position they had when saved, so they are likely to eclipse other diagrams already residing in the Arranger. Some arrangements, however, may have dynamic allocation, particularly if they were created by batch code import.
Since release 3.29, diagrams or groups of diagrams newly added to Arranger will automatically be selected there, such that you may instantly drag them to another place that pleases you more (see section How to arrange diagrams below).
Before versions 3.29-06 through 3.29-09, drawing and particularly scrolling in Arranger could get inacceptably slow with a very large number of diagrams or very large diagrams. Versions 3.29-06, 3.29-08, and 3.29-09 came with some fundamental improvements in the drawing mechanism particularly in syntax highlighting mode, such that now only the first presentation of a bunch of hundreds of diagrams may take some seconds, then scrolling will be very quick.
In order to remove diagrams from Arranger, you may simply select one or more diagrams (multiple selection was introduced with release 3.29) and then press the "Drop diagram" button or the <Delete> key. If some of the selected diagrams are "dirty" (i.e. have unsaved changes) then you will first be asked whether to save or discard the pending changes. Via <Escape> you may cancel the removal attempt. For the removal of all diagrams from Arranger, version 3.28-05 had introduced a button mode "Remove All": Just press the shift key, and the "Drop diagram" button will immediately change its caption and symbol (as does the "Zoom out/in" button next to it, see next subsection) and now allows you to remove all diagrams at once:
Since release 3.29, you may alternatively use key binding < Ctrl>< A> to select all diagrams in the Arranger. Pressing the ordinary " Drop diagram" button will then have the same effect as " Remove All". You may also remove diagram groups via the Arranger Index (see below).
If several "dirty" diagrams are held in Arranger, you will be asked for each of them whether and possibly where to save them. The message box coming up in this case allows you to apply your decision to all remaining diagrams (versions ≥ 3.28-05):
Groups (versions ≥ 3.29)
Since release 3.29, you may organize diagrams in one or more groups in Arranger. The group concept was introduced to give a better overview, to improve the general handling and to allow the management of sub-arrangements as coexisting "projects", each with consistent sets of dependent diagrams (main programs with numerous subroutines or include diagrams). Hence, groups are subsets of related diagrams that can be loaded, saved, moved, and updated together and independently from others. Of course groups may add to the complexity, on the other hand.
Groups keep track of the member diagrams and their location. So any modification to these properties will set a "changed" status.
There is a default group where all diagrams pushed into Arranger are normally gathered (this is more or less equivalent to the "groupless" general diagram pool of former versions). But there are some useful exceptions: If you load an arrangement file or import diagrams from source code, then the resulting bunch of diagrams will automatically form a group named after the file the diagrams originate from. The same happens when you save an arrangement from a selected diagram subset (see Saving / Storing Arrangements) that had not been a group before: all involved diagrams will automatically form a new group named after the arrangement file you created.
Moreover, you may always select some fancy subset of diagrams and create a new group from them by pressing key combination <Ctrl><G> or by using the popup menu item "Group selected diagrams ...":
Now, how can you be sure that your selection is complete with respect to required subroutine or includable diagrams? Well, here comes the solution: You may select the "Expand selection" menu item (or press <F11>) before you create the group. This function will augment the selected set with all diagrams directly or indirectly required for contained CALL elements or include lists and tell you how many diagrams were added and what referenced diagrams are missing. You can do both at once by using the "Expand and group ..." menu item or key binding <Ctrl><Shift><G>. (You will just not be informed about the expansion and the lacking relations.)
Groups are not required to be disjoint, they may share diagrams. Or, in other words, a diagram may be member of several groups. (Of course it makes handling easier if the groups are disjoint.)
By default, groups are not visible in the Arranger drawing surface. But from version 3.29-01 on there is a checkbox "Show groups" in the status bar (see figure in section Zooming) that allows you to have Arranger showing their bounds als transparently filled rectangles. For better differentiation, the groups are automatically associated with one of upto six different colours. The bounds will appear in the respective group colours. As an additional aid, a tooltip will pop up while you move the mouse over one or more group areas, showing you the grouo names in the group colours:
A second checkbox "Select groups" in the Arranger status bar (you may have to enlarge the Aranger window to see it) will switch the selection policy from diagrams to groups: As soon as you hit a group area, all its member diagrams will immediately get selected.
Apart from that, you may see, inspect, and manipulate the group relations in the Arranger Index tree explained further below. It is placed at the right-hand side of the Structorizer work area as to be seen in the figure:
Since version 3.29-01, there is an easy opportunity to rearrange all diagrams in the Arranger by groups. This function is available via the pop-up menu item " Rearrange by groups" or key combination <Ctrl><R>. This sorts and rearranges the diagrams according to the groups where every group starts to arrange its diagrams in a new "row" (also see subsection Arranger keybindings and pop-up menu).
Zooming
Traditionally (i.e. before version 3.27-08) the diagrams had always the sime size in Arranger as in Structorizer. This tended to get impractical when there are many or large diagrams (or both) parked in the Arranger. To gain an overview of the numerous arranged diagrams, to see a preview how the exported bitmap would look like, or e.g. visually to follow the control flow through an algorithm with deeply nested subroutine calls on execution, you may now simply zoom out as far as necessary by clicking on the zoom button or by pressing the "-" key on the number pad of your keyboard repeatedly:
Each click reduces the size by about 10 % of its former dimensions. Since release 3.29, there is a status bar at the bottom of the Arranger window (see red arrow above) showing you the current zoom factor. The full list of displayed status information is given below (the checkboxes added with version 3.29-01 are explained in section Groups):
- the extent of the drawing area (in pixels),
- the current scrolling viewport intervals (xmin..xmax : ymin..ymax),
- the zoom factor in percent,
- the total number of diagrams / the number of currently selected diagrams (or the name of the one selected diagram),
- whether the bounds of group are shown,
- whether groups are selectable.
The layout of the statusbar has slightly changed with version 3.30-13 (icons partially replace text, new tooltip gives a brief explanation for the diagram info):
If you want to zoom in again, simply press the number-pad "+" key or hold the <Shift> key pressed and click on the zoom button, which will change its icon and effect while the <Shift> key is held down:
Alternatively, you may also zoom in or out by means of the mouse wheel while the <Ctrl> key is pressed, in the way known from many other applications (you may even configure the reverse zooming effect in the "Preferences > Mouse wheel" submenu).
The maximum zoom is 100 %, i.e. you cannot magnify the diagrams larger than they are currently presented in the Structorizer editing environment (as controlled by the font size).
Btw, the last zoom factor of your session is retained in your configuration file (structorizer.ini), so you will automatically start with the same Arranger zoom factor the next time you use Structorizer.
Due to rounding effects, the element texts may sometimes be a little too small or too large for the element size with some zoom factors. (On exporting as PNG, however, these drawing artefacts will not show in the created image file, cf. next paragraph.)
Note that the PNG image export (leftmost button in the menu bar) will compensate the zoom lest the exported picture should suffer from detail losses or degraded resolution. The exported image will always contain the diagrams in original size (i. e. the size they appear in the Structorizer work view). The dimensions on the PNG image may get fairly large with an abundantly filled Arranger, but you may scale or decompose the image file with practically all usual image viewers.
How to arrange diagrams?
The handling of diagrams within the Arranger drawing area is quite straightforward.
Since release 3.29, Arranger allows multiple selection:
- You may drag a selection rectangle with the mouse or
- you may extend the selected set by left-clicking on further diagrams while the <Shift> key is pressed,
- with the <Ctrl> key pressed, you may toggle the selection of the left-clicked diagram;
- with <Ctrl><A> you may select all diagrams in Arranger;
- with <F11> you may expand the currently selected set of diagrams by subroutine and includable diagrams directly or indirectly referenced from any diagram of the already selected set.
In addition, you may select all members of a group by clicking on the respective group node in the Arranger index or, after having enabled "Draw Groups" and "Select Groups" via the checkboxes in the status bar, by selecting a group area in Arranger itself.
You may move the complete lot of selected diagrams if you start dragging on one of the selected diagrams. When you press the mouse button and diagrams are ready to be dragged, then the cursor will change its shape to in order to indicate this opportunity — keep the mouse button pressed while moving the cursor in order to drag the diagrams. Diagrams are not allowed to leave the reachable (positive) coordinate range: if you drag a set of diagrams towards top and/or left margin, those diagrams hitting the boarder will just be held back inside the viewport while other selected diagrams may keep on moving. You may also move the selected diagrams by means of the cursor keys with <Ctrl> being pressed. If you additionally hold the <Shift> key down, the moving speed will be raised by factor 10.
Arranger Key Bindings and Pop-up Menu
For a list of the key bindings see the Key Bindings page. Depending on the OS environment and the selected Look & Feel, more standard key bindings not listed might work, too.
The pop-up menu (see figure above) opening on a mouse right-click allows you the following operations:
- Hit diagrams / groups
Commands a submenu showing all diagrams (at whatever drawing level) that are currently hit by the mouse, i.e. are enclosing the mouse position. This way, you can select and raise to top a diagram that is eclipsed:
If the status bar checkbox "Show groups" is selected then the submenu will also contain the groups enclosing the current mouse position and offer to select one of them (versions ≥ 3.29-01). Prerequisites: None (if the mouse position doesn't hit a diagram or group then there will not be a submenu).
- Expand selection (or <F11>)
Recursively adds all subroutine or includable diagrams that are referenced by some of the currently selected diagrams to the selection set. You will be informed about the number of added diagrams. Prerequisite: At least one diagram must be selected.
- Group selected diagrams ... (or <Ctrl><G>)
Creates a new group from the selected diagrams. If there is already a group containing exactly the same diagrams then you will be informed and may decide whether or not to continue. If you continue you will be asked for the name of the group. The group name should ideally be formed like an identifier (i.e. consist of letters, digits, and underscores) but may e.g. also involve dots. Arranger checks whether there is already a group with the chosen name and lets you decide either to modify the name, to merge the selection into he existing group, or to override the existing group if you don't cancel:
Prerequisite: At least one diagram must be selected.
- Expand and group ... (or <Ctrl><Shift><G>)
Actually combines Expand selection and Group selected diagrams... into a single menu click. Prerequisite: At least one diagram must be selected.
- Inspect attributes ... (or <Alt><Enter>)
Opens the Attribute Inspector dialog for he selected diagram. Prerequisite: A single selected diagram.
- Remove selected diagrams ... (or <Del>)
This will remove all currently selected diagrams from Arranger. You will first be informed about the number of selected diagrams and be asked to confirm the deletion. If some of the diagrams have unsaved changes then you will be asked whether to save the respective diagram before it is deleted. This may raise an additional Structorizer instance if the diagram had not been associated to the current Structorizer instance or if that currently holds another "dirty" diagram (i.e. with unsaved changes). Prerequisites: At least one diagram must be selected.
- Rearrange by groups (or <Ctrl><R>)
As the caption suggests, all diagrams will be placed again, group by group. Every group starts to arrange its member diagrams in a new "row" (the icon illustrates this for two groups, a blue and a red group). If a diagram is member of more than one group then it will simply be arranged in the area of the first arranged group out of its associated groups, the group bounds will therefore overlap.
- Remove all diagrams (no key binding, no matter what the pop-up menu tells!)
As the caption suggests, selecting this menu item will wipe the Arranger (after a confirmation request). As before, if there are diagrams with pending changes, you will have the opportunity to decide what to do (save, discard, cancel).
- Arranger help ... (or <F1>)
If you click on this menu item, Arranger will try to open this very User Guide page in the browser. (It cannot check whether the browser may already be showing the on-line User Guide, so on repetetive activation you may get several open browser tabs or instances.) You will be given an information if the User Guide URL wasn't reachable. Prerequisites: Online connection.
- Show key bindings ... (or <Alt><F1>)
As before, just tries to open the Key Bindings page, focussed on the Arranger key bindings table, in your browser. Prerequisites: Online connection.
Saving / restoring Arrangements
Via the button "Save Arr." (before release 3.29 labelled "Save List") in the Arranger toolbar you may save the arrangement of the previously selected subset of arranged diagrams for later re-use. If nothing was selected (or you use a Structorizer version prior to release 3.29) then the entire Arranger content will be saved. In order to save the complete arrangement, you might also press <Ctrl><A> before, thus selecting all diagrams (but now you might possibly exclude some diagrams that are not to be saved by unselecting them with <Ctrl> key pressed).
Alternatively you may select a group being flagged as "modified" in the Arranger index and then trigger the Arranger index context menu item "Save changes".
In general, you have the choice among two options how to save an arrangement:
- To store the mere arrangement list, i.e. a simple text file with name extension ".arr" containing just the file paths and window positions of the arranged diagrams (but no diagram content!) in CSV format. This is a lean text output (CSV = comma-separated values) and intended for local use where the referenced nsd files stay in place. (Of course, the .arr file might be edited manually to adapt file paths of the referred diagrams if necessary.)
- To store a compressed archive with name extension ".arrz" comprising an ".arr" file as mentioned above plus copies of the ".nsd" files of all arranged diagrams. Such an archive is portable to another computer and will exactly conserve the state of all involved diagrams at the moment of saving. The paths inside the archive are relative such that it can be extracted anywhere (see below).
After having pressed the "Save Arr." button or applied the context menu item "Save changes" to a new group, a message box like in the following screenshot will pop up:
To restore a diagram arrangement from such a saved file you may press the "Load Arr." button (before release 3.29 labelled "Load List") and select either an ".arr" file previously saved or an ".arrz" archive. The file chooser dialog offers file filters for both types. The ".arr" filter is pre-selected but you may switch the filter.
- If you load an ".arr" file but some of the diagram file paths stored in it have become stale in the meantime then the respective diagrams cannot of course be loaded this way (the files not being loadable will be reported in a message box). If some of the diagrams will have been edited meanwhile, however, then obviously the new content will be displayed, not the one they had got when the list was saved.
- If you select an ".arrz" file, in contrast, the packed diagrams will always be accessible but they are copies of the original diagrams. If you change diagrams being part of the .arrz archive and save these changes then the .arrz file will be updated, not the original diagrams that had been arranged before the .arrz file was created. If you save a modified group originating from an ".arrz" file then the archive file will be updated accordingly, i.e. diagrams removed from the group will vanish from the archive file, diagrams added to the group will also be added to the archive, and position changes will be adopted as well.
- Arrangement files of both kinds can simply be dragged into the Arranger window. Moreover, you may also load arrangements via the Structorizer itself — either by selecting such an arrangement in the file open dialog or by dragging such files into the Structorizer work area (though the referenced or contained diagrams will be placed in the Arranger, not in the Structorizer). To restore arrangements via the Structorizer has even the advantage that the imported diagrams will be associated with the active Structorizer instance and be pinned.
Hint: you might replace the file name extension of an ".arrz" file by ".zip" in order to "unzip" it with some standard compressor tool (or you could temporarily associate the .arrz file extension with a standard compressor tool as default program). Thereafter you may load the extracted ".arr" file the way described above. This will work while the corresponding uncompressed .nsd files reside in the same directory.
Structorizer tries to associate the file types ".arr" and ".arrz" to it when started the first time but this may not always work with the launcher from the downloadable zip file. With the WebStart installation, however, it should work since version 3.28-05, but still sometimes the attempt fails (or Webstart even fails as a whole). You might establish such an association manually, however, by means of the respective operation system. Typically you will be offered such an opportunity on double-clicking an existing file of the respective type. (Once such an association is established, the WebSart failure will also be gone.)
PNG Export
Via the button "PNG Export" you can create a PNG file comprising the arrangement of the current diagram selection. As stated in section Zooming above, the current zoom factor is neutralised. If you selected all or nothing then the entire Arranger content will be drawn to file. The dimensions of the exported image are then determined by the maximum of the Arranger window size and the actual bounding box around all arranged diagrams. Since release 3.29, you can export images that contain only subsets of the arranged diagrams. In this case the image will be restricted to the bounds of the selected diagrams and will not show any other diagrams than the selected ones.
Pinning Diagrams
As mentioned in section How to put diagrams into the Arranger, a diagram that had been pushed from a Structorizer instance into the Arranger will reflect all changes the moment it is edited, selected, executed etc. If the diagram is "unpinned" then this dependency even includes replacement, i.e., if you load a different diagram in Structorizer then the related diagram instance shown in Arranger would also be replaced synchronously. To avoid this, diagrams may be "pinned" in the Arranger (select the diagram and then press the "Pin Diagram" button). The pinned mode is indicated by a blue pin icon in the upper right corner of the diagram. For convenience, the pinning is automatically done on pushing diagrams from Structorizer to Arranger. Pinned diagrams still show all changes while shared but are not replaced when you start a new diagram or load another diagram in the related Structorizer instance. The "Pin Diagram" button actually toggles the pin status, i.e. to "unpin" a pinned diagram just press the same button.
Since release 3.29, you may apply the pinning action to an entire lot of selected diagrams. They will first all be pinned if at least one of them had not been pinned so far. If all of them had already been pinned then they will all be unpinned on pressing the button.
Setting Diagrams Test-covered
There is a button "Set Covered", introduced to support the feature Runtime Analysis. (The button is shown in disabled state in the screenshot at the top of this section.) While the test-coverage tracking mode is activated, you may flag a subroutine diagram parked here as "fully test-covered" such that routine calls to this diagram would immediately be marked as covered even in "deep test coverage" mode (see Runtime Analysis) whithout having to wait until the routine code will actually be covered completely by repeated tests. To withdraw the "test-covered" state just press the "Set Covered" button again — Arranger will simply ask you for confirmation to make sure you didn't touch it by mistake.
Since release 3.29, the action of setting the test-covered flag applies to all currently selected diagrams at once. If at least one of the diagrams has not been flagged test-coverd, then all will be switched into the test-covered state. Otherwise (i.e.if all selected diagrams had already been marked as test-covered) you will be asked for confirmation to reset the test-covered status of all of them. After the action has been executed, the selection will be cleared in order to avoid inadvertent flickering of the test-covered flag on the implicated diagrams.
Arranger Index
As soon as diagrams are placed in the Arranger, the Structorizer GUI (in all associated Structorizer instances, to be more precise) will show a scrollable index tree of the groups and diagrams currently held by the Arranger. It is placed just right of the work area (see figure below, since release 3.30 it shares a tabbed pane with the Code preview in the same place):
You may switch on or off the display of the Arranger index by key binding <Shift><F3> or menu item "View › Show Arranger Index". While the Arranger is empty, the Arranger index will always be invisible. So, if the Arranger index does not automatically get visible (or the "Arranger index" tab cannot be selected) after having pushed or loaded diagrams to Arranger then check the "Show Arranger Index" status in the Diagram menu.
On the first tree level, the index presents diagram groups, designated by their name and the number of their member diagrams. If a group has been modified, an asterisk preceding the group name will indicate the "changed" status. Registered modifications of a group are:
- addition or removal of one or more member diagrams,
- signature changes of one or more member diagrams,
- location changes of one or more diagrams.
In the Arranger index, three types of groups are visually distinguished by their backing status, each of them symbolized by a different icon:
- A group not backed up by a file (this icon is also used as a general symbol for groups);
- A group originating from or backed up by an arrangement list file (locally bound);
- A group fully backed by a compressed archive file (portable).
Next to the group type icon, a small coloured rectangle indicates how the group bounds will be shown in the Arranger when drawing of group bounds is enabled.
If you expand a group node then the list of member diagrams will unfold on the second level. Each diagram node shows its type icon (main program / subroutine / includable), its signature (name + number of arguments), and file path (if already saved or loaded from file). The member diagrams of a group are sorted by type (main programs first, then subroutines, at last includables) and signature (lexicographically among the diagrams of same type). Diagrams with unsaved changes are marked with an asterisk preceding the name.
Since release 3.29, a "discontiguous" tree selection is supported, i.e. you may select many sequential or isolated nodes. To do so, just do the usual mouse clicks together with <Shift> (contiguous expansion of the selection) or <Ctrl> (toggles the selection of the hit node). Since clicking onto a node has side effects (see below), you may prefer to walk with the cursor keys up and down instead. While traversing with the cursor keys, however, <Ctrl> and <Shift> have a slightly different effect and allow only contiguous selection. Cursor keys <Left> and <Right> as well as e.g. <Numpad-> and <Numpad+> collapse or expand the group nodes, respectively.
By clicking on one of the diagram nodes (or by pressing the <space> key), the Arranger will scroll to the referred diagram, bring it to top drawing level (if partially eclipsed by others) and highlight it. (This will not modify the zoom factor in Arranger.) So you can identify the diagrams even in case the zoom factor doesn't allow to make out the names of the diagrams. By clicking on one of the group nodes, Arranger will scroll to an area occupied by member diagrams of the group and select all member diagrams there instead of the diagrams selected before. So you could now simply move the entire passel of a group by mouse dragging or by using <Ctrl><up>, <Ctrl><down>, <Ctrl><left>, and <Ctrl><right> keys in the Arranger window.
Double-clicking one of the diagram nodes (or pressing the <Enter> key) will fetch the related diagram and let it replace the one that had resided in the Structorizer work area before. If the diagram to be replaced has got pending changes then you will be asked whether to save the changes first. (Provided the diagram is also present in Arranger, the changes wouldn't get lost if you decline, but the risk of inadvertent losses may increase.) Double-clicking a group node will (beside toggling expanded/collapsed status) open an element info box (see below) for the group.
A context menu (see screenshot below) offers specific operations on the groups and diagrams and their relation.
The effect of the menu items and specified accelerator key bindings may depend on the selection. The menu items are explained here:
- Get diagram (or <Enter>)
Fetches the selected diagram and brings it into the diagram work area of Structorizer. If the recent diagram had pending changes, you will be asked whether to save or to discard them. Prerequisites: Single selected diagram node.
- Inspect attributes ... (or <Alt><Enter>)
Opens the Attribute Inspector dialog for he selected diagram. Prerequisite: Single selected diagram node.
- Diagram/group info (or <Ctrl><I>)
Opens a dialog box with informations about the currently selected group or diagram. The information about a group includes:
- Name, colour, and number of member diagrams
- Arrangement file path (if persistent)
- Number of shared member diagrams
- Whether there are detected modifications (green or red light):
- whether the set of diagrams has changed
- whether diagram positions have changed
- Whether the group is complete (green light) or incomplete (red light) with respect to referenced subroutines and includables (subtrees will show referenced diagrams that are not member of the group but available in other groups and signatures of referenced diagrams that are missing altogether in Arranger).
- In the button bar you may:
- individually enable or disable the representation of this group in the Arranger tableau (provided "Show groups" is switched on); while disabled, the colour preview will vanish from the icon);
- select the colour of the group among the six available paintbox buttons.
The information about a diagram is a tree with the diagram description as root node and the following sub-nodes:
- Containing groups: the leaf nodes are all groups this diagram is member of
- Arrangement file path (if persistent)
- Called subroutines: the leaf nodes (if any) represent the subroutine diagrams that are directly or indirectly required by CALL elements of this diagram
- Referenced includables: The leaf nodes (if any) represent the includable diagrams that are directly or recursively named in the include list of this diagram
- Stale diagram references: The leaf nodes (if any) name the signatures of subroutines or includables directly or indirectly referecend from this diagram but do not exist in Arranger
Prerequisite: Single node selected.
- Save changes
All modified groups and diagrams among the selection are saved. As far as they have already been associated to a file, the existing file will simply be updated (synchronized), otherwise you will be requested to choose a file path and — in case of a group — the type of arrangement file (list or compressed archive, see Saving / Storing Arrangements) to be created. Unmodified diagrams will only be saved if they are part of a modified group associated to a compressed archive. Apart from this exception, unmodfied groups or diagrams will not be saved, even if they are selected. Objects that had never been saved, are flagged as modified by definition, so they will be saved after file name and mode are specified unless you cancel the action on that occasion. Prerequisite: At least one selected node.
- Test-covered on/off
This marks the selected subroutine and includable diagrams as test-covered if at least one of them hadn't been. Otherwise all of them lose the fake test-covered status (see Setting Diagrams Test-covered for details). Prerequisites: Only subroutine or includable diagram nodes selected and Executor is in Runtime Analysis mode. (Genuinely acquired test coverage status cannot be withdrawn this way, of course.)
- Remove (or <Del>)
This will remove all currently selected groups and diagrams from Arranger. If both group and diagram nodes are selected then you will first be warned that this might lead to somewhat unexpected results. But you may insist. You will then be informed about the number of selected groups and be asked for your confirmation to delete unshared members of the selected diagrams (you may alternatively decide to move them to the default group, which is effectively what happens on dissolving the group). If a doomed group has pending changes, this will raise the next confirmation box, and you may decide to save or to discard the changes. After all selected groups have been handled you will next be asked to confirm the deletion of the remaining selected diagrams. If some of the diagrams have unsaved changes then you will be asked again whether to save the respective diagram before it is deleted. (This may raise an additional Structorizer instance if the diagram had not been associated to the current Structorizer instance or if that currently holds another "dirty" diagram, i.e. with unsaved changes.) Prerequisites: At least one selected node.
- Export diagram/group (new since version 3.30-07)
Via the submenu items of this entry you can export the selected diagram or group to any of the supported programming languages (cf. Code Export) or as flowchart file (.pap) for PapDesigner (see Export as flowchart). In contrast to the export of a single diagram (possibly involving all diagrams recursively called or included), the group export is specifically well suited to create libraries of several routines that do not necessarily refer to one another. All they have to be in order to be exported is members of the selected group. The file created by group export may contain more than one module, though. So it may have to be cut into separate files at certain marker lines ("scissor" lines, looking like "=== 8< ==="). This is the consequence if there are several mutually excluding entry points in the group, e.g. two or more diagrams representing main programs. In such a case there will usually be a "library module" at the beginning of the file, containing the common prerequisite routines of the different depending modules (which may consist of a main program and several subroutines not shared with other programs of the group) that are appended after a separating "scissor line" each. The export result is similar to that of a batch export of an arrangement file. Export option "Involve called subroutines" has a slightly different meaning when you export a group: If enabled then referenced diagrams from other arrangement groups may be involved, otherwise the dependency analysis is confined within the selected group. (You will get a warning if certain called diagrams weren't found within the group, though.) If this menu item is missing in versions ≥ 3.30-11 then this is likely due to an imposed code export/import suppression via a central predominant ini file option (see Code Export Configuration notes). Prerequisites: Single diagram or single group selected, not in I/O-suppressed mode.
- Create Group ... (or <Ctrl><G>)
Creates a new group from the selected diagram (and group) nodes. Note that if a group node is among the selection then all its member diagrams will be regarded as part of the selection, no matter whether they are individually selected or not. If there is already a group containing exactly the same diagrams then you will be informed and may decide whether or not to continue. If you continue you will be asked for a name of the group. The group name should ideally be formed like an identifier (i.e. consist of letters, digits, and underscores) but may also involve dots. Arranger checks whether there is already a group with the chosen name and lets you decide either to modify the name, to merge the selection into the existing group, or to override the existing group — if you do not back off by pressing "Cancel":
Prerequisite: At least one node must be selected.
- Expand group ... (or <Ctrl><Shift><G>)
The effect of this menu item depends on the selection:
- Single group node selected: The selected group will be expanded to contain all recursively referenced subroutine and includable diagrams. These diagrams will also remain members of the groups where they were found (shared among the groups).
- Only diagram nodes selected: First retrieves all directly or indirectly referenced subroutine and includable diagrams, then forms a new group from the expanded diagram set. Further details see menu item Create group above.
- Dissolve group (or <Ctrl><#>)
Simply detaches all diagrams from the selected group but preserves the diagrams themselves: Diagrams that are not shared by other groups will be moved to the default group (which will be created if it hadn't existed before). If the emptied group is related to a file then you will be asked whether it is to be removed, otherwise it will be removed automatically. To dissolve the default group is allowed but may not empty it if it contains diagrams not shared by other groups. In the event, diagrams remaining in the default group will definitely be unshared, so to get rid of them you can then simply remove the default group. Prerequisite: Single selected group node.
- Detach from group (or <Ctrl><->)
Removes the selected diagrams from their respective owning groups (according to the selected paths). As with Dissolve group, diagrams will not be deleted. If they are not shared by any other group they will be moved to the default group (which is created if it had not existed before). If a group happens to be emptied then it will be removed unless it was related to a file and you declined the confirmation request for its deletion. Prerequisite: At least one diagram node selected, selected group nodes are ignored.
- Add/move to group ... (or <Ctrl><+>)
Attaches the selected diagrams to a target group. The choice box for the target group as being popped up is shown in the figure below. You can only select among existing groups (though you are of course free to create a non-empty group via menu item Create group before) with exception of the default group, which is not in the list. Along with the choice you are requested to decide whether the diagrams are simply to be given an additional group membership ("Add to group") or if they are to leave their source group (according to the selected path in the index tree, "Move to group").
Prerequisite: At least one selected diagram node (selected group nodes are ignored).
- Show group (or <Ctrl><Alt><G>)
Checkbox menu item to enable / disable the visibility of the selected group and its member diagrams in Arranger. Prerequisite: Single group selected.
- Rename group (or <Shift><Alt><R>)
Allows to modify the name of the selected group (versions ≥ 3.29-04). If the group is associated to an arrangement file (list or archive) then you will be offered the option to change the name of the associated file as well.
- Remove All
As the caption suggests, the action of this menu item will clear the Arranger i.e. remove all groups and diagrams (after a confirmation request), and with it the Arranger index. As before, if there are groups or diagrams with pending changes, you will obtain the opportunity to decide what to do (save the diagram(s), discard the changes, cancel the action). Eventually you will be informed that the groups have been emptied and you will be asked to confirm that they may also be removed. It is not recommended to let them stay with the pending changed status, because if you accidently save all changes you woud empty the associated files, too.
- Show qualifiers as prefix (since release 3.31)
In case of diagrams imported from OOP languages like Java or Processing, a package or namespace qualifier might be associated to eahc of the diagrams. If this checkbox menu item is selected (the default) then the node text will show the entire qualifier path as name prefix. If you unselect it then the diagram nodes will be arranged in a multi-level tree according to their namespace relations (member classes/methods als children of their containing class node). This may reflect therelations even better but requires more synchronisation time on routine pool changes, the frequent tree updates might induce a heavy GUI contention. So use it with care. For ordinary diagrams this setting has no effect at all.
- Hide Arranger Index (or <Shift><F3>)
As the caption says, this is just another way to make the Arranger index temporarily invisible.
You may reduce or enlarge the width of the Arranger index viewport simply by moving the divider rightwards or leftwards. As already mentioned, you may hide the Arranger index entirely by unselecting the menu item "View › Show Arranger index?". Alternatively, you may also toggle the index visibility with keystroke <Shift><F3>.
Diagram work area, Arranger index, and Analyser report list form a focus ring where you may navigate by the <Tab> key in clockwise and by <Shift><Tab> in counter-clockwise direction. Since many actions force the focus back into the working area, the Arranger Index changes its background colour when it gains or loses focus. While the focused colour depends on the selected Look & Feel (usually white but may also be e.g. dark gray), the unfocused colour will always be the light gray shown in the figure above. So you will be aware whether the Arranger index has the focus or not. This may be important for the effect of overloaded key bindings. Note: If you have changed the Look & Feel while the Arranger index tree was visible, problems may arise, e.g., it might no longer react to some menu items or key bindings. (In versions before 3.29-03, the context menu might have shown duplicate icons etc.) In such a case save all changes and start Structorizer again. Then the Arranger index will be working correctly with the chosen Look & Feel. |