Skip to content

Commit

Permalink
Core and ref-Core libraries are not handled by the library manager.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed May 17, 2018
1 parent 926b73b commit ac6d3c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
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;

Expand Down Expand Up @@ -88,9 +87,7 @@ public Component getTableCellEditorComponent(JTable table, Object value,

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());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,15 @@ private void scanLibrary(UserLibraryFolder folderDesc) throws IOException {
}
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) {
Expand Down

0 comments on commit ac6d3c1

Please sign in to comment.