3

I am using IDEA 13.1

import x.y.ClassA;
import x.y.ClassB;
import x.y.ClassC;
import x.y.ClassD;

public class MyClass{
    //Something Else
}

When I want to import

x.y.ClassE

IDEA works like this

import x.y.*;

public class MyClass{
    //Something Else
}

That's crazy!

How to set import single class rather then ambiguous import!

Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
Karl.Li
  • 169
  • 12

2 Answers2

4

That happens because of specific setting about imports in IDEA.

Go to Settings - Code Style - Java - Imports and set 'Class count to use import with '*'' to whatever value you want.

arghtype
  • 4,376
  • 11
  • 45
  • 60
2

IntelliJ IDEA has a setting that governs after how many imports from a single package the * import will be used. To configure it, go to File -> Settings -> Code Style -> Java -> Imports and change Class count to use import with '*' and Names count to use static import with '*' to some large number - say 99.

Mureinik
  • 297,002
  • 52
  • 306
  • 350