I recently started practicing in Java and after playing around a little bit with SublimeText I decided to try out the full featured IDE and installed the latest Intellij IDEA.
So I got it installed, created a new project, added JDK and pointed to my existent folder with java files like this:
I expected that IDEA will automatically give code hints for imports and function calls but it didn’t worked. Whenever I used import
I got this:
And whenever I tried invoking code suggestions I got this:
I couldn’t figure out what’s wrong but finally I noticed the “src” folder and tried to move my files there:
Now everything worked fine:
It turned out in Java world it’s common to separate the sources and the other types of files like resources, config-files and compiled files. If you press Ctrl+Alt+Shift+S you’ll get the project settings window where you can configure your custom sources folder but it defaults to “src” as you can see:
It was a a little bit unusual for me as my favorite PHP editor (Nusphere) by default parses the whole project folder and makes code-hints available from everywhere.