SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
research:pdt:docs:call_hierarchy [2015/01/14 23:15]
127.0.0.1 external edit
research:pdt:docs:call_hierarchy [2018/05/09 01:59] (current)
Line 1: Line 1:
 +====== Prolog Call Hierarchy ======
  
 +{{:​research:​pdt:​docs:​call_hierarchy_overview.png|}}
 +
 +The //Prolog Call Hierarchy// displays the call hierarchy of predicates. It has one **root predicate** for which the hierarchy is presented. The hierarchy supports two different modes: **caller** and **callee**. The lookup for calls is performed in the currently selected Prolog process.
 +
 +The left side of the view shows the hierarchy as a tree.\\
 +  * The children of a predicate are either its callers or its callees (depending on the selected mode).
 +  * The icon of a predicate represents its visibility:
 +    * {{:​research:​pdt:​docs:​public_co.gif|}} Exported or defined in //user//
 +    * {{:​research:​pdt:​docs:​protected_co.gif|}} Non-exported
 +    * {{:​research:​pdt:​docs:​ihigh_obj.gif|}} Undefined predicate (only possible in the callee mode)
 +  * The number of calls is shown behind the predicate name if it is larger than one.
 +  * A double-click on a predicate will select the first call in an editor.
 +
 +The right side is a table listing all calls from/to the predicate selected in the tree. Double-clicking on a call will select this call in an editor.
 +
 +===== Open the Call Hierarchy / Select a Root Predicate =====
 +
 +The Call Hierarchy can be opened in two ways. The first way is to select a predicate in the editor and to choose //"​Open Call Hierarchy"//​ from the context menu. This opens the hierarchy and sets the selected predicate as root predicate.
 +
 +{{:​research:​pdt:​docs:​call_hierarchy_open_from_editor.png|}}
 +
 +The second way is to open the view via //Window// -> //Show View// -> //Prolog Call Hierarchy// (or //Other// -> //Prolog Call Hierarchy// if the //Prolog Perspective//​ is not opened). After opening the view the root predicate needs to be set.
 +
 +The root predicate is set via the first toolbar button ({{:​research:​pdt:​docs:​class_hi.gif|}}). The opened dialog then allows typing the predicate. The following form is expected:\\
 +//Module// : //Name// / //Arity//
 +
 +
 +===== Mode =====
 +
 +The mode can be chosen in the toolbar.
 +  * {{:​research:​pdt:​docs:​ch_callers.gif|}} **Caller**: The children of a predicate shown in the tree are its callers.
 +  * {{:​research:​pdt:​docs:​ch_callees.gif|}} **Callee**: The children of a predicate shown in the tree are its callees.
 +
 +
 +===== Scope =====
 +
 +{{:​research:​pdt:​docs:​call_hierarchy_scope.png|}}
 +
 +The Call Hierarchy allows to limit the scope where to search for predicate calls. The possible scopes are:
 +  * {{:​research:​pdt:​docs:​workspace_obj.gif|}} **Workspace**:​ The entire code that is loaded in the currently selected Prolog process is searched.
 +  * {{:​research:​pdt:​docs:​prj_obj.gif|}} **Project...**:​ A dialog is opened which allows to select a single project as scope for the search. Only calls which are contained in file in this project are shown in the hierarchy.
 +
 +===== History =====
 +
 +{{:​research:​pdt:​docs:​call_hierarchy_history.png|}}
 +
 +The view remembers the last 10 root predicates. The list opened via {{:​research:​pdt:​docs:​history_list.gif|}} allows selecting these as root predicate.
research/pdt/docs/call_hierarchy.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019