[JAVA] Prevent unused imports from being deleted when saving in Eclipse

Introduction

It's pretty fine and doesn't matter. After using Eclipse for a long time and pasting the import statement and saving it once with the shortcut key, the imported statement added every time will be deleted without permission, so a memo when responding by changing the setting.

environment

manner

Open "Window"-> "Settings" and select "Java"-> "Editor"-> "Save Action" in the tree on the left. A screen like that is displayed.

image.png

Here, uncheck the "Organize Import" checkbox displayed in "Save Actions" on the right and click the "Apply and Close" button.

I don't know what the "import organization" is doing, but for the time being, this has avoided the phenomenon.

Recommended Posts

Prevent unused imports from being deleted when saving in Eclipse
Prevent unused imports from being deleted when saving in Eclipse
How to prevent past dates from being entered in Rails forms
Settings to delete unused Java imports when saving with VS Code