Skip to content

Commit 612f4c9

Browse files
bitroncmaglie
authored andcommitted
Moved discoveryManager from Base to BaseNoGui.
1 parent 1c8a4e9 commit 612f4c9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

app/src/processing/app/Base.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ public class Base {
6464
/** Set true if this a proper release rather than a numbered revision. */
6565
static public boolean RELEASE = BaseNoGui.RELEASE;
6666

67-
private static DiscoveryManager discoveryManager = new DiscoveryManager();
68-
6967
static private boolean commandLine;
7068

7169
// A single instance of the preferences window
@@ -2778,6 +2776,6 @@ public void handleAddLibrary() {
27782776
}
27792777

27802778
public static DiscoveryManager getDiscoveryManager() {
2781-
return discoveryManager;
2779+
return BaseNoGui.getDiscoveryManager();
27822780
}
27832781
}

app/src/processing/app/BaseNoGui.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import org.apache.commons.logging.impl.LogFactoryImpl;
1818
import org.apache.commons.logging.impl.NoOpLog;
1919

20+
import cc.arduino.packages.DiscoveryManager;
21+
2022
import processing.app.debug.TargetBoard;
2123
import processing.app.debug.TargetPackage;
2224
import processing.app.debug.TargetPlatform;
@@ -43,6 +45,8 @@ public class BaseNoGui {
4345
// commandline
4446
static String currentDirectory = System.getProperty("user.dir");
4547

48+
private static DiscoveryManager discoveryManager = new DiscoveryManager();
49+
4650
// maps #included files to their library folder
4751
public static Map<String, Library> importToLibraryTable;
4852

@@ -117,6 +121,10 @@ static public TargetPlatform getCurrentTargetPlatformFromPackage(String pack) {
117121
return getTargetPlatform(pack, PreferencesData.get("target_platform"));
118122
}
119123

124+
public static DiscoveryManager getDiscoveryManager() {
125+
return discoveryManager;
126+
}
127+
120128
static public File getHardwareFolder() {
121129
// calculate on the fly because it's needed by Preferences.init() to find
122130
// the boards.txt and programmers.txt preferences files (which happens

0 commit comments

Comments
 (0)