IDEA, Hamcrest and static imports
hamcrest, intellij-idea, java
Solution
Open the parentheses and you will get a prompt for statically importing the method. IntelliJ won't understand it's a method you're trying to reference until you add the parenthesis.
In other words, type `assertThat(` and then ALT-ENTER.
Problem
My maven project includes ``` 186 <dependency> 187 <groupId>org.hamcrest</groupId> 188 <artifactId>hamcrest-all</artifactId> 189 <version>1.3</version> 190 </dependency> ``` When i type `assertThat` .. I'd like for IDEA to figure out that the following is needed ``` import static org.hamcrest.MatcherAssert.assertThat; ``` Instead i get this. How can this corrected? How can i get IDEA to perform a static import?