mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Libraries under "contributed" in lib menu are those that have types "contributed"
This commit is contained in:
@ -29,13 +29,14 @@
|
||||
package processing.app.packages;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import processing.app.helpers.FileUtils;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class LibraryList extends ArrayList<UserLibrary> {
|
||||
public class LibraryList extends LinkedList<UserLibrary> {
|
||||
|
||||
public LibraryList(LibraryList libs) {
|
||||
super(libs);
|
||||
@ -45,6 +46,10 @@ public class LibraryList extends ArrayList<UserLibrary> {
|
||||
super();
|
||||
}
|
||||
|
||||
public LibraryList(List<UserLibrary> ideLibs) {
|
||||
super(ideLibs);
|
||||
}
|
||||
|
||||
public UserLibrary getByName(String name) {
|
||||
for (UserLibrary l : this)
|
||||
if (l.getName().equals(name))
|
||||
@ -69,9 +74,11 @@ public class LibraryList extends ArrayList<UserLibrary> {
|
||||
|
||||
public LibraryList filterLibrariesInSubfolder(File subFolder) {
|
||||
LibraryList res = new LibraryList();
|
||||
for (UserLibrary lib : this)
|
||||
if (FileUtils.isSubDirectory(subFolder, lib.getInstalledFolder()))
|
||||
for (UserLibrary lib : this) {
|
||||
if (FileUtils.isSubDirectory(subFolder, lib.getInstalledFolder())) {
|
||||
res.add(lib);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user