Make eclipse remove unused imports but keep unresolved
eclipse
Solution
Thanks to Bananeweizen and Krispy for their contributions, but so far it seems that the answer to this question is No.
The most efficient work around for me, is just to hit ctrl+z every time I save a file with unresolved imports.
I have submitted a bug to Eclipse's bugtracker: https://bugs.eclipse.org/bugs/show_bug.cgi?id=395538
This Eclipse bug tracks this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=357795
Problem
Is there a way to make Eclipse keep used but unresolved imports? I'm using Eclipse's save actions to remove unused imports. Unfortunately it also removes imports that are used, but not unresolved. In the example below, eclipse will remove `GeneratedClass`, if I save `MyClass` before generating the `GeneratedClass`. When I late generate the code, `MyClass` will be missing the import. ``` import a.b.GeneratedClass; public class MyClass extend GeneratedClass {} ```