.. _section-Import Graph: 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. :numref:`figure-ImportGraph-ui.png` shows all files which have import relationships with family.flr. .. _figure-ImportGraph-ui.png: .. figure:: ../../figs/ImportGraph-ui.png :alt: **Import Graph** window showing files imported by family.flr **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 :numref:`figure-ImportGraph-engineering-value-node-highlighted.png`. .. _figure-ImportGraph-engineering-value-node-highlighted.png: .. figure:: ../../figs/ImportGraph-engineering-value-node-highlighted.png :alt: Import dependencies of highlighted node flr/domain/engineering/engineering_value 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 :numref:`figure-ImportGraph-uncheck-view-from-engineering-value.png`. .. _figure-ImportGraph-uncheck-view-from-engineering-value.png: .. figure:: ../../figs/ImportGraph-uncheck-view-from-engineering-value.png :alt: Import links from flr/domain/engineering/engineering_value are suppressed 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 :numref:`figure-ImportGraph-uncheck-view-to-engineering-value.png`. .. _figure-ImportGraph-uncheck-view-to-engineering-value.png: .. figure:: ../../figs/ImportGraph-uncheck-view-to-engineering-value.png :alt: Import links to flr/domain/engineering/engineering_value are suppressed 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 :numref:`figure-ImportGraph-Peter.png`. .. _figure-ImportGraph-Peter.png: .. figure:: ../../figs/ImportGraph-Peter.png :alt: No file is imported by Peter.flr 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 :numref:`figure-ImportGraph-inverse-import-Peter.png`. .. _figure-ImportGraph-inverse-import-Peter.png: .. figure:: ../../figs/ImportGraph-inverse-import-Peter.png :alt: **Inverse Import** shows family.flr in **Import Graph** for Peter.flr **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.