IntelliJ Tips and Tricks - Automatically Manage Your Imports

preview_player
Показать описание
Java is often criticised for the amount of cerimonial code developers need to write. This is a valid criticism of the Java language. Import statements is just one aspect of ceremonial code Java developers need to maintain.

IntelliJ can help automate this tedious task. With a few settings updates, you can instruct IntelliJ to automatically manage your imports. Allow IntelliJ to automatically add and remove import statements. When IntelliJ can determine the import, it will automatically add when you type the new class to your code, or even on paste operations. 

IntelliJ will also automatically remove the import statement when the last reference is removed from your code. Say goodbye to unused imports!
Рекомендации по теме