Reformatted
This commit is contained in:
parent
6bb6d88371
commit
03fbd9cd25
@ -219,8 +219,9 @@ public class Globals {
|
|||||||
asset_types.add(a);
|
asset_types.add(a);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!sort)
|
if (!sort) {
|
||||||
return asset_types;
|
return asset_types;
|
||||||
|
}
|
||||||
|
|
||||||
asset_types.sort(new Comparator<Class<AbstractAsset>>() {
|
asset_types.sort(new Comparator<Class<AbstractAsset>>() {
|
||||||
@Override
|
@Override
|
||||||
@ -260,6 +261,9 @@ public class Globals {
|
|||||||
Collection<Class> lafs;
|
Collection<Class> lafs;
|
||||||
// lafs = opensesim.util.XClassLoader.getClassesList(urllist, LookAndFeel.class);
|
// lafs = opensesim.util.XClassLoader.getClassesList(urllist, LookAndFeel.class);
|
||||||
lafs = class_cache.getClassCollection(LookAndFeel.class);
|
lafs = class_cache.getClassCollection(LookAndFeel.class);
|
||||||
|
if (lafs == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ClassLoader currentThreadClassLoader
|
ClassLoader currentThreadClassLoader
|
||||||
= Thread.currentThread().getContextClassLoader();
|
= Thread.currentThread().getContextClassLoader();
|
||||||
@ -300,7 +304,6 @@ public class Globals {
|
|||||||
prefs = Preferences.userNodeForPackage(c);
|
prefs = Preferences.userNodeForPackage(c);
|
||||||
|
|
||||||
// world = new World();
|
// world = new World();
|
||||||
|
|
||||||
// initialize urllist used by class loader
|
// initialize urllist used by class loader
|
||||||
updateUrlList();
|
updateUrlList();
|
||||||
|
|
||||||
@ -350,6 +353,7 @@ public class Globals {
|
|||||||
String json = prefs.get(PrefKeys.EXCHANGES, "{}");
|
String json = prefs.get(PrefKeys.EXCHANGES, "{}");
|
||||||
return new JSONObject(json);
|
return new JSONObject(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public final void putExchanges(JSONObject e) {
|
static public final void putExchanges(JSONObject e) {
|
||||||
prefs.put(PrefKeys.EXCHANGES, e.toString());
|
prefs.put(PrefKeys.EXCHANGES, e.toString());
|
||||||
}
|
}
|
||||||
@ -361,8 +365,6 @@ public class Globals {
|
|||||||
return traders;
|
return traders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static public final JSONObject getStrategies() {
|
static public final JSONObject getStrategies() {
|
||||||
String cfglist = Globals.prefs.get(PrefKeys.STRATEGIES, "{}");
|
String cfglist = Globals.prefs.get(PrefKeys.STRATEGIES, "{}");
|
||||||
JSONObject cfgs = new JSONObject(cfglist);
|
JSONObject cfgs = new JSONObject(cfglist);
|
||||||
@ -445,7 +447,6 @@ public class Globals {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void clearAll() {
|
public static void clearAll() {
|
||||||
putStrategies(new JSONObject());
|
putStrategies(new JSONObject());
|
||||||
putTraders(new JSONArray());
|
putTraders(new JSONArray());
|
||||||
@ -461,7 +462,6 @@ public class Globals {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static JSONObject getWorld() {
|
public static JSONObject getWorld() {
|
||||||
JSONObject cfg = new JSONObject();
|
JSONObject cfg = new JSONObject();
|
||||||
cfg.put(World.JKEYS.ASSETS, getAssets());
|
cfg.put(World.JKEYS.ASSETS, getAssets());
|
||||||
|
Loading…
Reference in New Issue
Block a user