]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/reporting/SCLReporting.java
Expose CommandSession in SCL
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src / org / simantics / scl / runtime / reporting / SCLReporting.java
index 97ef75f8b498e0d6a7382c7f84e626d0ceac8ee9..5266b13a21e61c7892a6efc39698abf60a18c4a8 100644 (file)
@@ -18,6 +18,11 @@ public class SCLReporting {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(SCLReporting.class);
 
+    public static SCLReportingHandler getCurrentReportingHandler() {
+        SCLReportingHandler handler = ((SCLReportingHandler)SCLContext.getCurrent().get(SCLReportingHandler.REPORTING_HANDLER));
+        return handler == null ? SCLReportingHandler.DEFAULT : handler;
+    }
+    
     public static void print(String text) {
         SCLReportingHandler handler = ((SCLReportingHandler)SCLContext.getCurrent().get(SCLReportingHandler.REPORTING_HANDLER));
         if(handler != null)