eclipse-jdt / eclipse.jdt.ui

Eclipse Public License 2.0
36 stars 86 forks source link

About customizable text history created by Organize Import actions #1513

Open angelickite opened 2 months ago

angelickite commented 2 months ago

When triggering an "organize import", at minimum when using a shortcut or automatic save actions, the import edits get inserted into the text editing history. I couldn't find a way to disable the creation of this history point specifically for such automatic import edits.

Is there currently a way to achieve this? If not, is there any demand by others for the ability to disable these edit points?

Motivation

Moving through the history with a previous word / next word / redo / undo keeps jumping to these automatic imports which simply is of no value (to me) and disorienting.

There is specifically this odd behaviour when using save actions where sometimes a redo/undo can get stuck at the top of the file, i.e. it requires several presses of redo/undo to get the java editor view back to the last edit location instead of being fixed to the top of the file, which is not acceptable. Not quite sure yet how much it is related to me having organize imports as a save action.

Version: 2024-06 (4.32.0)
Build id: 20240606-1231