diff --git a/numass-main/src/main/java/inr/numass/Numass.java b/numass-main/src/main/java/inr/numass/Numass.java index a63e7ffd..ff460201 100644 --- a/numass-main/src/main/java/inr/numass/Numass.java +++ b/numass-main/src/main/java/inr/numass/Numass.java @@ -31,9 +31,11 @@ import hep.dataforge.meta.Meta; public class Numass { public static Context buildContext(Context parent, Meta meta) { - Context numassContext = Global.getContext("numass").withParent(parent).withProperties(meta); - numassContext.pluginManager().load("inr.numass:numass"); - return numassContext; + return Context.builder("NUMASS") + .parent(parent) + .properties(meta) + .plugin(NumassPlugin.class) + .build(); } public static Context buildContext() { diff --git a/numass-main/src/main/java/inr/numass/NumassPlugin.java b/numass-main/src/main/java/inr/numass/NumassPlugin.java index 3074efbe..bd25685d 100644 --- a/numass-main/src/main/java/inr/numass/NumassPlugin.java +++ b/numass-main/src/main/java/inr/numass/NumassPlugin.java @@ -72,7 +72,7 @@ public class NumassPlugin extends BasicPlugin { public void attach(Context context) { // StorageManager.buildFrom(context); super.attach(context); - context.setIO(new NumassIO()); + context.pluginManager().load(new NumassIO()); FitManager fm = context.getFeature(FitManager.class); loadModels(fm.getModelManager()); loadMath(MathPlugin.buildFrom(context));