@Override
  public void runTransaction(@NotNull PomTransaction transaction) throws IncorrectOperationException{
    if (!isAllowPsiModification()) {
      throw new IncorrectOperationException("Must not modify PSI inside save listener");
    }
    ProgressManager.getInstance().executeNonCancelableSection(() -> {
      PsiElement changeScope = transaction.getChangeScope();
      PsiFile containingFileByTree = getContainingFileByTree(changeScope);
      Document document = startTransaction(transaction, containingFileByTree);

      PomTransaction block = getBlockingTransaction(changeScope);
      if (block != null) {
        block.getAccumulatedEvent().beforeNestedTransaction();
      }

      List<Throwable> throwables = new ArrayList<>(0);
      DebugUtil.performPsiModification(null, ()->{
        try{
          Stack<PomTransaction> blockedAspects = myTransactionStack.get();
          blockedAspects.push(transaction);

          final PomModelEvent event;
          try{
            transaction.run();
            event = transaction.getAccumulatedEvent();
          }
          catch (ProcessCanceledException e) {
            throw e;
          }
          catch(Exception e){
            throwables.add(e);
            return;
          }
          finally{
            blockedAspects.pop();
          }
          if(block != null){
            block.getAccumulatedEvent().merge(event);
            return;
          }

          if (event.getChangedAspects().contains(myTreeAspect)) {
            updateDependentAspects(event);
          }

          for (final PomModelListener listener : myListeners) {
            final Set<PomModelAspect> changedAspects = event.getChangedAspects();
            for (PomModelAspect modelAspect : changedAspects) {
              if (listener.isAspectChangeInteresting(modelAspect)) {
                listener.modelChanged(event);
                break;
              }
            }
          }
        }
        catch (ProcessCanceledException e) {
          throw e;
        }
        catch (Throwable t) {
          throwables.add(t);
        }
        finally {
          try {
            if (containingFileByTree != null) {
              commitTransaction(containingFileByTree, document);
            }
          }
          catch (ProcessCanceledException e) {
            throw e;
          }
          catch (Throwable t) {
            throwables.add(t);
          }
          if (!throwables.isEmpty()) CompoundRuntimeException.throwIfNotEmpty(throwables);
        }
      });
    });
  }
@Override
  public void runTransaction(@NotNull PomTransaction transaction)