Suggestion
When I view a diff using the new unified diff option, don't close the file and then open the file in some way, the unfied diff is still shown.
From a fresh installation and clean workspace:
- Enable Window > Preferences > Compare/Patch > Use Unified diff ...
- Create a project with two files, e.g. Test.txt and Test2.txt with some difference
- Select both and right click > Compare With > Each other
It then shows the diff between the files as intended:
If I then double-click the file in the project/package explorer, I still see the editor with the diff.
When trying to open the file again, Eclipse shouldn't show me the diff any more but only the file.
Considered approaches
I could see the following possibilities of implementing this
- When a file is opened and reused, the unified diff is cleared if possible
- When an editor is opened using the unified diff, it is not reusing an existing editor but opening a new one and making sure that one isn't reused. When opening another editor in the unified diff, it may be a good idea to close/replace the old unified diff editor (I think there's also a preference for reusing the 2-way compare editor?)
This should be ensured when opening the file via the project/package explorer or via other ways (e.g. Ctrl+Shift+T for Java types).
Community
Suggestion
When I view a diff using the new unified diff option, don't close the file and then open the file in some way, the unfied diff is still shown.
From a fresh installation and clean workspace:
It then shows the diff between the files as intended:
If I then double-click the file in the project/package explorer, I still see the editor with the diff.
When trying to open the file again, Eclipse shouldn't show me the diff any more but only the file.
Considered approaches
I could see the following possibilities of implementing this
This should be ensured when opening the file via the project/package explorer or via other ways (e.g. Ctrl+Shift+T for Java types).
Community