From: lehtonen Date: Sun, 21 Dec 2014 08:07:27 +0000 (+0000) Subject: Applied r30717 to sysdyn trunk as well to prevent the system getting stuck in Sheet... X-Git-Tag: v1.29.0~132 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=d34575a2d709b3721a9fd99d46dbfe28fb3e96b5;p=simantics%2Fsysdyn.git Applied r30717 to sysdyn trunk as well to prevent the system getting stuck in Sheet Experiment activation. refs #5484 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@30719 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java index 93df521e..891983ba 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/manager/SysdynModel.java @@ -22,6 +22,8 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; import org.simantics.Simantics; import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; @@ -51,6 +53,7 @@ import org.simantics.simulation.project.ExperimentRuns; import org.simantics.simulation.project.IExperimentActivationListener; import org.simantics.simulation.project.IExperimentManager; import org.simantics.structural.stubs.StructuralResource2; +import org.simantics.sysdyn.Activator; import org.simantics.sysdyn.SysdynResource; import org.simantics.sysdyn.adapter.VariableValueSubscription; import org.simantics.sysdyn.representation.Configuration; @@ -451,6 +454,10 @@ public class SysdynModel implements IModel, IMappingListener, VariableSubscripti exp = new OldSysdynExperiment(experiment, modelResource); } } else { + if (listener != null) { + listener.onMessage(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Experiment type is not supported: " + NameUtils.getSafeName(g, experiment))); + listener.onFailure(new UnsupportedOperationException("Experiment type is not supported: " + NameUtils.getSafeName(g, experiment))); + } return null; }