Skip to main content
Known Participant
March 15, 2010
Question

How to calculate the number of operations in Undo/Redo stack?

  • March 15, 2010
  • 1 reply
  • 521 views

How to calculate the number of operations in Undo/Redo stack?

I tried to override UndoManager.pushUndo method and increment "operationsCounter" there, but pushUndo is called each time I make a change in text.

Another idea was to override EditManager.finalizeDo and use "operationsCounter" there, but finalizeDo is private...

Do you have any idea?

This topic has been closed for replies.

1 reply

Adobe Employee
March 15, 2010

Write your own implementation of IUndoManager and pass it into the EditManager constructor.  The code is public and its very simple.  Then you can add whatever APIs you want for getting numbers of operations.

Hope that helps,

Richard

Known Participant
March 16, 2010

Hi Richard,

Thanks for the reply. I suggested that existed the more simple way to implement this