public interface CallHierarchyProvider
First CallHierarchyProvider.findCallOrigin(javax.swing.text.Document, int)
should be called, producing a CallHierarchyEntry
that describes the element at the given position. In subsequent calls, inbound or
outbound calls may be inspected for the passed Entry using CallHierarchyProvider.findIncomingCalls(CallHierarchyEntry)
or CallHierarchyProvider.findOutgoingCalls(CallHierarchyEntry)
.
Note that the returned CompletableFutures may become completed cancelled if the implementation (for example)
displays user-facing UI like progress, which allows the user to interrupt the operation. If the reported
exception is a CompletionException
, its cause should be also checked.
Modifier and Type | Method and Description |
---|---|
CompletableFuture<List<CallHierarchyEntry>> |
findCallOrigin(Document doc,
int offset)
Returns a
CallHierarchyEntry that corresponds to the given document's location. |
CompletableFuture<List<CallHierarchyEntry.Call>> |
findIncomingCalls(CallHierarchyEntry callTarget)
Returns a list of locations that call into the passed call target.
|
CompletableFuture<List<CallHierarchyEntry.Call>> |
findOutgoingCalls(CallHierarchyEntry callSource)
Returns a list of locations that are called from the passed source.
|
@CheckForNull CompletableFuture<List<CallHierarchyEntry>> findCallOrigin(@NonNull Document doc, int offset)
CallHierarchyEntry
that corresponds to the given document's location.
If the location does not represent a valid starting point, the returned Future will complete
with null
result. Any errors, i.e. parsing or I/O will be reported through the
returned Future.
doc
- the documentoffset
- location in the documentnull
@CheckForNull CompletableFuture<List<CallHierarchyEntry.Call>> findIncomingCalls(@NonNull CallHierarchyEntry callTarget)
null
, if the
call target location is not supported or is invalid. The Call.getRanges()
describes ranges int he caller StructureElement
where the target is invoked.callTarget
- the call target locationnull
@CheckForNull CompletableFuture<List<CallHierarchyEntry.Call>> findOutgoingCalls(@NonNull CallHierarchyEntry callSource)
null
, if the
call target location is not supported or is invalid. The Call.getRanges()
describe ranges in the call source, where the specific StructureElement
target is called from.callSource
- the location to inspectnull