Analyze code

Follow these steps to learn how to reverse engineer an application with Dependency and Sequence diagrams, resources provided by Genero Code Analyzer.

  1. Right-click the OfficeStore Model group node and select Open Dependency Diagram.
    Dependency diagrams display a graphical view of the complex relationships between components of a project and can be opened at the group or application level.
    Figure: Option to open a Dependency Diagram

    This figure shows how to open a Dependency diagram at the project group level.
    Figure: Dependency Diagram

    This figure is a screenshot of the Dependency Diagram for OfficeStore.4pw.
  2. Right-click the src node in the Dependency diagram and select Expand from the context menu.
    The src node expands to display all the sub-components and the relationships between them.
    Tip: Zoom in and out by holding down the Ctrl key while using the mouse wheel.
  3. Use a filter to focus on the dependencies between components of the Accounts application:
    1. Right-click anywhere in the Dependency diagram margins and select Filter Items...
    2. In the Select items to filter dialog, deselect all items except Account_prg, AccountForm_ui, and AccountForm_uidialog.
    3. Press OK.
    Figure: The Filter view

    This figure shows the Filter view with all items deselected except Account_prg, AccountForm_ui, and AccountForm_uidialog.
  4. Select the link between AccountForm_ui and AccountForm_uidialog to display associated function calls in the Function Calls view.
    Details about function calls between the selected modules are shown in the Function Calls view and the project structure displays as a tree in the Dependency Diagram Structure view.
    Figure: The Function Calls and Dependency Diagram Structure views

    This figure shows the selected link between the AccountForm_ui and AccountForm_uidialog nodes in the Dependency diagram. It also shows the resulting details about the function calls in the Function Calls view, with the AccountForm_ui_uiInput function highlighted.
  5. Right-click on the AccountForm_ui_uiInput function in the Function Calls view and select Open Sequence Diagram.
    The diagram shows the logic flow of AccountForm_ui_uiInput, with the starting point indicated by the stick-figure representing the user who interacts with the application. The boxes represent functions in the AccountForm_ui.4gl module, and the sequence is indicated by the order in which the boxes are listed. Plus/minus signs on each box allow you to display or hide sub calls.
    Figure: A Sequence diagram

    This figure is a screenshot showing a Sequence diagram of the AccountForm_ui_uiInput function.
  6. Right-click the box for the AccountForm_uidialog_recAccount_uiInput() function and select Show Sub Calls.
    Figure: Sequence diagram with expanded function box

    This figure shows the AccountForm_uidialog_recAccount_uiInput function box expanded to show subcalls.
  7. Close the AccountForm_ui_uiInput Sequence diagram tab and the OfficeStore.4pw Dependence diagram tab in the Code Editor view to complete the tour.