ValueLabelRenderer () { return new LabelRenderer() { @Override public String calcLabel(ValueDescriptor descriptor, EvaluationContext evaluationContext, DescriptorLabelListener labelListener) throws EvaluateException { CompletableFuture<PrimitiveValue> future = UnBoxingEvaluator.getInnerPrimitiveValue((ObjectReference)descriptor.getValue(), false); if (future.isDone()) { return DebuggerUtils.getValueAsString(evaluationContext, future.join()); } return future.handle((r, ex) -> { String res = ""; if (ex == null) { try { res = DebuggerUtils.getValueAsString(evaluationContext, r); descriptor.setValueLabel(res); } catch (EvaluateException e) { descriptor.setValueLabelFailed(e); } } else { descriptor.setValueLabelFailed(new EvaluateException(null, ex)); } labelListener.labelChanged(); return res; }).getNow(XDebuggerUIConstants.getCollectingDataMessage()); } @Override public boolean isOnDemand(EvaluationContext evaluationContext, ValueDescriptor valueDescriptor) { return false; } }; }