public static @NotNull CancellablePromise<?> asyncUpdate(@NotNull PsiElement element, @NotNull Editor editor) {
    MethodInfoExcludeListFilter filter = MethodInfoExcludeListFilter.forLanguage(element.getLanguage());
    AsyncPromise<Object> promise = new AsyncPromise<>();
    SmartPsiElementPointer<PsiElement> elementPtr = SmartPointerManager.getInstance(element.getProject())
      .createSmartPsiElementPointer(element);
    ReadAction.nonBlocking(() -> collectInlaysInPass(editor, filter, elementPtr))
      .finishOnUiThread(ModalityState.any(), pass -> {
        if (pass != null) {
          try (AccessToken ignored = ClientId.withClientId(ClientEditorManager.getClientId(editor))) {
            pass.applyInformationToEditor();
          }
        }
        promise.setResult(null);
      })
      .submit(AppExecutorUtil.getAppExecutorService());
    return promise;
  }
public static @NotNull CancellablePromise<?> asyncUpdate(@NotNull PsiElement element, @NotNull Editor editor)