XValuePresentation (ValueDescriptorImpl descriptor) { boolean inCollection = descriptor instanceof ArrayElementDescriptor; return new JavaValuePresentation(descriptor) { @Override public void renderValue(@NotNull XValueTextRenderer renderer, @Nullable XValueNodeImpl node) { if (isMuted()) { return; } renderDescriptor(KEY_DESCRIPTOR, renderer, node); renderer.renderComment(" -> "); renderDescriptor(VALUE_DESCRIPTOR, renderer, node); } private void renderDescriptor(Key<ValueDescriptorImpl> key, @NotNull XValueTextRenderer renderer, @Nullable XValueNodeImpl node) { ValueDescriptorImpl valueDescriptor = myValueDescriptor.getUserData(key); if (valueDescriptor != null) { String type = valueDescriptor.getIdLabel(); if (inCollection && type != null) { renderer.renderComment("{" + type + "} "); } new JavaValuePresentation(valueDescriptor).renderValue(renderer, node); } else { renderer.renderValue("null"); } } @NotNull @Override public String getSeparator() { return inCollection ? "" : super.getSeparator(); } @Override public boolean isShowName() { return !inCollection; } @Nullable @Override public String getType() { return inCollection && !isMuted() ? null : super.getType(); } private boolean isMuted() { return myValueDescriptor.getUserData(RENDERER_MUTED) != null && !OnDemandRenderer.isCalculated(myValueDescriptor); } }; }