.. _Show Usages, Readers or Writers:

Show Usages, Readers or Writers
===============================

.. rst-class:: lead
    
    To search where a function, variable, class, module or any other entity is used, **hover** over it's name while holding down the :kbd:`Ctrl` key and select :guilabel:`Show Usages`.

For variables, ports or parameters, you also have the option to :guilabel:`Show Readers` or :guilabel:`Show Writers`.

.. figure:: ../../images/vlogdt-hyperlink-usages.png

The results are presented in the  :guilabel:`Search View`.

For variables, ports or parameters, matches are decorated to indicate the access type: **read**, **write** or **read/write** (for example **i++**).

.. figure:: ../../images/vlogdt-usages-search-view.png

.. tip:: 

 You can also place the editor cursor on the identifier, right click and choose :menuselection:`Show --> Usages`.

.. figure:: ../../images/vlogdt-right-click-references.png

.. tip:: 

 When searching for usages of a virtual function, by default you also see the usages of functions overriden by it.

 You may choose to hide such matches using the **Hide References to Overridden** filter.

.. figure:: ../../images/function-overriden-filter.png

.. tip:: 

 When searching for usages of a class field whose enclosing scope is a specialized class, the usages of different specialization are not shown.

.. figure:: ../../images/class-field-function-argument-non-type-matching-filter.png

Check **All specializations** filter to see all usages, regardless of their specialization.

The same applies for functions or tasks and its arguments.

.. tip:: 

 When searching for usages of a class field, calls to the field's getter and setter functions are also shown.
 Getter and setter functions are within the class or any of its children and have a single statement inside their body:

 -  for setters - an assignment of the searched field
 -  for getters - a return of the searched field

 You may choose to hide such matches using the **Hide References to Getter/Setter** filter.

.. tip:: 

 By default, DVT also reports usages inside unelaborated code.
 
 You may choose to hide such matches using the **Hide Unelaborated Design References** filter.
 
.. tip:: 

 You can also search for references from the :ref:`Search Dialog <Semantic Search>`.

