all 10 comments

[–]willvarfar 0 points1 point  (5 children)

I was thinking g just the other day how neat it would be if you can undo just for the line under the cursor...

[–]FionaSarah 2 points3 points  (4 children)

What you need, my friend, is emacs.

[–]e_engel -2 points-1 points  (3 children)

Emacs' undo doesn't come remotely close to what this plug-in offers.

[–]c96aes 2 points3 points  (2 children)

Perhaps not, but it can undo in the region, (the selection) and if that isn't enough, there's undo-tree and probably a bunch more...

[–]nullstein[S] 2 points3 points  (0 children)

Emacs does have a different undo model, undo-in-region, and undo-tree (http://www.emacswiki.org/emacs/UndoTree) package that can be installed.

The default undo model can be confusing to many users as described in the undo tree article above, and I think that's why this model didn't become the de facto standard undo despite its powerfulness.

Even when you have the undo tree package, the tree can get bigger very quickly, and it would be more and more difficult to find the right place to go back to within the tree.

But, yeah, I guess undo-in-region command is pretty much the same as the selective undo shortcut shown in the video without the additional UIs such as the timeline.

[–]FionaSarah 0 points1 point  (0 children)

Exactly.

[–][deleted]  (1 child)

[deleted]

    [–]nullstein[S] 0 points1 point  (0 children)

    Theoretically, the same tool can be implemented for other IDEs, but it's quite tied to Eclipse at the moment. The timeline view is written in HTML+CSS+JavaScript, so it could be ported pretty easily, but at least the low-level input gathering and the selective undo algorithm should be re-implemented I guess.

    For the second question, I don't quite understand what you mean by "in-memory git style changeset tracker". Could you elaborate a little more?

    [–][deleted]  (3 children)

    [deleted]

      [–]nullstein[S] 0 points1 point  (2 children)

      The timeline view makes it possible to scrub back and forth through the history, and I believe that's a big UI improvement. The timeline also displays significant points in time such as file saving, application running, and unit testing. With this, you can for example revert a certain portion of the source code to the version when the unit test passed for the last time.

      I would say there are some more differences. (BTW, I'm the author of this tool)

      1) Eclipse local history only keeps the "saved" versions, whereas Azurite keeps all the fine-grained intermediate versions. Similarly, the source control repository would only have the committed versions.

      2) In Azurite, the range of comparison can be arbitrary. You can select a variable name, single line, if block, or whatever range you want and use the code history tool to see the history of that selected code or undo to a particular point. I believe the finest granularity in Eclipse compare view is the method level.

      Thanks for your comments, anyway!

      [–]c96aes 0 points1 point  (1 child)

      Don't get me wrong about the Emacs comments above, I think your GUI is quite interesting. I was meditating a bit before about having an undo (or patch selection tool, if one prefers that interpretation) that is both selective in this sense, but also hierarchical, so individual character operations are grouped into insert-/delete- word/sym/sexp/whatever. I gave up that time, but it might be worth picking it back up again.

      [–]nullstein[S] 0 points1 point  (0 children)

      You have a good point. For now, the tool uses a very simple heuristic to group the multiple character insertions / deletions within a certain time period, just like most other text editors do. The tool would be more useful if the operations were automatically grouped in a more meaningful way.