Skip to content

Commit ac6d3c1

Browse files
committed
Core and ref-Core libraries are not handled by the library manager.
1 parent 926b73b commit ac6d3c1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Diff for: app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import cc.arduino.contributions.filters.BuiltInPredicate;
4848
import cc.arduino.contributions.libraries.ContributedLibrary;
4949
import cc.arduino.contributions.libraries.ContributedLibraryReleases;
50-
import cc.arduino.contributions.libraries.filters.OnlyUpstreamReleasePredicate;
5150
import cc.arduino.contributions.ui.InstallerTableCell;
5251
import cc.arduino.utils.ReverseComparator;
5352

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

8988
final Optional<ContributedLibrary> mayInstalled = editorValue.getInstalled();
9089

91-
List<ContributedLibrary> releases = editorValue.getReleases().stream()
92-
.filter(new OnlyUpstreamReleasePredicate())
93-
.collect(Collectors.toList());
90+
List<ContributedLibrary> releases = editorValue.getReleases();
9491
List<ContributedLibrary> uninstalledReleases = releases.stream()
9592
.filter(l -> !l.isLibraryInstalled()).collect(Collectors.toList());
9693

Diff for: arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java

+9-6
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,15 @@ private void scanLibrary(UserLibraryFolder folderDesc) throws IOException {
191191
}
192192
installedLibraries.addOrReplaceArchAware(lib);
193193

194-
// Check if we can find the same library in the index
195-
// and mark it as installed
196-
ContributedLibrary foundLib = index.find(lib.getName(), lib.getVersion());
197-
if (foundLib != null) {
198-
foundLib.setInstalledUserLibrary(lib);
199-
lib.setTypes(foundLib.getTypes());
194+
Location loc = lib.getLocation();
195+
if (loc != Location.CORE && loc != Location.REFERENCED_CORE) {
196+
// Check if we can find the same library in the index
197+
// and mark it as installed
198+
ContributedLibrary foundLib = index.find(lib.getName(), lib.getVersion());
199+
if (foundLib != null) {
200+
foundLib.setInstalledUserLibrary(lib);
201+
lib.setTypes(foundLib.getTypes());
202+
}
200203
}
201204

202205
if (lib.getTypes() == null && folderDesc.location == Location.SKETCHBOOK) {

0 commit comments

Comments
 (0)