Import Graph

The Import Graph plugin displays in a graph all files imported to the KB. The file in bold black is the current file open in the Text Editor, and files in bold gray are files imported as a result of the current file. Gray arrows illustrate the import dependencies between files.

Double click family.flr in Sunflower’s project navigation window to load it into the Text Editor. Click the Import Graph tab to launch the plugin. A dependency graph of all imported files is shown in the plugin window. Fig. 86 shows all files which have import relationships with family.flr.

**Import Graph** window showing files imported by family.flr

Fig. 86 Import Graph window showing files imported by family.flr

Click to select the node flr/domain/engineering/engineering_value in the Import Graph window. The selected node is highlighted in yellow, and the View Dependencies from/to Selected Node checkboxes become editable. By default both checkboxes are checked to show all import links to and from the selected node, as seen in Fig. 87.

Import dependencies of highlighted node flr/domain/engineering/engineering_value

Fig. 87 Import dependencies of highlighted node flr/domain/engineering/engineering_value

Uncheck the View Dependencies from Selected Node checkbox. This action suppresses all import links from flr/domain/engineering/engineering_value, leaving only flr/family/family which imports flr/domain/engineering/engineering_value. This can be seen in Fig. 88.

Import links from flr/domain/engineering/engineering_value are suppressed

Fig. 88 Import links flr/domain/engineering/engineering_value are not suppressed

Similarly, unchecking the View Dependencies to Selected node checkbox suppresses import links to flr/domain/engineering/engineering_value which includes flr/family/family, as seen in Fig. 89.

Import links to flr/domain/engineering/engineering_value are suppressed

Fig. 89 Import links to flr/domain/engineering/engineering_value are suppressed

The Inverse Import option, when checked, shows all files in the KB which import the current file. To see an example of Inverse Import, double click Peter.flr in the navigation window to load it into the Text Editor. You will see an empty graph in the Import Graph window for Peter.flr because Peter.flr does not import any file, as shown in Fig. 90.

No file is imported by Peter.flr

Fig. 90 No file is imported by Peter.flr

Check the Inverse Import checkbox, and family.flr shows up. This is because Peter.flr is imported by family.flr. This can be seen in Fig. 91.

**Inverse Import** shows family.flr in **Import Graph** for Peter.flr

Fig. 91 Inverse Import shows family.flr in Import Graph for Peter.flr

In the context of Import Graph, the Reset button does not restore settings such as Inverse Import or View Dependencies from/to Selected Node. These checkboxes must be reset explicitly. The function of the Reset button is to restore the current graph to before any manual rearragnement by the user.