Auto Import + Live Template

Answered

After I added the java.util.Logger class in Editor->General->Auto Import, I use the template and have this problem:
1. The class was not imported
2. If I try to import class with "quick-fixes" I see no java.util.Logger

IntelliJ IDEA (Community Edition) IC-145.184.1
Build #IC-145.184, built on March 1, 2016
JRE: 1.8.0_60-b27 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation

8 comments
Comment actions Permalink

I mean java.util.logging.Logger of course

0
Comment actions Permalink

Please attach a screenshot with your settings. Did you exclude this class from the auto import?

0
Comment actions Permalink

 

 

 

 

If I remove this class from auto import it works:

0
Comment actions Permalink

I'm sorry, I see only now that it for 'exclude' the class. :)

How kann I set classes, these will be imported automaticaly?

0
Comment actions Permalink

Try using the fully qualified class name in the live template. IDEA will replace it with import automatically.

1
Comment actions Permalink

It is possible to say that all java.util.* classes will be automatically imported? (important for List, Map, ArrayList etc.)

0
Comment actions Permalink

Just use FQCN in the live templates, imports will be added automatically. You can also configure IDEA to use imports with * for java.util package in Java code style settings | imports.

0

Please sign in to leave a comment.