+
+ public static void runWithGraph(Object graph, Runnable r) {
+ final SCLContext context = SCLContext.getCurrent();
+ SCLContext.push(context);
+ Object oldGraph = context.put(GRAPH, graph);
+ try {
+ r.run();
+ } finally {
+ context.put(GRAPH, oldGraph);
+ SCLContext.pop();
+ }
+ }