void (@NotNull PsiReference reference, @NotNull PsiElement psiElement, @NotNull String shortReferenceName, @NotNull Module currentModule, @NotNull DependencyScope scope, @NotNull List<? super @NotNull IntentionAction> registrar, @NotNull List<? super @NotNull LocalQuickFix> result) { JavaPsiFacade facade = JavaPsiFacade.getInstance(currentModule.getProject()); String fullReferenceText = reference.getCanonicalText(); ThreeState refToAnnotation = isReferenceToAnnotation(psiElement); for (ExternalLibraryResolver resolver : ExternalLibraryResolver.EP_NAME.getExtensionList()) { ExternalClassResolveResult resolveResult = resolver.resolveClass(shortReferenceName, refToAnnotation, currentModule); OrderEntryFix fix = null; if (resolveResult != null && facade.findClass(resolveResult.getQualifiedClassName(), currentModule.getModuleWithDependenciesAndLibrariesScope(true)) == null) { fix = new AddExtLibraryDependencyFix(reference, currentModule, resolveResult.getLibraryDescriptor(), scope, resolveResult.getQualifiedClassName()); } else if (!fullReferenceText.equals(shortReferenceName) && facade.findClass(fullReferenceText, currentModule.getModuleWithDependenciesAndLibrariesScope(true)) == null) { ExternalLibraryDescriptor descriptor = resolver.resolvePackage(fullReferenceText); if (descriptor != null) { fix = new AddExtLibraryDependencyFix(reference, currentModule, descriptor, scope, null); } } if (fix != null) { registrar.add(fix); result.add(fix); } } }