]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.charts/scl/Simantics/Chart.scl
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.charts / scl / Simantics / Chart.scl
index 9f1c02c9861ef4c2b4900b89015cd409f359853a..efbe3143f27103a0b810e7044ac04e0d2d763855 100644 (file)
@@ -1,56 +1,56 @@
-import "Simantics/DB"\r
-import "Simantics/Variables"\r
-import "Simantics/Model"\r
-import "Simantics/Entity"\r
-import "Simantics/Subscription"\r
-\r
-import "http://www.simantics.org/Charts-1.2" as CHART\r
-\r
-type Chart = Resource\r
-type ChartGroup = Resource\r
-type ChartItem = Resource\r
-\r
-importJava "org.simantics.charts.ui.SCLChart" where\r
-    @JavaName createNewChart\r
-    """\r
-    Creates a new Chart to the default Charts folder under the given Model parameter. Returns the created Chart.\r
-    """\r
-    createChart :: Model -> <Proc> Chart\r
-\r
-    @JavaName createNewChart\r
-    """\r
-    Creates a new Chart under the given ChartGroup parameter. Returns the created Chart.\r
-    """\r
-    createChartInGroup :: ChartGroup -> <Proc> Chart\r
-\r
-    @JavaName createNewChartGroup\r
-    """\r
-    Creates a new ChartGroup under the given Model parameter. Returns the created ChartGroup.\r
-    """\r
-    createChartGroup :: Model -> <Proc> ChartGroup\r
-\r
-    @JavaName addChartItems\r
-    """\r
-    Creates new chartItem with the given Variable to the given Chart and returns the created ChartItem. New Subscription item is created at the same time.\r
-    """\r
-    addChartItems :: Chart -> Variable -> <WriteGraph> ChartItem \r
-\r
-    @JavaName linkSubToChart\r
-    """\r
-    Links the given Subscription to the given chart and returns the created ChartItem.\r
-    """\r
-    linkSubToChart :: Subscription -> Chart -> <WriteGraph> ChartItem\r
-\r
-"""\r
-Browses the given Model for its Charts and then returns them in a list.\r
-"""\r
-chartsOf :: Model -> <ReadGraph> [Chart]\r
-chartsOf model = recurse (toResource model)\r
-  where\r
-    recurse r = do\r
-        cs = resourceChildrenOf r \r
-        charts = map fromResource $ filter isChart cs\r
-        chartGrp = filter isChartGroup cs\r
-        charts + concatMap recurse chartGrp\r
-    isChart r = isInstanceOf r CHART.TimeSeriesChart\r
-    isChartGroup r = isInstanceOf r CHART.ChartGroup\r
+import "Simantics/DB"
+import "Simantics/Variables"
+import "Simantics/Model"
+import "Simantics/Entity"
+import "Simantics/Subscription"
+
+import "http://www.simantics.org/Charts-1.2" as CHART
+
+type Chart = Resource
+type ChartGroup = Resource
+type ChartItem = Resource
+
+importJava "org.simantics.charts.ui.SCLChart" where
+    @JavaName createNewChart
+    """
+    Creates a new Chart to the default Charts folder under the given Model parameter. Returns the created Chart.
+    """
+    createChart :: Model -> <Proc> Chart
+
+    @JavaName createNewChart
+    """
+    Creates a new Chart under the given ChartGroup parameter. Returns the created Chart.
+    """
+    createChartInGroup :: ChartGroup -> <Proc> Chart
+
+    @JavaName createNewChartGroup
+    """
+    Creates a new ChartGroup under the given Model parameter. Returns the created ChartGroup.
+    """
+    createChartGroup :: Model -> <Proc> ChartGroup
+
+    @JavaName addChartItems
+    """
+    Creates new chartItem with the given Variable to the given Chart and returns the created ChartItem. New Subscription item is created at the same time.
+    """
+    addChartItems :: Chart -> Variable -> <WriteGraph> ChartItem 
+
+    @JavaName linkSubToChart
+    """
+    Links the given Subscription to the given chart and returns the created ChartItem.
+    """
+    linkSubToChart :: Subscription -> Chart -> <WriteGraph> ChartItem
+
+"""
+Browses the given Model for its Charts and then returns them in a list.
+"""
+chartsOf :: Model -> <ReadGraph> [Chart]
+chartsOf model = recurse (toResource model)
+  where
+    recurse r = do
+        cs = resourceChildrenOf r 
+        charts = map fromResource $ filter isChart cs
+        chartGrp = filter isChartGroup cs
+        charts + concatMap recurse chartGrp
+    isChart r = isInstanceOf r CHART.TimeSeriesChart
+    isChartGroup r = isInstanceOf r CHART.ChartGroup