Search in sources :

Example 1 with OldCustomLibraryDescription

use of com.intellij.ide.util.frameworkSupport.OldCustomLibraryDescription in project intellij-community by JetBrains.

the class FacetLibrariesValidatorImpl method check.

@NotNull
public ValidationResult check() {
    if (myRequiredLibraries == null) {
        return ValidationResult.OK;
    }
    List<VirtualFile> roots = collectRoots(myContext.getRootModel());
    RequiredLibrariesInfo.RequiredClassesNotFoundInfo info = myRequiredLibraries.checkLibraries(VfsUtil.toVirtualFileArray(roots));
    if (info == null) {
        return ValidationResult.OK;
    }
    String missingJars = IdeBundle.message("label.missed.libraries.prefix") + " " + info.getMissingJarsText();
    LibraryInfo[] missingLibraries = info.getLibraryInfos();
    CustomLibraryDescription description = new OldCustomLibraryDescription(missingLibraries, myDescription.getDefaultLibraryName());
    return new ValidationResult(missingJars, new LibrariesQuickFix(description));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) LibraryInfo(com.intellij.facet.ui.libraries.LibraryInfo) OldCustomLibraryDescription(com.intellij.ide.util.frameworkSupport.OldCustomLibraryDescription) ValidationResult(com.intellij.facet.ui.ValidationResult) CustomLibraryDescription(com.intellij.openapi.roots.ui.configuration.libraries.CustomLibraryDescription) OldCustomLibraryDescription(com.intellij.ide.util.frameworkSupport.OldCustomLibraryDescription) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

ValidationResult (com.intellij.facet.ui.ValidationResult)1 LibraryInfo (com.intellij.facet.ui.libraries.LibraryInfo)1 OldCustomLibraryDescription (com.intellij.ide.util.frameworkSupport.OldCustomLibraryDescription)1 CustomLibraryDescription (com.intellij.openapi.roots.ui.configuration.libraries.CustomLibraryDescription)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 NotNull (org.jetbrains.annotations.NotNull)1