testing auto import
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Mon, 30 Jan 2012 10:08:04 +0000 (14:08 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Mon, 30 Jan 2012 12:21:36 +0000 (16:21 +0400)
java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ImportClassFixBase.java

index dccdb06284941e4a1dbd50999ece086d83e58cbe..ee4b5eae23a9e8df723bc9e909439aa566833913 100644 (file)
@@ -186,7 +186,7 @@ public abstract class ImportClassFixBase<T extends PsiElement & PsiReference> im
         && (JspPsiUtil.isInJspFile(psiFile) ?
             CodeInsightSettings.getInstance().JSP_ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY :
             CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY)
-        && codeAnalyzer.canChangeFileSilently(psiFile)
+        && (ApplicationManager.getApplication().isUnitTestMode() || codeAnalyzer.canChangeFileSilently(psiFile))
         && !autoImportWillInsertUnexpectedCharacters(classes[0])
       ) {
       CommandProcessor.getInstance().runUndoTransparentAction(new Runnable() {