Skip to content

Interactive Selective Undo

YoungSeok Yoon edited this page Jun 5, 2014 · 4 revisions

Overview

The Interactive Selective Undo dialog (shown above) is the most flexible and powerful user interface Azurite provides.

The design was inspired by the refactoring wizard of Eclipse, which shows a preview of all changes to be made before actually changing the code. Similar to Code History Diff View or a typical refactoring wizard, our interactive selective undo dialog shows a side-by-side "diff" view.

The left panel shows the current code.

The right panel shows the preview of the selective undo with the currently selected rectangles in the Timeline View.

On the top panel is the list of all the affected files and code chunks within each file in a tree form.

You can apply all the previewed changes resulting from the selective undo by clicking "OK".

Launching Interactive Selective Undo Dialog

The Interactive Selective Undo dialog can be launched at any time. The command is located in several places.

Main Menu:

Timeline Toolbar:

Context Menu in Timeline View:

Modeless Dialog

The Interactive Selective Undo dialog is modeless, meaning that you can do other things while this dialog is open. For example, rectangles can be added to and/or removed from the selection while the dialog is open, which immediately updates the preview result shown in the dialog.

You need not worry about selecting the exact set of rectangles on their first attempt. You can manipulate the selection until the preview shows the desired result.

"Keep This Code Unchanged"

The Interactive Selective Undo dialog offers a convenient way for you to "keep some code unchanged" when performing selective undo. You can select an arbitrary region of the code in the left panel, right-click to bring up the context menu, and select "Keep this code unchanged".

Behind the scenes, it searches for all edits affecting the selected region of code and excludes those operations from what will be undone. The corresponding rectangles are removed from the selection, and the preview result updates immediately.

This feature provides a significant usability improvement, because you can easily get the desired results by roughly over-specifying the selected rectangles, and then marking all the code fragments desired to be in the resulting code.


Back to Home

Clone this wiki locally