How to remove unused imports from Eclipse

前端 未结 10 1089
不思量自难忘°
不思量自难忘° 2020-12-12 10:57

Is there any way to automatically remove all unused imports (signaled with a warning) of a project with Eclipse IDE?

10条回答
  •  旧巷少年郎
    2020-12-12 11:37

    Better way is just to add "save action" so when you save the project it will clear the unused import's and format the code as well if you like .

    Go to Window > Preferences > Java > Editor > Save Actions

    and pick what ever you want .

提交回复
热议问题