void () { String documentText = formattingRequest.getDocumentText(); new Thread(() -> { String formatted = getFormatted(documentText); formattingRequest.onTextReady(formatted); }, "AsyncFormat").start(); }