<p>Is there anyway to get Eclipse to automatically look for static imports? For example, now that I've finally upgraded to Junit 4, I'd like to be able to write:</p>

<pre><code>assertEquals(expectedValue, actualValue);
</code></pre>

<p>hit <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd> and have Eclipse add:</p>

<pre><code>import static org.junit.Assert.assertEquals;
</code></pre>

<p>Maybe I'm asking too much.</p>

Not exactly what I wanted, but I found a workaround. In Eclipse 3.4 (Ganymede),  go to
Window->Preferences->Java->Editor->Content Assist
and check the checkbox for
Use static imports (only 1.5 or higher)
.
This will not bring in the import on an Optimize Imports, but if you do a Quick Fix (
CTRL
+
1
) on the line it will give you the option to add the static import which is good enough.