From d951bf461fefd2130bcf6cc44af834f32d866c9f Mon Sep 17 00:00:00 2001 From: kalajainen Date: Mon, 26 Jul 2010 16:06:28 +0000 Subject: [PATCH] git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@16831 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../simantics/sysdyn/manager/SysdynResult.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynResult.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynResult.java index a58e08a5..bc38975e 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynResult.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynResult.java @@ -23,6 +23,8 @@ import org.simantics.databoard.binding.Binding; import org.simantics.databoard.binding.error.BindingConstructionException; import org.simantics.databoard.binding.error.BindingException; import org.simantics.databoard.binding.java.StringBindingDefault; +import org.simantics.databoard.binding.mutable.MutableVariant; +import org.simantics.databoard.binding.mutable.MutableVariantBinding; import org.simantics.databoard.binding.mutable.Variant; import org.simantics.databoard.binding.mutable.VariantContainerBinding; import org.simantics.databoard.serialization.SerializationException; @@ -73,7 +75,7 @@ public class SysdynResult { recordingSession = new RecordingSession(); recordingSession.recordings = new TreeMap(); - Variant timeVariableId = new Variant(); + MutableVariant timeVariableId = new MutableVariant(); timeVariableId.setValue(stringBinding, "timeVariableId"); recordingSession.timeVariableId = timeVariableId; @@ -99,8 +101,8 @@ public class SysdynResult { rec.segments.add(seg); - Variant tmpVariant = new Variant(); - Variant tmpVariant2 = new Variant(); + MutableVariant tmpVariant = new MutableVariant(); + MutableVariant tmpVariant2 = new MutableVariant(); tmpVariant.setValue(recordBinding, rec); tmpVariant2.setValue(stringBinding, name); recordingSession.recordings.put(tmpVariant2, tmpVariant); @@ -196,19 +198,19 @@ public class SysdynResult { return null; } Binding stringBinding = StringBindingDefault.INSTANCE; - Variant tmpVariant = new Variant(); + MutableVariant tmpVariant = new MutableVariant(); tmpVariant.setValue(stringBinding, variable); - Variant tmpVariant2 = new Variant(); + MutableVariant tmpVariant2 = new MutableVariant(); tmpVariant2.setValue(stringBinding, "time"); Recording rec; Recording time; try { - if(!ma.containsKey(VariantContainerBinding.INSTANCE, tmpVariant)) return null; - VariantAccessor va = ma.getValueAccessor( VariantContainerBinding.INSTANCE, tmpVariant); + if(!ma.containsKey(MutableVariantBinding.INSTANCE, tmpVariant)) return null; + VariantAccessor va = ma.getValueAccessor( MutableVariantBinding.INSTANCE, tmpVariant); Accessor valueAccessor = va.getValueAccessor(); rec = (Recording)valueAccessor.getValue( Bindings.getBinding(Recording.class)); - va = ma.getValueAccessor( VariantContainerBinding.INSTANCE, tmpVariant2); + va = ma.getValueAccessor( MutableVariantBinding.INSTANCE, tmpVariant2); valueAccessor = va.getValueAccessor(); time = (Recording)valueAccessor.getValue( Bindings.getBinding(Recording.class)); if( rec == null || time == null) return null; -- 2.47.1