Grouping UndoableInserts as one Undoable Action

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
I recently starting exploring the concept of automatically formatting code. SyntaxEditor can certainly support this through the UndoableInsert and UndoableDelete methods. My only concern is that I'll have one auto-format action that could potentially involve numerous UndoableInsert/Delete method calls.

Would it be possible to implement a feature that would allow you to group a series of undoable method calls as a single Undo action? You could, for instance, have a 'BeginUndoableGroup' method that could be called first. Then a series of 'UndoableInsert' and 'UndoableDelete' methods followed by a 'EndUndoableGroup' method call. The desired result would be that all the undoable methods called between the Begin/End group method calls would all be undone together (in the reverse order they were implemented) just as if they were a single undoable action.

What are your thoughts?

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Boyd,

We have an item on the TODO list to implement undo grouping very similar to how you're describing.

Actipro Software Support

The latest build of this product (v24.1.0) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.