mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Only add core libraries that are installed in the sketchbook (fixes #3688)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user