cleanup
[idea/community.git] / java / java-impl / src / com / intellij / codeInsight / completion / JavaClassNameInsertHandler.java
index 08ebb822cc10f0f94eda4286e4ac8b8b47b85dd2..0cb4dbe86e39a286d899ad00f41fb64e33bbe4fd 100644 (file)
@@ -19,6 +19,7 @@ import com.intellij.codeInsight.AutoPopupController;
 import com.intellij.codeInsight.ExpectedTypeInfo;
 import com.intellij.codeInsight.ExpectedTypesProvider;
 import com.intellij.codeInsight.lookup.LookupElement;
 import com.intellij.codeInsight.ExpectedTypeInfo;
 import com.intellij.codeInsight.ExpectedTypesProvider;
 import com.intellij.codeInsight.lookup.LookupElement;
+import com.intellij.codeInsight.lookup.PsiTypeLookupItem;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.editor.Editor;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.editor.Editor;
@@ -89,7 +90,7 @@ class JavaClassNameInsertHandler implements InsertHandler<JavaPsiClassReferenceE
       context.setAddCompletionChar(false);
     }
 
       context.setAddCompletionChar(false);
     }
 
-    DefaultInsertHandler.addImportForItem(context, item);
+    PsiTypeLookupItem.addImportForItem(context, psiClass);
 
     if (shouldInsertParentheses(psiClass, file.findElementAt(context.getTailOffset() - 1))) {
       if (ConstructorInsertHandler.insertParentheses(context, item, psiClass, false)) {
 
     if (shouldInsertParentheses(psiClass, file.findElementAt(context.getTailOffset() - 1))) {
       if (ConstructorInsertHandler.insertParentheses(context, item, psiClass, false)) {