diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index f754c9467..41fe9ea8f 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -64,8 +64,6 @@ public class Base { /** Set true if this a proper release rather than a numbered revision. */ static public boolean RELEASE = BaseNoGui.RELEASE; - private static DiscoveryManager discoveryManager = new DiscoveryManager(); - static private boolean commandLine; // A single instance of the preferences window @@ -2778,6 +2776,6 @@ public class Base { } public static DiscoveryManager getDiscoveryManager() { - return discoveryManager; + return BaseNoGui.getDiscoveryManager(); } } diff --git a/app/src/processing/app/BaseNoGui.java b/app/src/processing/app/BaseNoGui.java index 90a23ccbe..81413d740 100644 --- a/app/src/processing/app/BaseNoGui.java +++ b/app/src/processing/app/BaseNoGui.java @@ -17,6 +17,8 @@ import java.util.logging.Logger; import org.apache.commons.logging.impl.LogFactoryImpl; import org.apache.commons.logging.impl.NoOpLog; +import cc.arduino.packages.DiscoveryManager; + import processing.app.debug.TargetBoard; import processing.app.debug.TargetPackage; import processing.app.debug.TargetPlatform; @@ -43,6 +45,8 @@ public class BaseNoGui { // commandline static String currentDirectory = System.getProperty("user.dir"); + private static DiscoveryManager discoveryManager = new DiscoveryManager(); + // maps #included files to their library folder public static Map importToLibraryTable; @@ -117,6 +121,10 @@ public class BaseNoGui { return getTargetPlatform(pack, PreferencesData.get("target_platform")); } + public static DiscoveryManager getDiscoveryManager() { + return discoveryManager; + } + static public File getHardwareFolder() { // calculate on the fly because it's needed by Preferences.init() to find // the boards.txt and programmers.txt preferences files (which happens