@Override
  public void update(final @NotNull PomModelEvent event) {
    if (isDisabled() || getContext().myPostponedCounter == 0) return;
    final TreeChangeEvent changeSet = (TreeChangeEvent)event.getChangeSet(myTreeAspect.getValue());
    if (changeSet == null) return;
    final PsiElement psiElement = changeSet.getRootElement().getPsi();
    if (psiElement == null) return;
    final PsiFile containingFile = getContainingFile(psiElement);
    final FileViewProvider viewProvider = containingFile.getViewProvider();

    if (!viewProvider.isEventSystemEnabled() &&
        !IntentionPreviewUtils.isPreviewElement(containingFile) &&
        !FORCE_POSTPROCESS_FORMAT.isIn(viewProvider)) return;
    getContext().myUpdatedProviders.putValue(viewProvider, (FileElement)containingFile.getNode());
    for (final ASTNode node : changeSet.getChangedElements()) {
      final TreeChange treeChange = changeSet.getChangesByElement(node);
      for (final ASTNode affectedChild : treeChange.getAffectedChildren()) {
        if (changeMightBreakPsiTextConsistency(affectedChild)) {
          containingFile.putUserData(REPARSE_PENDING, true);
        }
        else if (leavesEmptyRangeAtEdge((TreeChangeImpl)treeChange, affectedChild) && hasRaiseableEdgeChild(node)) {
          getContext().myRaisingCandidates.putValue(viewProvider, node);
        }

        final ChangeInfo childChange = treeChange.getChangeByChild(affectedChild);
        switch (childChange.getChangeType()) {
          case ChangeInfo.ADD, ChangeInfo.REPLACE -> postponeFormatting(viewProvider, affectedChild);
          case ChangeInfo.CONTENTS_CHANGED -> {
            if (!CodeEditUtil.isNodeGenerated(affectedChild)) {
              ((TreeElement)affectedChild).acceptTree(new RecursiveTreeElementWalkingVisitor() {
                @Override
                protected void visitNode(TreeElement element) {
                  if (CodeEditUtil.isNodeGenerated(element) && CodeEditUtil.isSuspendedNodesReformattingAllowed()) {
                    postponeFormatting(viewProvider, element);
                    return;
                  }
                  super.visitNode(element);
                }
              });
            }
          }
        }
      }
    }
  }
@Override
  public void update(final @NotNull PomModelEvent event)