Structure block overview (tool for software maintenance)
What do I need this tool for?
The tool is mainly used to clean up the project. With this tool you can find macro and program blocks, which are not used in your project. The tool supports you when deleting blocks.
If you develop pure Linked Projects (macros of these projects are used for other projects), you can use the tool to check if all provided macros are in the test program at least once.
The structure block overview can be found over an additional entry in the „tools“ menu or a command in the „tools“ toolbar after the according configuration of the programming system. Alternatively, it can be found in the standard dialog for deleting structure blocks (“Structure block” → “Delete…”).
The overview is a modal dialog with two library trees. The first tree corresponds to the project tree in run mode and directly or indirectly shows the structure blocks hierarchically implemented in the configuration (&MAIN). In the second tree, all programs and macros of the project, which are never called, are listed in the first level. The macros which might be in a lower level are in hierarchical order. Programs and macros from Linked Projects are marked with turquoise symbols as usually. Additionally, macros, which are implemented in the project tree, are marked with yellow and red symbols. If the overview was called in edit mode, the context menu can be called for the program or macro blocks in one of the two trees with the commands “Delete” and “Delete all”. When selecting “Delete”, the structure block and all its calls are deleted from the project. When selecting “Delete all”, the system checks if there is any macro block directly or indirectly implemented in the selected structure block, which is also used by other structure blocks. If that is the case, a message will occur and the user can either delete all structure blocks in that part of the tree, or only the ones, which are not used by other structure blocks or cancel the whole operation. After closing the dialog, the structure block can be restored successively by using the command “undo”. In run or online mode the context menus cannot be called.
To add a new command in the “tools” menu, the file IMENUEXTRAS.CFG has to be edited. The file can be found in the BIN-, BIN → GERMAN or the BIN → ENGLISH directory and/or in the project directory. Global settings are made in the file in the BIN directory or in the directory of the current language. However, the configuration file in the language directory is regarded prior to the file in the BIN directory. When loading a project, the menu is built according to the IMENUEXTRAS.CFG file. If this file is not available, global settings are used. The name of the new command is specified under [EXTRAS]. The numbers have to be continued, as f.e.:
4=DMI Mask Designer...
5=DMI Block Browser...
6=DMI Ressource Manager...
description=Overview of the structure blocks contained in the project
Furthermore a new section with the name of the DLL and the export function to call the structure block overview has to be added. As designation of the section, the same number as in the upper list has to be used.
Behind “description”, the status line text is given, which appears when selecting the command. The entry “image” is used for the addition of the “tools” toolbar. It contains the index 0 of the according symbol. The symbols have a resolution of 16×16 and are included in the IMENUEXTRAS.BMP in the BIN or language directory. If no symbol can be found for the indicated index, a hammer is shown as default symbol. Alternatively, the structure block overview can also be selected with the command “Structure block” → “Delete…”. Accordingly, the following entry has to be entered in the ICON.INI under [SYSTEM]:
Without this addition, the standard dialog for deleting structure blocks is called with this command. The advantage of this setting is, that it only has to be executed in one place, whereas the IMENUEXTRAS.CFG has to be edited in all project and template directories. However, a toolbar button cannot be created for “Structure block” → “Delete”.