Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Eclipseの保存アクションで未使用のインポートと変数を削除するにはどうすればよいですか。オプション Ctrl+Shift+O があります。ただし、未使用のインポートのみを削除します。未使用の変数も削除したい。
これを行う方法は次のとおりです。
Eclipse では、[ウィンドウ] -> [設定] -> [Java] -> [エディタ] -> [アクションの保存] に移動し、[保存時に選択したアクションを実行: インポートの整理] をクリックします。
楽しみ!