Java file icon changed + Can not look up classes
已回答
Hello All,
Of late, I have experienced an issue where java file in IntelliJ come up with below icon which is not an usual one. Along with this, I can not look up classes using "Ctrl + N" option. If I press ctrl + right click on a method that exists outside of current file, it does not navigate there. All these featured worked before.
When I go to File -> Invalidate cace + Restart, it works for a minute and then java file icons change and functionality mentioned above stops working.

请先登录再写评论。
This icons means that your source files are outside of the source roots, check your module roots configuration in the project structure dialog.
I did not quite understand your comment. Can you please elaborate?
Your sources must reside in a directory that is configured as Sources here:
Refer to the documentation: https://www.jetbrains.com/help/idea/2016.3/configuring-content-roots.html.