Community
Participate
Working Groups
I wonder why we have so many warnings about unused import statements. I checked Preferneces > Java > Code STyle > Clean Up and the active profile is "Eclipse [built-in]" with details: ... Remove unused imports ... But it doesn't work as all our projects have these warnings and changing the source file doe not remove those unused imports.
Works fine for me in 4.15 M3.
(In reply to M H from comment #0) > I wonder why we have so many warnings about unused import statements. Maybe those are only reported since bug 559618? Please provide an example with steps for reproducing.
I found a problem: There is also a Preferences > Java > Editor > Save Actions > "Organize imports" After checking this, the removal works. Well this is misleading, as "Additional actions" in the same preferences does NOT contain "remove unused imports" as Preferences > Java > Code Style > Clean Up has - and you can't change/add it. In brief: Clean Up > Eclipse [built in] does NOT "Remove unused imports" is Save Actiopns > Organize imports is NOT checked! This is either a bug or a missing information when you just see the Clean Up dialog with "Remove unused imports".
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.