How to let java file to display some obvious warns info which has unused import .
已回答
As the title suggest, i want display a warn info of java file and package. The picture below is eclipse's implement. Could idea display some info like it? Now I only open each java file to fond unused import.
请先登录再写评论。
You can use `Code -> Optimize Imports` to remove the unused imports in the project. Why would you like to see see them in the project structure?
Thanks for your answer. I have choice this setting. But found that sometimes i forget to format my code .the unused import will not be remove. And maybe others colleagues haven't choice this setting, he will push unused import to git. So i want see them in the project structure.
Some people may choose to ignore the warnings..... I suggest you use the Save-Actions plugin in your team. It can remove the unused imports automatically.
@Liu Pei Pei thanks, I will try your suggest.
Have you tried Preferences | Editor | General | Auto Import | Optimize imports on the fly?