Not much to say, directly on the dry goods!
Objective
Why do I need to import packages automatically? Why do I need to import package optimization?
For:
How to implement an auto-import package in idea
1. Auto Import, Editor, File, Settings
The following are the default
Set as follows: (Below is idea 2015, version 2016)
Here's the idea 2017 version
Will
Add unambiguous imports on the fly
Optimize Imports on the fly
The purpose of the check is to:
Turn on automatic import package, automatically help us to import the required package, and optimize the imported package, such as automatically remove some unused packages.
Note: This is in addition to the automatic introduction of the package, of course, the premise is that this package does not have the same name, if the same name, you have to manually choose which to introduce it?
How to implement the settings for importing package optimizations (I'll take Java for example)
Of course, everyone else's settings like Scala are the same, very simple.
Optimization Introduction, if you introduce a package of many files, it will give you the optimization of the XXX package name. *. This is the configuration of the diagram below.
1. Java, Code Style, Editor, File, Settings
welcome everyone, join my public number: Big Data lie over the pit ai lie in the pit
At the same time, you can follow my personal blog :
http://www.cnblogs.com/zlslch/ and http://www.cnblogs.com/lchzls/ Http://www.cnblogs.com/sunn ydream/
For details, see: http://www.cnblogs.com/zlslch/p/7473861.html
Life is short, I would like to share. This public number will uphold the old learning to learn the endless exchange of open source spirit, gathered in the Internet and personal learning work of the essence of dry knowledge, everything to the Internet, feedback back to the Internet.
Current research areas: Big data, machine learning, deep learning, artificial intelligence, data mining, data analysis. Languages include: Java, Scala, Python, Shell, Linux, and more. It also covers the usual use of mobile phones, computers and the Internet using tips, problems and practical software. As long as you focus and stay in the group, every day must have a harvest
corresponding to the platform discussion and answer QQ group: Big Data and artificial intelligence lying in the pit (total group) (161156071)
How do I implement automatic import package and import package optimization settings? (suitable for various languages) (detailed text)