Skip to content

Commit cec9230

Browse files
committed
Document call hierarchy service.
1 parent 6543ad3 commit cec9230

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rascal-lsp/src/main/rascal/library/util/LanguageServer.rsc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ alias Implementer = set[loc] (loc _origin, Tree _fullTree, Tree _lexicalAtCursor
158158
@synopsis{Each kind of service contibutes the implementation of one (or several) IDE features.}
159159
@description{
160160
Each LanguageService constructor provides one aspect of definining the language server protocol (LSP).
161-
Their names coincide exactly with the services which are documented [here](https://microsoft.github.io/language-server-protocol/).
161+
Their names coincide with the services which are documented [here](https://microsoft.github.io/language-server-protocol/).
162162

163163
* The ((parsing)) service that maps source code strings to a ((ParseTree::Tree)) is essential and non-optional.
164164
All other other services are optional.
@@ -208,6 +208,9 @@ hover documentation, definition with uses, references to declarations, implement
208208
* The ((execution)) service executes the commands registered by ((lenses)) and ((inlayHinter))s.
209209
* The ((actions)) service discovers places in the editor to add "code actions" (little hints in the margin next to where the action is relevant) and connects ((CodeAction))s to execute when the users selects the action from a menu.
210210
* The ((selectionRange)) service discovers selections around a cursor, that a user might want to select. It expects the list of source locations to be in ascending order of size (each location should be contained by the next) - similar to ((Focus)) trees.
211+
* The ((callHierarchy)) service discovers callable definitions and call sites. It consists of two subservices.
212+
1. The first argument, `callableItem`, computes ((CallHierarchyItem))s (definitions) for a given cursor.
213+
2. The second argument, `calculateCalls`, computes ((incoming)) or ((outgoing)) calls (uses) of a given ((CallHierarchyItem)) `ci`. It returns a list relation of ((CallHierarchyItem))s and the location(s) of the call(s) to `ci` these definitions have.
211214

212215
Many services receive a ((Focus)) parameter. The focus lists the syntactical constructs under the current cursor, from the current
213216
leaf all the way up to the root of the tree. This list helps to create functionality that is syntax-directed, and always relevant to the

0 commit comments

Comments
 (0)