public static boolean mayAutoImportNow(@NotNull PsiFile psiFile, boolean isInContent,
                                         @NotNull ThreeState extensionsAllowToChangeFileSilently) {
    return isAddUnambiguousImportsOnTheFlyEnabled(psiFile) &&
           (ApplicationManager.getApplication().isUnitTestMode() ||
            DaemonListeners.canChangeFileSilently(psiFile, isInContent, extensionsAllowToChangeFileSilently)) &&
           isInModelessContext(psiFile.getProject());
  }
public static boolean mayAutoImportNow(@NotNull PsiFile psiFile, boolean isInContent,
                                         @NotNull ThreeState extensionsAllowToChangeFileSilently)