Search in sources :

Example 1 with JpsLibraryCollection

use of org.jetbrains.jps.model.library.JpsLibraryCollection in project intellij-elixir by KronicDeth.

the class Builder method erlangSdkNameToErlExePath.

@NotNull
private static String erlangSdkNameToErlExePath(@NotNull String erlangSdkName, @NotNull JpsModule module) throws LibraryNotFound, FileNotFoundException, AccessDeniedException {
    JpsLibraryCollection libraryCollection = module.getProject().getModel().getGlobal().getLibraryCollection();
    JpsLibrary erlangSdkLibrary = libraryCollection.findLibrary(erlangSdkName);
    String erlExePath;
    if (erlangSdkLibrary != null) {
        erlExePath = erlangSdkLibraryToErlExePath(erlangSdkLibrary);
    } else {
        throw new LibraryNotFound(erlangSdkName);
    }
    return erlExePath;
}
Also used : JpsLibraryCollection(org.jetbrains.jps.model.library.JpsLibraryCollection) JpsLibrary(org.jetbrains.jps.model.library.JpsLibrary) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

NotNull (org.jetbrains.annotations.NotNull)1 JpsLibrary (org.jetbrains.jps.model.library.JpsLibrary)1 JpsLibraryCollection (org.jetbrains.jps.model.library.JpsLibraryCollection)1