private static String calcLabelFromFuture(CompletableFuture<String> future,
                                            ValueDescriptor descriptor,
                                            DescriptorLabelListener labelListener) {
    if (!future.isDone()) {
      future.whenComplete((s, throwable) -> {
        if (throwable != null) {
          descriptor.setValueLabelFailed((EvaluateException)throwable);
        }
        else {
          descriptor.setValueLabel(s);
        }
        labelListener.labelChanged();
      });
    }
    return future.getNow(XDebuggerUIConstants.getCollectingDataMessage());
  }
private static String calcLabelFromFuture(CompletableFuture<String> future,
                                            ValueDescriptor descriptor,
                                            DescriptorLabelListener labelListener)