How do I get IntelliJ to generate a new method ?
Answered
In Eclipse I can type something like the following where the method does not exist in the class
ShipmentDataReader.getShipmentByShipmentId(shipmentId);
and Eclipse gives me the option to create the method with the appropriate arguments.
How do I do this in IntelliJ? Alt+Enter does nothing. Generate doesn't give me the option to create this method. Note that I'm not implementing an interface method or doing an override. I just need to create the new method in the class.
Thanks.
Please sign in to leave a comment.
Alt+Enter on the red code should suggest to create a new method.
It turns out the problem was that the variable name I was using as an argument was incorrect. Once I corrected that Alt+Enter worked.