modify implementation to support undo/redo in IDE editor
modify implementation to support undo/redo in IDE editor