private static CompletableFuture<SourcePosition> getSourcePositionAsync(PositionManager positionManager, Location location) {
    if (positionManager instanceof PositionManagerAsync positionManagerAsync) {
      return positionManagerAsync.getSourcePositionAsync(location);
    }
    else {
      try {
        return completedFuture(ReadAction.nonBlocking(() -> positionManager.getSourcePosition(location)).executeSynchronously());
      }
      catch (Exception e) {
        return failedFuture(DebuggerUtilsAsync.unwrap(e));
      }
    }
  }
private static CompletableFuture<SourcePosition> getSourcePositionAsync(PositionManager positionManager, Location location)