From 612f4c926f8869f754bd48abfc5de6debb7d88f2 Mon Sep 17 00:00:00 2001 From: Claudio Indellicati Date: Fri, 22 Aug 2014 16:49:39 +0200 Subject: [PATCH] Moved discoveryManager from Base to BaseNoGui. --- app/src/processing/app/Base.java | 4 +--- app/src/processing/app/BaseNoGui.java | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) 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