@@ -88,9 +88,6 @@ public class BaseNoGui {
8888 // maps #included files to their library folder
8989 public static Map <String , LibraryList > importToLibraryTable ;
9090
91- // XXX: Remove this field
92- static private List <UserLibraryFolder > librariesFolders ;
93-
9491 static UserNotifier notifier = new BasicUserNotifier ();
9592
9693 static public Map <String , TargetPackage > packages ;
@@ -263,10 +260,6 @@ static public String getHardwarePath() {
263260 return getHardwareFolder ().getAbsolutePath ();
264261 }
265262
266- static public List <UserLibraryFolder > getLibrariesFolders () {
267- return librariesFolders ;
268- }
269-
270263 static public Platform getPlatform () {
271264 return platform ;
272265 }
@@ -656,37 +649,10 @@ public static boolean isIDEInstalledIntoSettingsFolder() {
656649 static public void onBoardOrPortChange () {
657650 examplesFolder = getContentFile ("examples" );
658651 toolsFolder = getContentFile ("tools" );
659- librariesFolders = new ArrayList <>();
660-
661- // Add IDE libraries folder
662- librariesFolders .add (new UserLibraryFolder (getContentFile ("libraries" ), Location .IDE_BUILTIN ));
663-
664- TargetPlatform targetPlatform = getTargetPlatform ();
665- if (targetPlatform != null ) {
666- String core = getBoardPreferences ().get ("build.core" , "arduino" );
667- if (core .contains (":" )) {
668- String referencedCore = core .split (":" )[0 ];
669- TargetPlatform referencedPlatform = getTargetPlatform (referencedCore , targetPlatform .getId ());
670- if (referencedPlatform != null ) {
671- File referencedPlatformFolder = referencedPlatform .getFolder ();
672- // Add libraries folder for the referenced platform
673- File folder = new File (referencedPlatformFolder , "libraries" );
674- librariesFolders .add (new UserLibraryFolder (folder , Location .REFERENCED_CORE ));
675- }
676- }
677- File platformFolder = targetPlatform .getFolder ();
678- // Add libraries folder for the selected platform
679- File folder = new File (platformFolder , "libraries" );
680- librariesFolders .add (new UserLibraryFolder (folder , Location .CORE ));
681- }
682-
683- // Add libraries folder for the sketchbook
684- librariesFolders .add (getSketchbookLibrariesFolder ());
685652
686653 // Scan for libraries in each library folder.
687654 // Libraries located in the latest folders on the list can override
688655 // other libraries with the same name.
689- librariesIndexer .setLibrariesFolders (librariesFolders );
690656 if (getTargetPlatform () != null ) {
691657 librariesIndexer .setArchitecturePriority (getTargetPlatform ().getId ());
692658 }
0 commit comments