mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-03 00:29:21 +01:00
Removed installedLibrariesWithDuplicates since it's no more used
This commit is contained in:
parent
627d4fb536
commit
bf1b523854
@ -59,7 +59,6 @@ public class LibrariesIndexer {
|
|||||||
|
|
||||||
private LibrariesIndex index;
|
private LibrariesIndex index;
|
||||||
private final LibraryList installedLibraries = new LibraryList();
|
private final LibraryList installedLibraries = new LibraryList();
|
||||||
private final LibraryList installedLibrariesWithDuplicates = new LibraryList();
|
|
||||||
private List<File> librariesFolders;
|
private List<File> librariesFolders;
|
||||||
private final File indexFile;
|
private final File indexFile;
|
||||||
private final File stagingFolder;
|
private final File stagingFolder;
|
||||||
@ -113,7 +112,6 @@ public class LibrariesIndexer {
|
|||||||
public void rescanLibraries() {
|
public void rescanLibraries() {
|
||||||
// Clear all installed flags
|
// Clear all installed flags
|
||||||
installedLibraries.clear();
|
installedLibraries.clear();
|
||||||
installedLibrariesWithDuplicates.clear();
|
|
||||||
|
|
||||||
if (index.getLibraries() == null) {
|
if (index.getLibraries() == null) {
|
||||||
return;
|
return;
|
||||||
@ -180,11 +178,6 @@ public class LibrariesIndexer {
|
|||||||
throw new IOException(lib.getSrcFolder().getAbsolutePath());
|
throw new IOException(lib.getSrcFolder().getAbsolutePath());
|
||||||
}
|
}
|
||||||
installedLibraries.addOrReplace(lib);
|
installedLibraries.addOrReplace(lib);
|
||||||
if (isSketchbook) {
|
|
||||||
installedLibrariesWithDuplicates.add(lib);
|
|
||||||
} else {
|
|
||||||
installedLibrariesWithDuplicates.addOrReplace(lib);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,11 +189,6 @@ public class LibrariesIndexer {
|
|||||||
throw new IOException(lib.getSrcFolder().getAbsolutePath());
|
throw new IOException(lib.getSrcFolder().getAbsolutePath());
|
||||||
}
|
}
|
||||||
installedLibraries.addOrReplaceArchAware(lib);
|
installedLibraries.addOrReplaceArchAware(lib);
|
||||||
if (isSketchbook) {
|
|
||||||
installedLibrariesWithDuplicates.add(lib);
|
|
||||||
} else {
|
|
||||||
installedLibrariesWithDuplicates.addOrReplaceArchAware(lib);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if we can find the same library in the index
|
// Check if we can find the same library in the index
|
||||||
// and mark it as installed
|
// and mark it as installed
|
||||||
@ -229,15 +217,6 @@ public class LibrariesIndexer {
|
|||||||
return new LibraryList(installedLibraries);
|
return new LibraryList(installedLibraries);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Same as getInstalledLibraries(), but allow duplicates between
|
|
||||||
// builtin+package libraries and sketchbook installed libraries.
|
|
||||||
// However, do not report duplicates among builtin and packages, to
|
|
||||||
// allow any package to override builtin libraries without being
|
|
||||||
// reported as duplicates.
|
|
||||||
public LibraryList getInstalledLibrariesWithDuplicates() {
|
|
||||||
return installedLibrariesWithDuplicates;
|
|
||||||
}
|
|
||||||
|
|
||||||
public File getStagingFolder() {
|
public File getStagingFolder() {
|
||||||
return stagingFolder;
|
return stagingFolder;
|
||||||
}
|
}
|
||||||
|
@ -816,25 +816,6 @@ public class BaseNoGui {
|
|||||||
.format("Unable to list header files in {0}", lib.getSrcFolder()), e);
|
.format("Unable to list header files in {0}", lib.getSrcFolder()), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// repeat for ALL libraries, to pick up duplicates not visible normally.
|
|
||||||
// any new libraries found here are NEVER used, but they are added to the
|
|
||||||
// end of already-found headers, to allow Compiler to report them if
|
|
||||||
// the sketch tries to use them.
|
|
||||||
for (UserLibrary lib : librariesIndexer.getInstalledLibrariesWithDuplicates()) {
|
|
||||||
try {
|
|
||||||
String headers[] = headerListFromIncludePath(lib.getSrcFolder());
|
|
||||||
for (String header : headers) {
|
|
||||||
LibraryList list = importToLibraryTable.get(header);
|
|
||||||
if (list != null) {
|
|
||||||
if (!(list.hasLibrary(lib))) {
|
|
||||||
list.addLast(lib);
|
|
||||||
//System.out.println(" duplicate lib: " + lib.getInstalledFolder().getPath());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void initParameters(String args[]) throws Exception {
|
static public void initParameters(String args[]) throws Exception {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user