Moved discoveryManager from Base to BaseNoGui.

This commit is contained in:
Claudio Indellicati 2014-08-22 16:49:39 +02:00 committed by Cristian Maglie
parent 1c8a4e9f58
commit 612f4c926f
2 changed files with 9 additions and 3 deletions

View File

@ -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();
}
}

View File

@ -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<String, Library> 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