1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-19 08:52:15 +01:00

Core and ref-Core libraries are not handled by the library manager.

This commit is contained in:
Cristian Maglie 2018-01-02 16:34:31 +01:00
parent 926b73b538
commit ac6d3c1aff
2 changed files with 10 additions and 10 deletions

View File

@ -47,7 +47,6 @@ import cc.arduino.contributions.VersionComparator;
import cc.arduino.contributions.filters.BuiltInPredicate;
import cc.arduino.contributions.libraries.ContributedLibrary;
import cc.arduino.contributions.libraries.ContributedLibraryReleases;
import cc.arduino.contributions.libraries.filters.OnlyUpstreamReleasePredicate;
import cc.arduino.contributions.ui.InstallerTableCell;
import cc.arduino.utils.ReverseComparator;
@ -88,9 +87,7 @@ public class ContributedLibraryTableCellEditor extends InstallerTableCell {
final Optional<ContributedLibrary> mayInstalled = editorValue.getInstalled();
List<ContributedLibrary> releases = editorValue.getReleases().stream()
.filter(new OnlyUpstreamReleasePredicate())
.collect(Collectors.toList());
List<ContributedLibrary> releases = editorValue.getReleases();
List<ContributedLibrary> uninstalledReleases = releases.stream()
.filter(l -> !l.isLibraryInstalled()).collect(Collectors.toList());

View File

@ -191,12 +191,15 @@ public class LibrariesIndexer {
}
installedLibraries.addOrReplaceArchAware(lib);
// Check if we can find the same library in the index
// and mark it as installed
ContributedLibrary foundLib = index.find(lib.getName(), lib.getVersion());
if (foundLib != null) {
foundLib.setInstalledUserLibrary(lib);
lib.setTypes(foundLib.getTypes());
Location loc = lib.getLocation();
if (loc != Location.CORE && loc != Location.REFERENCED_CORE) {
// Check if we can find the same library in the index
// and mark it as installed
ContributedLibrary foundLib = index.find(lib.getName(), lib.getVersion());
if (foundLib != null) {
foundLib.setInstalledUserLibrary(lib);
lib.setTypes(foundLib.getTypes());
}
}
if (lib.getTypes() == null && folderDesc.location == Location.SKETCHBOOK) {