File tree 3 files changed +10
-3
lines changed
app/test/cc/arduino/contributions
cc/arduino/contributions/libraries
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ public void testUpdatableLibrary() throws Exception {
47
47
48
48
folders .add (new UserLibraryFolder (SD121 , Location .SKETCHBOOK ));
49
49
indexer .setLibrariesFolders (folders );
50
+ indexer .rescanLibraries ();
50
51
51
52
sdLib = indexer .getIndex ().getInstalled ("SD" ).get ();
52
53
assertTrue ("SD lib is installed" , sdLib .isLibraryInstalled ());
@@ -74,6 +75,7 @@ public void testUpdatableLibraryWithBundled() throws Exception {
74
75
75
76
folders .add (new UserLibraryFolder (Bridge170 , Location .SKETCHBOOK ));
76
77
indexer .setLibrariesFolders (folders );
78
+ indexer .rescanLibraries ();
77
79
78
80
l = indexer .getIndex ().getInstalled ("Bridge" ).get ();
79
81
assertTrue ("Bridge lib is installed" , l .isLibraryInstalled ());
Original file line number Diff line number Diff line change @@ -114,9 +114,13 @@ private void parseIndex(File file) throws IOException {
114
114
}
115
115
116
116
public void setLibrariesFolders (List <UserLibraryFolder > folders ) {
117
- librariesFolders = folders ;
118
- rescanLibraries ();
117
+ setLibrariesFolders (folders , false );
119
118
}
119
+
120
+ public void setLibrariesFolders (List <UserLibraryFolder > folders , boolean rescan ) {
121
+ librariesFolders = folders ;
122
+ if (rescan ) rescanLibraries ();
123
+ }
120
124
121
125
public List <UserLibraryFolder > getLibrariesFolders () {
122
126
return librariesFolders ;
Original file line number Diff line number Diff line change @@ -674,10 +674,11 @@ static public void onBoardOrPortChange() {
674
674
// Scan for libraries in each library folder.
675
675
// Libraries located in the latest folders on the list can override
676
676
// other libraries with the same name.
677
- librariesIndexer .setLibrariesFolders (librariesFolders );
677
+ librariesIndexer .setLibrariesFolders (librariesFolders , false );
678
678
if (getTargetPlatform () != null ) {
679
679
librariesIndexer .setArchitecturePriority (getTargetPlatform ().getId ());
680
680
}
681
+
681
682
librariesIndexer .rescanLibraries ();
682
683
683
684
populateImportToLibraryTable ();
You can’t perform that action at this time.
0 commit comments