.. _Views:

Views
=====


Code Templates View
-------------------

.. include:: code-templates-view-content.rst

.. _Compile Order View:

Compile Order View
------------------



The **Compile Order View** presents the hierarchy of compiled files as it results from the **`include** compiler directives, starting from **the project top files.**

Open the view from menu **Window > Show View > Other... > DVT > Compile Order**.

**Double click** on a file to open it.

You can use :ref:`CamelCase` or :ref:`Simple Regex` to locate a specific element.

.. figure:: ../../images/vhdl_compile_order_view.png
	:align: center




.. list-table::
	 :header-rows: 1
	 :widths: auto

	 * - .. figure:: ../../images/icons/obj16/vlog_file_gray_obj.png
	   - A file that is not part of the current project (files are not under the project directory).
	 * - .. figure:: ../../images/icons/obj16/vlog_file_obj.png
	   - A file in your project.

.. _Build Config Hierarchy:

Build Config Hierarchy
~~~~~~~~~~~~~~~~~~~~~~


Press **Show Build Config** button to open the build config hierarchy as it results from the '-f' compile directives, starting from the **active build configuration**.

.. figure:: ../../images/common/compile_order_build_config_hierarchy_button.png
	:align: center




**Note**: Each invocation section will be added under the coresponding build configuration file.

.. figure:: ../../images/common/compile_order_build_config_config_hierarchy.png
	:align: center


.. _Quick Compile Order View:

Quick Compile Order View
~~~~~~~~~~~~~~~~~~~~~~~~



Press :kbd:`Ctrl+I` to quickly open a compiled file.

The **Quick Compile Order View** will pop-up and and present a filterable list of all the compiled files in the project. 

You can use :ref:`CamelCase` or :ref:`Simple Regex` to locate a specific element.

Select a file and press :kbd:`Enter` or **click** to open it.

.. figure:: ../../images/vhdl_quick_compile_order_view.png
	:align: center



.. _Console View:

Console View
------------



Any invocation (for example a **DVT Generic** run) output is dumped to the **Console View**.

The Console View is automatically raised at any invocation.You can also go to menu **Window > Show View > Other... > General > Console**. to open the Console View.

**Click on hyperlinks** in the Console View to jump directly to the to source location.

.. figure:: ../../images/vhdldt-console-hyperlinks.png
	:align: center

.. _Design Hierarchy View:

Design Hierarchy View
---------------------

.. include:: design-hierarchy-view.rst


.. _Inspect View:

Inspect View
------------

**Inspect View** shows detailed information about various elements in DVT.

Open the view from menu :menuselection:`Window --> Show View --> Other... --> DVT --> Inspect`.

To inspect an element, simply **select** it in a view or click on its name in the editor.

Information about the selected element will be presented in the view.

Each element shown in the Inspect View starts with an information line regarding the file and line number of the element.

The Inspect View highlights the relevant source code lines of the selected element. These lines may be surrounded with additional source code to provide a context, if necessary.

You can customize the number of lines shown by going to :menuselection:`Window --> Preferences --> DVT --> Maximum Inspect View context lines`, or by using the key mappings detailed in the :ref:`Hotkeys` chapter below.

.. figure:: ../../images/common/vhdl_inspect_view_standalone.png
	:align: center


.. |inspect_btn| image:: ../../images/icons/act16/inspect_layout.png
	 :class: inline

For convenience, you can see the Inspect View embedded in diagrams by clicking the  :guilabel:`Inspect Panel...` button |inspect_btn| in the toolbar.

.. figure:: ../../images/common/vhdl_inspect_view_diagram.png
	:align: center



.. _Hotkeys:

Hotkeys
~~~~~~~

The following key mappings are available while interacting with the Inspect View.

.. list-table::
	 :header-rows: 1
	 :widths: auto

	 * -  :kbd:`CTRL+ALT+[`
	   - Decrease the number of context lines shown
	 * - :kbd:`CTRL+ALT+]`
	   - Increase the number of context lines shown
	 * - :kbd:`CTRL+K`
	   - Cycle through highlighted inputs shown inside the view

WaveDrom Timing Diagrams
~~~~~~~~~~~~~~~~~~~~~~~~

.. include:: wavedrom-timing-diagrams.rst


.. _Layers View:

Layers View
-----------



You can quickly see all the architectures of an entity or where a function is overloaded  using the **Layers View**.

Position the cursor on an entity, architecture or function and press **Shift+F3** or **right click** and choose **Show Layers** from the menu.

The Layers View is automatically raised at any invocation. You can also open it from **Window > Show View > Other... > DVT > Layers**.

**Double click** on a layer and jump to the corresponding source location.

**Right click** on a layer to see its **Usages**.

You can use :ref:`CamelCase` or :ref:`Simple Regex` to locate a specific element.

.. figure:: ../../images/vhdl_layers_view_notes.png
	:align: center




#.  **Show History List** Click to see the previously inspected layers (see the image below):

.. figure:: ../../images/vhdl_layers_view_history.png
	:align: center

.. _Power Domain View:

Power Domain View
-----------------

.. include:: power-domain-view.rst


.. _Quick Layers View:

Quick Layers View
-----------------



Position the cursor on the element's name and press :kbd:`Ctrl+Shift+O`.

The **Quick Layers View** will pop-up and present a filterable list with all of the selected element's layers. 

You can use :ref:`CamelCase` or :ref:`Simple Regex` to locate a specific element.

Select a layer and press **Enter** or **click** to jump to the corresponding source location. 

.. figure:: ../../images/vhdl_quick_layers_view.png
	:align: center



.. _Outline View:

Outline View
~~~~~~~~~~~~



The **Outline View** presents an overview of the editor contents.

Open the view from menu **Window > Show View > Other... > General > Outline**.

You can **click** on an entity to jump to its location inside the current file.

You can use :ref:`CamelCase` or :ref:`Simple Regex` to locate a specific element.


.. figure:: ../../images/vhdldt-outline-view-presentation.png
	:align: center




.. list-table::
	 :header-rows: 1
	 :widths: auto

	 * - .. figure:: ../../images/icons/act16/filter.png
	   - Filters...
	   - Select what elements to show
	 * - .. figure:: ../../images/icons/act16/alphab_sort.png
	   - Alphabetical Sort
	   - If alphabetical sort is on, all the entities are sorted by name. By default the entities are presented in the definition order.
	 * - .. figure:: ../../images/icons/act16/category_sort.png
	   - Category Sort
	   - If category sort is on, entities are arranged by categories (fields, methods etc.), instead of being mixed as they appear in the file.
	 * - .. figure:: ../../images/icons/act16/expand_tree.png
	   - Expand All
	   -  
	 * - .. figure:: ../../images/icons/act16/collapse_tree.png
	   - Collapse All
	   -  


.. _Quick Outline View:

Quick Outline View
~~~~~~~~~~~~~~~~~~



Press :kbd:`Ctrl+O` to open the **Quick Outline** dialog. It presents an overview of your file.

You can use :ref:`CamelCase` or :ref:`Simple Regex` to locate a specific element.

.. figure:: ../../images/vhdldt-quick-outline-view.png
	:align: center




Outline View Preferences
~~~~~~~~~~~~~~~~~~~~~~~~



You can configure the **Outline View** contents from menu **Window > Preferences > DVT > VHDL > Outline View**.

.. figure:: ../../images/vhdldt-outline-view-preferences.png
	:align: center


.. _Problems View:

Problems View
-------------


If a project contains errors, for example syntax errors, it will be indicated using **decorators**:

.. figure:: ../../images/vhdldt-errors-decorator.png
	:align: center




You can use the **Problems View** to inspect the errors.  Open the view from menu  **Window > Show View > Other... > General > Problems**. **Double clicking** on some error will jump to the source location.

.. figure:: ../../images/vhdldt-errors-view.png
	:align: center


.. _Quick Query View:

Quick Query View
----------------

Press :kbd:`Ctrl+Alt+Q` to quickly open the **Quick Query View**, which provides a filterable list of all the types and compiled files in the project.

This view supports semantic search, allowing to look for a specific element. In order to do this, structure your query in the following manner: *query_key:search_pattern*.

You can use :ref:`CamelCase` or :ref:`Simple Regex` for the *search_pattern*.

.. tip::

  Use Content Assist to see all the available query keys (:kbd:`CTRL+Space`).

DVT supports the following query keys:

- architecture
- configuration
- entity
- file
- library
- package
- package_body
- type
- type_body
- vhdl_type

.. note::

	You can use the *type:search_pattern* query in order to search for all the types defined in your project.

Select an element and press :kbd:`Enter` or **click** to navigate to it.

.. note::
	
	By default, the Quick Query View will display 100 items from each category (types, files). You can customize this value by going to :menuselection:`Window --> Preferences --> DVT --> Maximum number of elements per category in Quick Query View`.


.. _Tasks View:

Tasks View
----------



.. figure:: ../../images/vhdldt-reminders-CodeTasksView.png
	:align: center





You can embed reminders in your source files by adding comments prefixed by certain "keywords" called *task tags*. 

There are three predefined tags:

-  **FIXME** - high priority
-  **TODO** - normal priority
-  **XXX** - low priority

All reminders are listed in the **Tasks View**. If it is not visible, open the view from menu **Window > Show View > Other > General > Tasks**.

**Double click** on a task to jump to the marker definition.

You can define custom reminder tags and assign them priorities:

- Navigate to **Window > Preferences > DVT >  Task Tags**

.. figure:: ../../images/common/tasktag-preferences.png
	:align: center




You can specify if the tags should be considered case-sensitive and if the tag name should be displayed in Tasks View.

- Click the **Add...** button on the right, enter the name of your tag and select its priority 

.. figure:: ../../images/common/reminders-new_tag.png
	:align: center



- Click **OK** in the New Task Tag and Preferences dialogs

DVT will recognize the new tag and highlight it in code comments.  

.. note::

	it is recommended to rebuild the project so that DVT rescans all files for reminders.

Trace Connections View
----------------------

.. include:: trace-connections.rst

.. _Types View:

Types View
----------

The **Types View** presents all the types (classes, structs, units, entities etc.) defined in your project.

Open the view from menu :menuselection:`Window --> Show View --> Other... --> DVT --> Types`.

Click on the **Show Members** button to show the **Members pane**.

**Double click** on a type or type member to jump to its definition.

**Right click** on a type or type member to search for :ref:`Show Usages, Readers or Writers` or further inspect the Type Hierarchy View or the Verification Hierarchy View, where applicable.

You can perform :ref:`Search For Members`.

.. list-table::
	:header-rows: 1
	:widths: auto

	* - Toolbar
	  -  
	  -  
	* - .. figure:: ../../images/icons/act16/show_hide_ports.png
	  - Show/Hide Members
	  - Toggles the visibility of the members pane. Use the drop-down to chose placement (to the right side or below the types tree).
	* - .. figure:: ../../images/icons/act16/category_sort.png
	  - Sort by Category
	  - Click to sort by category. Default sort order is alphabetical.
	* - .. figure:: ../../images/icons/act16/expand_tree.png
	  - Expand All
	  - Expand all nodes in types tree.
	* - .. figure:: ../../images/icons/act16/collapse_tree.png
	  - Collapse All
	  - Collapse all nodes in types tree.


.. note::

	Type containers are also shown in the view, for example libraries, generate statements, etc. See `this <https://www.consulting.amiq.com/2014/10/01/what-goes-where-in-systemverilog/>`_ for more information on Types, Type Containers and Type Members.


.. figure:: ../../images/vhdl_types_view.png
	:align: center


.. _Quick Types View:

Quick Types View
~~~~~~~~~~~~~~~~



Press :kbd:`Ctrl+Shift+T` to quickly open a specific type definition for the project associated with the active editor or the current selected project from the Navigator (if no editor is open).

The **Quick Types View** will pop-up and and present a filterable list of all the types in the project associated with the active editor or the current selected project from the Navigator (if no editor is open).

You can use :ref:`CamelCase` or :ref:`Simple Regex` to locate a specific element.

Select and press :kbd:`Enter` or **click** to jump to its definition.

.. figure:: ../../images/vhdl_quick_types_view.png
	:align: center




