void () { LOG.assertTrue(!PsiDocumentManager.getInstance(myProject).hasUncommitedDocuments()); ReadAction.nonBlocking(() -> calculateSignature()) .finishOnUiThread(ModalityState.current(), signature -> mySignatureArea.setSignature(signature)) .submit(AppExecutorUtil.getAppExecutorService()); }