From: jplaine Date: Tue, 7 Sep 2010 13:18:39 +0000 (+0000) Subject: Support for separate operating and edit modes (& some bug fixes) X-Git-Tag: simantics-1.2.0~57 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=fbdb96d8978dcdc495555488a01949283e3e2887;p=simantics%2Fsysdyn.git Support for separate operating and edit modes (& some bug fixes) git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@17806 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/HistoryVariable.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/HistoryVariable.java index 427b1939..32afe1fc 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/HistoryVariable.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/HistoryVariable.java @@ -1,5 +1,7 @@ package org.simantics.sysdyn.ui.project; +import java.util.ArrayList; + import org.simantics.databoard.Accessors; import org.simantics.databoard.Bindings; import org.simantics.databoard.accessor.Accessor; @@ -65,8 +67,7 @@ public class HistoryVariable extends ResourceVariable { System.out.println("HistoryVariable rvi='" + tmp + "'"); final String rvi = tmp.substring(1).replace("/", "."); SysdynDataSet ds = sr.getDataSet(rvi); - if(ds == null) return null; -// assert(ds != null); + if(ds == null) ds = new SysdynDataSet("", "", new ArrayList(), new ArrayList()); // We need a dataset, so if not set, create it try { final RecordAccessor ac = (RecordAccessor)Accessors.getAccessor(Bindings.getBindingUnchecked(SysdynDataSet.class), ds); @@ -86,8 +87,6 @@ public class HistoryVariable extends ResourceVariable { // TODO Auto-generated catch block e.printStackTrace(); } -// System.out.println("===================================================== NEW RESULT ====================================================="); - }}); return (T)ac; } catch (RuntimeBindingConstructionException e) {