@@ -88,9 +88,6 @@ public class BaseNoGui {
88
88
// maps #included files to their library folder
89
89
public static Map <String , LibraryList > importToLibraryTable ;
90
90
91
- // XXX: Remove this field
92
- static private List <UserLibraryFolder > librariesFolders ;
93
-
94
91
static UserNotifier notifier = new BasicUserNotifier ();
95
92
96
93
static public Map <String , TargetPackage > packages ;
@@ -269,10 +266,6 @@ static public String getHardwarePath() {
269
266
return getHardwareFolder ().getAbsolutePath ();
270
267
}
271
268
272
- static public List <UserLibraryFolder > getLibrariesFolders () {
273
- return librariesFolders ;
274
- }
275
-
276
269
static public Platform getPlatform () {
277
270
return platform ;
278
271
}
@@ -663,37 +656,11 @@ public static boolean isIDEInstalledIntoSettingsFolder() {
663
656
static public void onBoardOrPortChange () {
664
657
examplesFolder = getContentFile ("examples" );
665
658
toolsFolder = getContentFile ("tools" );
666
- librariesFolders = new ArrayList <>();
667
-
668
- // Add IDE libraries folder
669
- librariesFolders .add (new UserLibraryFolder (getContentFile ("libraries" ), Location .IDE_BUILTIN ));
670
-
671
659
Optional <TargetPlatform > targetPlatform = getTargetPlatform ();
672
- if (targetPlatform .isPresent ()) {
673
- String core = getBoardPreferences ().get ("build.core" , "arduino" );
674
- if (core .contains (":" )) {
675
- String referencedCore = core .split (":" )[0 ];
676
- Optional <TargetPlatform > referencedPlatform = getTargetPlatform (referencedCore , targetPlatform .get ().getId ());
677
- if (referencedPlatform .isPresent ()) {
678
- File referencedPlatformFolder = referencedPlatform .get ().getFolder ();
679
- // Add libraries folder for the referenced platform
680
- File folder = new File (referencedPlatformFolder , "libraries" );
681
- librariesFolders .add (new UserLibraryFolder (folder , Location .REFERENCED_CORE ));
682
- }
683
- }
684
- File platformFolder = targetPlatform .get ().getFolder ();
685
- // Add libraries folder for the selected platform
686
- File folder = new File (platformFolder , "libraries" );
687
- librariesFolders .add (new UserLibraryFolder (folder , Location .CORE ));
688
- }
689
-
690
- // Add libraries folder for the sketchbook
691
- librariesFolders .add (getSketchbookLibrariesFolder ());
692
660
693
661
// Scan for libraries in each library folder.
694
662
// Libraries located in the latest folders on the list can override
695
663
// other libraries with the same name.
696
- librariesIndexer .setLibrariesFolders (librariesFolders );
697
664
if (targetPlatform .isPresent ()) {
698
665
librariesIndexer .setArchitecturePriority (targetPlatform .get ().getId ());
699
666
}
0 commit comments