File tree Expand file tree Collapse file tree 3 files changed +7
-53
lines changed
arduino-core/src/cc/arduino/contributions Expand file tree Collapse file tree 3 files changed +7
-53
lines changed Original file line number Diff line number Diff line change 3030package cc .arduino .contributions .libraries ;
3131
3232import cc .arduino .Constants ;
33- import cc .arduino .contributions .libraries .filters .LibraryInstalledInsideCore ;
3433import cc .arduino .contributions .libraries .filters .TypePredicate ;
3534import cc .arduino .contributions .packages .ContributedPlatform ;
3635import com .fasterxml .jackson .databind .DeserializationFeature ;
@@ -130,10 +129,13 @@ public void rescanLibraries() {
130129 scanInstalledLibraries (folderDesc );
131130 }
132131
133- installedLibraries .stream ().filter (new TypePredicate ("Contributed" )).filter (new LibraryInstalledInsideCore ()).forEach (userLibrary -> {
134- ContributedPlatform platform = BaseNoGui .indexer .getPlatformByFolder (userLibrary .getInstalledFolder ());
135- userLibrary .setTypes (Collections .singletonList (platform .getCategory ()));
136- });
132+ installedLibraries .stream () //
133+ .filter (new TypePredicate ("Contributed" )) //
134+ .filter (l -> l .getLocation () == Location .CORE || l .getLocation () == Location .REFERENCED_CORE ) //
135+ .forEach (l -> {
136+ ContributedPlatform platform = BaseNoGui .indexer .getPlatformByFolder (l .getInstalledFolder ());
137+ l .setTypes (Collections .singletonList (platform .getCategory ()));
138+ });
137139 }
138140
139141 private void scanInstalledLibraries (UserLibraryFolder folderDesc ) {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -461,10 +461,6 @@ private List<ContributedPlatform> getInstalledPlatforms() {
461461 return index .getInstalledPlatforms ();
462462 }
463463
464- public boolean isFolderInsidePlatform (final File folder ) {
465- return getPlatformByFolder (folder ) != null ;
466- }
467-
468464 public ContributedPlatform getPlatformByFolder (final File folder ) {
469465 Optional <ContributedPlatform > platformOptional = getInstalledPlatforms ().stream ().filter (contributedPlatform -> {
470466 assert contributedPlatform .getInstalledFolder () != null ;
You can’t perform that action at this time.
0 commit comments