mrQWERTY
mrQWERTY

Reputation: 4149

Eclipse - Showing changes before saving

I run into this problem a lot. Sometimes I would edit and forget about it in Eclipse or maybe keyboard moved randomly and input random characters. How do I view current changes compared to the last save easily in Eclipse? That way, I would know what changes took effect before I save.

Upvotes: 0

Views: 946

Answers (2)

simpleigh
simpleigh

Reputation: 2894

If you just want to see what lines have changed, then you can follow the instructions in this answer in order to show a highlight of the changed lines on the left-hand side of your editor.

Aside from that I don't think it's easy to tell what's recently been changed without saving. If you do save then you have the option of comparing with the previous version: right-click on the file in the tree and choose "Compare With -> Local History" and then choose a version you saved earlier.

If you save it you can also compare against what's in source control, of course. You are using some sort of source control?

Upvotes: 1

SparkOn
SparkOn

Reputation: 8946

You can use either
compare editor-show changes between 2 or 3 files by showing each file side-by-side

First select the files on the Project Explorer with control-click. Now right-click -> Select Compare With / Each Other.

or

Quick Diff - General > Editors > Text Editors > Quick Diff

Upvotes: 0

Related Questions