void (@NotNull final XCompositeNode node) { JavaValue.scheduleCommand(myEvaluationContext, node, new SuspendContextCommandImpl(myEvaluationContext.getSuspendContext()) { @Override public void contextAction(@NotNull SuspendContextImpl suspendContext) { ReferenceType refType = myStaticDescriptor.getType(); DebuggerUtilsAsync.allFields(refType) .thenAccept( fields -> { boolean showSynthetics = NodeRendererSettings.getInstance().getClassRenderer().SHOW_SYNTHETICS; List<Field> fieldsToShow = ContainerUtil.filter(fields, f -> f.isStatic() && (showSynthetics || !DebuggerUtils.isSynthetic(f))); List<List<Field>> chunks = DebuggerUtilsImpl.partition(fieldsToShow, XCompositeNode.MAX_CHILDREN_TO_SHOW); //noinspection unchecked CompletableFuture<XValueChildrenList>[] futures = chunks.stream() .map(l -> createNodes(l, refType)) .toArray(CompletableFuture[]::new); CompletableFuture.allOf(futures) .thenAccept(__ -> { StreamEx.of(futures).map(CompletableFuture::join).forEach(c -> node.addChildren(c, false)); node.addChildren(XValueChildrenList.EMPTY, true); }); } ); } private CompletableFuture<XValueChildrenList> createNodes(List<Field> fields, ReferenceType refType) { return DebuggerUtilsAsync.getValues(refType, fields) .thenApply(cachedValues -> { XValueChildrenList children = new XValueChildrenList(); for (Field field : fields) { FieldDescriptorImpl fieldDescriptor = myNodeManager.getFieldDescriptor(myStaticDescriptor, null, field); if (cachedValues != null) { fieldDescriptor.setValue(cachedValues.get(field)); } children.add(JavaValue.create(fieldDescriptor, myEvaluationContext, myNodeManager)); } return children; } ); } }); }