CompletableFuture<NodeRenderer> (Type type, DebugProcessImpl debugProcess) { DebuggerManagerThreadImpl.assertIsManagerThread(); CompletableFuture<Boolean> customCheck = CompletableFuture.completedFuture(false); if (type != null && myRenderer != null) { customCheck = myRenderer.isApplicableAsync(type); } return customCheck.thenCompose(custom -> { if (custom) { return CompletableFuture.completedFuture(myRenderer); } else { return debugProcess.getAutoRendererAsync(type).thenApply(r -> myAutoRenderer = r); } }); }