码迷,mamicode.com
首页 > 系统相关 > 详细

Eclipse Ctrl + Shift + O in IntelliJ IDEA

时间:2017-10-16 23:36:00      阅读:494      评论:0      收藏:0      [点我收藏+]

标签:clip   move   dea   remove   auto   load   big   some   str   

In Eclipse, you press CTRL + SHIFT + O “Organize Imports” to import packages automatically. For IntelliJ IDEA, if you press CTRL + ALT + O “Optimize Imports”, it just removes some unused imports, never imports any package. And the worst is you need click on the class name and press ALT + ENTER keys to import the package one by one.

Solution

The IDEA is working a bit differently, the “unambiguous imports” are imported on the fly, and you need to enable this feature manually.

File –>> Settings –>> Editor –>> General –>> Auto Import –>> Checked these options :

  1. Add unambiguous imports on the fly
  2. Optimize imports on the fly
技术分享
 
Note
For ambiguous imports (same class name in a different package), you still need click on the class name and press ALT + ENTER keys to import the package manually.

Eclipse Ctrl + Shift + O in IntelliJ IDEA

标签:clip   move   dea   remove   auto   load   big   some   str   

原文地址:http://www.cnblogs.com/zheting/p/7679164.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!