.. _Hyperlinks:

Hyperlinks
==========


Place the mouse cursor over an identifier in the editor while holding down the :kbd:`Ctrl` key. The identifier becomes a **hyperlink**, and a list of navigation options is displayed.

The first option is **Open Declaration**. This is the default action when you click directly on the identifier.

**Hyperlinks** are available for all the entities, components, subprograms, signals etc. from the source code files that DVT analyzes in your project.

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

   * - Open Declaration
     - .. tip::
          Keyboard alternative: place editor cursor on an identifier and press F3.

       .. figure:: ../../images/common/vhdldt-open-declaration.png
       
       .. figure:: ../../images/common/vhdldt-open-declaration-target.png
   * - Open Entity Declaration
     - .. figure:: ../../images/common/vhdldt-open-entity-declaration.png   
       
       .. figure:: ../../images/common/vhdldt-open-entity-declaration-target.png
   * - Open Component Declaration
     - .. figure:: ../../images/common/vhdldt-open-component-declaration.png  
       
       .. figure:: ../../images/common/vhdldt-open-component-declaration-target.png
   * - Open Architecture Declaration
     - .. figure:: ../../images/common/vhdldt-open-architecture-declaration.png  
       
       .. figure:: ../../images/common/vhdldt-open-architecture-declaration-target.png
   * - Open Instance
     - Available only for a design element under cursor which is instantiable. It jumps to the corresponding instance from design (which is also available in the Design Breadcrumb Navigation Bar).\
       
       .. figure:: ../../images/common/vhdldt-open-instance.png

       .. figure:: ../../images/common/vhdldt-open-instance-target.png
   * - Open ... Type
     - .. figure:: ../../images/common/vhdldt-open-signal-type.png  
       
       .. figure:: ../../images/common/vhdldt-open-signal-type-target.png
   * - Jump to Assignment
     - Jumps to the next assignment of the signal under cursor in the current editor.
     
       .. figure:: ../../images/common/vhdldt-jump-to-assignment.png
        
       .. figure:: ../../images/common/vhdldt-jump-to-assignment-target.png
   * - Jump To State Machine
     - Available only on enum constants and generics. Jumps directly to the case branch where element under cursor is used.
       
       .. figure:: ../../images/common/vhdldt-jump-to-state-machine.png
        
       .. figure:: ../../images/common/vhdldt-jump-to-state-machine-target.png


Hyperlinks in Comments
~~~~~~~~~~~~~~~~~~~~~~



You can define hyperlinks in comments using the **@link** or **@see** pragmas, for example:

.. code-block::

 -- @link usb_init.usb_init_arch.TIME_SUSPEND
 -- For more details @see @see usb_commands::sv_usb_byte and @see usb_fs_monitor.usb_Dn

Hover the hierarchical id specified after the pragma with the mouse cursor while holding down the **Ctrl** key, and click to go to the element's declaration.
Alternatively, place the editor cursor on the hierarchical id and press **F3**

.. figure:: ../../images/common/vhdldt-hyperlink-in-comment.png
	:align: center




The hierarchical identifier following **@link** or **@see** is of the form:

.. code-block::
  
  [<package_name>::<type_name>.<inner_type_name>.]<element_name>

where **<element_name>** must be a type (entity, architecture, etc.) or a type member (method, signal, port etc.).

.. rubric:: Examples

- @link <element_name>  

.. figure:: ../../images/common/vhdldt-hyperlink-in-comment-identifier.png
	:align: center




- @link <type_name>.<element_name> 

.. figure:: ../../images/common/vhdldt-hyperlink-in-comment-type-identifier.png
	:align: center




- @link <type_name>.<inner_type_name>.<element_name>  

.. figure:: ../../images/common/vhdldt-hyperlink-in-comment-type-innertype-identifier.png
	:align: center




- @link <package_name>::<element_name> : 

.. figure:: ../../images/common/vhdldt-hyperlink-in-comment-absolute-path.png
	:align: center




.. note::

	If **<path.to.element>** does not solve to a unique element in code, a list of navigation options is displayed. 

.. figure:: ../../images/common/vhdldt-hyperlink-in-comment-ambiguity.png
	:align: center




