void (UsageInfo[] infos, MultiMap<PsiElement, @DialogMessage String> conflicts, PackageWrapper aPackage) { if (!aPackage.getQualifiedName().isEmpty()) return; Set<PsiFile> filesWithImports = new HashSet<>(); for (UsageInfo info : infos) { PsiElement element = info.getElement(); if (element == null) continue; PsiReference reference = info.getReference(); if (reference == null) continue; PsiElement target = reference.resolve(); PsiFile file = element.getContainingFile(); if (file instanceof PsiJavaFile && target != null && filesWithImports.add(file) && !((PsiJavaFile)file).getPackageName().isEmpty()) { conflicts.putValue(element, JavaBundle.message("move.class.import.from.default.package.conflict", RefactoringUIUtil.getDescription(target, false))); } } }