Only add core libraries that are installed in the sketchbook (fixes #3688)

This commit is contained in:
Ben Fry
2015-09-15 17:28:57 -04:00
parent 8420c4122d
commit eef9d84b08
2 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ public class Library extends LocalContribution {
StringList packageList;
/** Per-platform exports for this library. */
HashMap<String,String[]> exportList;
HashMap<String, String[]> exportList;
/** Applet exports (cross-platform by definition). */
String[] appletExportList;
@@ -386,7 +386,18 @@ public class ContributionTab {
List<Library> libraries =
new ArrayList<Library>(editor.getMode().contribLibraries);
libraries.addAll(editor.getMode().coreLibraries);
// Only add core libraries that are installed in the sketchbook
// https://github.com/processing/processing/issues/3688
//libraries.addAll(editor.getMode().coreLibraries);
final String sketchbookPath =
Base.getSketchbookLibrariesFolder().getAbsolutePath();
for (Library lib : editor.getMode().coreLibraries) {
if (lib.getLibraryPath().startsWith(sketchbookPath)) {
libraries.add(lib);
}
}
contributions.addAll(libraries);
Base base = editor.getBase();