MCPcopy Index your code
hub / github.com/benfry/processing4 / list

Method list

app/src/processing/app/Library.java:625–652  ·  view source on GitHub ↗
(File folder)

Source from the content-addressed store, hash-verified

623 static Set<String> duplicateLibraries = new HashSet<>();
624
625 static public List<Library> list(File folder) {
626 List<Library> libraries = new ArrayList<>();
627 List<File> librariesFolders = new ArrayList<>(discover(folder));
628
629 Map<String, File> seen = new HashMap<>();
630 for (File baseFolder : librariesFolders) {
631 Library lib = new Library(baseFolder);
632 String name = lib.getName();
633 File foundEarlier = seen.get(name);
634 if (foundEarlier != null) {
635 // Warn the user about this duplication (later, on the EDT)
636 if (!duplicateLibraries.contains(name)) {
637 Messages.showWarningTiered("Duplicate Library Found",
638 "There are multiple libraries named “" + name + "”",
639 "Please remove either “" + foundEarlier.getName() +
640 " or “" + lib.getName() + "”\n" +
641 "from " + folder.getPath() + "\n" +
642 "and restart Processing.", null);
643 }
644 duplicateLibraries.add(name);
645
646 } else {
647 seen.put(name, lib.getFolder());
648 libraries.add(lib);
649 }
650 }
651 return libraries;
652 }
653
654
655 public ContributionType getType() {

Callers 14

rebuildLibraryListMethod · 0.95
listSupportedMethod · 0.45
copyDirMethod · 0.45
calcFolderSizeMethod · 0.45
contentsToClassPathMethod · 0.45
packageListFromFolderMethod · 0.45
handleExportsMethod · 0.45
listPlatformEntriesMethod · 0.45
getClassPathMethod · 0.45
discoverMethod · 0.45
addSketchesMethod · 0.45
getSketchCodeFilesMethod · 0.45

Calls 9

discoverMethod · 0.95
showWarningTieredMethod · 0.95
getMethod · 0.65
getNameMethod · 0.45
containsMethod · 0.45
getPathMethod · 0.45
addMethod · 0.45
putMethod · 0.45
getFolderMethod · 0.45

Tested by

no test coverage detected