I used the shortcut Alt+Enter to get problem solutions for specific errors or context. For example:
package test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line = reader.readLine();
}
}
and Alt+Enter was supposed to change
public static void main(String[] args)
to
public static void main(String[] args) throws IOException
and import java.io.InputStreamReader;
.
If I make the following code:
int sizeA = 5;
int sizeB = 50;
int area = calculateArea(sizeA,sizeB);
Alt+Enter was supposed to make a Method for me where I make the calculations.
Now I have a fresh installation of IntelliJ Community Edition, using JDK 9 and the shortcut doesn't work anymore. All Alt+Enter does is call the "Generate" tab where I can generate methods like toString()
or hashCode()
or constructors.
Any solutions?