]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.event/scl/Simantics/Event.scl
Merge "Fix column width issues on HiDPI displays. KeyTiSelection fixes."
[simantics/platform.git] / bundles / org.simantics.event / scl / Simantics / Event.scl
index 0ec2123adb4c7b967823a2e8858f29731ca4030e..6839c964c33d0a74c760ba3d675942e0d3c7727b 100644 (file)
@@ -1,23 +1,44 @@
-import "Simantics/DB"\r
-import "Simantics/Ontologies"\r
-\r
-importJava "org.simantics.event.view.EventView" where\r
-    getEventLogs :: () -> <ReadGraph> [Resource]\r
-\r
-findEvents :: <ReadGraph, Proc> [Resource]\r
-findEvents = do\r
-    logs = getEventLogs ()\r
-    slices = map findEventSlices logs\r
-    slices = join slices\r
-    events = map findEventsFromSlice slices\r
-    join events\r
-\r
-@private\r
-findEventSlices :: Resource -> <ReadGraph, Proc> [Resource]\r
-findEventSlices log = do\r
-    collectionToList $ objects_ log L0.ConsistsOf\r
-\r
-@private\r
-findEventsFromSlice :: Resource -> <ReadGraph, Proc> [Resource]\r
-findEventsFromSlice slice = do\r
-    collectionToList (objects_ slice L0.ConsistsOf)
\ No newline at end of file
+import "Simantics/DB"
+import "Simantics/Ontologies"
+
+importJava "org.simantics.event.view.EventView" where
+    getEventLogs :: () -> <ReadGraph> [Resource]
+
+findEvents :: <ReadGraph, Proc> [Resource]
+findEvents = do
+    logs = getEventLogs ()
+    slices = map findEventSlices logs
+    slices = join slices
+    events = map findEventsFromSlice slices
+    join events
+
+@private
+findEventSlices :: Resource -> <ReadGraph, Proc> [Resource]
+findEventSlices log = do
+    collectionToList $ objects_ log L0.ConsistsOf
+
+@private
+findEventsFromSlice :: Resource -> <ReadGraph, Proc> [Resource]
+findEventsFromSlice slice = do
+    collectionToList (objects_ slice L0.ConsistsOf)
+
+importJava "org.simantics.event.util.EventExporter" where
+    """
+        exportCurrentEvents "\t" "X:/events.txt"
+    
+    exports the currently visible events into the specified
+    text file using the specified column separator string.
+    This function should be used when invoking outside of
+    a database transaction.
+    """
+    exportCurrentEvents :: String -> String -> ()
+
+    """
+        exportCurrentEventsG "\t" "X:/events.txt"
+    
+    exports the currently visible events into the specified
+    text file using the specified column separator string.
+    This variant must be used when invoking the method with
+    DB transaction.
+    """
+    exportCurrentEventsG :: String -> String -> <ReadGraph> ()