]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Support for separate operating and edit modes (& some bug fixes)
authorjplaine <jplaine@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 7 Sep 2010 13:18:39 +0000 (13:18 +0000)
committerjplaine <jplaine@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 7 Sep 2010 13:18:39 +0000 (13:18 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@17806 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/HistoryVariable.java

index 427b19393deadc4525b32e87827cec7131f517b5..32afe1fc05d9fb54385e9337e53442213f8a11c1 100644 (file)
@@ -1,5 +1,7 @@
 package org.simantics.sysdyn.ui.project;\r
 \r
+import java.util.ArrayList;\r
+\r
 import org.simantics.databoard.Accessors;\r
 import org.simantics.databoard.Bindings;\r
 import org.simantics.databoard.accessor.Accessor;\r
@@ -65,8 +67,7 @@ public class HistoryVariable extends ResourceVariable {
                        System.out.println("HistoryVariable rvi='" + tmp + "'");\r
                        final String rvi = tmp.substring(1).replace("/", ".");\r
                        SysdynDataSet ds = sr.getDataSet(rvi);\r
-                       if(ds == null) return null;\r
-//                     assert(ds != null);\r
+                       if(ds == null) ds = new SysdynDataSet("", "", new ArrayList<Double>(), new ArrayList<Double>()); // We need a dataset, so if not set, create it\r
                        try {\r
                                final RecordAccessor ac = (RecordAccessor)Accessors.getAccessor(Bindings.getBindingUnchecked(SysdynDataSet.class), ds);\r
                                \r
@@ -86,8 +87,6 @@ public class HistoryVariable extends ResourceVariable {
                                                        // TODO Auto-generated catch block\r
                                                        e.printStackTrace();\r
                                                }\r
-//                                             System.out.println("===================================================== NEW RESULT =====================================================");\r
-                                               \r
                                        }});\r
                                return (T)ac;\r
                        } catch (RuntimeBindingConstructionException e) {\r