Community
Participate
Working Groups
In one of my Junit test classes the import organiser happily removes static imports. This seems to happen to a modified file, which is saved, with 'organise imports on save' enabled. This does NOT seem to happen when explicit invoked on a saved file. These are remove (but really used): import static org.hamcrest.core.IsEqual.equalTo; import static org.hamcrest.core.IsNot.not; import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; import static org.junit.Assert.assertThat;
this didn't happen with 4.5.0: regression
This only happens when there are compile errors in the java file. "Rather" annoying.
(In reply to Ferry Huberts from comment #2) > This only happens when there are compile errors in the java file. > > "Rather" annoying. Ah, no. Just had it happen to a file without compile errors. I did an 'organise imports' on the file and the static imports were removed.
Ferry, it would help if you can share the code where you see this problem, ideally isolated in a small testcase. I tried out a bit but can't reproduce this problem.
Well that is the problem: sometimes it does this but most of the time it doesn't.
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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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.