Search in sources :

Example 1 with CallHierarchyOutgoingCallsRequest

use of org.lxtk.lx4e.requests.CallHierarchyOutgoingCallsRequest in project lxtk by lxtk-org.

the class CallHierarchyUtility method getOutgoingCalls.

/**
 * Returns the outgoing calls for the given call hierarchy item.
 *
 * @param item not <code>null</code>
 * @param monitor a progress monitor, or <code>null</code>
 *  if progress reporting is not desired. The caller must not rely on
 *  {@link IProgressMonitor#done()} having been called by the receiver
 * @return a list of outgoing calls (may be <code>null</code> or empty)
 */
public List<CallHierarchyOutgoingCall> getOutgoingCalls(CallHierarchyItem item, IProgressMonitor monitor) {
    CallHierarchyOutgoingCallsRequest request = newOutgoingCallsRequest();
    request.setProvider(provider);
    request.setParams(new CallHierarchyOutgoingCallsParams(item));
    request.setProgressMonitor(monitor);
    request.setUpWorkDoneProgress(() -> new DefaultWorkDoneProgress(Either.forLeft(UUID.randomUUID().toString())));
    request.setMayThrow(false);
    return request.sendAndReceive();
}
Also used : DefaultWorkDoneProgress(org.lxtk.DefaultWorkDoneProgress) CallHierarchyOutgoingCallsParams(org.eclipse.lsp4j.CallHierarchyOutgoingCallsParams) CallHierarchyOutgoingCallsRequest(org.lxtk.lx4e.requests.CallHierarchyOutgoingCallsRequest)

Aggregations

CallHierarchyOutgoingCallsParams (org.eclipse.lsp4j.CallHierarchyOutgoingCallsParams)1 DefaultWorkDoneProgress (org.lxtk.DefaultWorkDoneProgress)1 CallHierarchyOutgoingCallsRequest (org.lxtk.lx4e.requests.CallHierarchyOutgoingCallsRequest)1