@Override\r
public void onExperimentActivated(final IExperiment experiment) {\r
// MessageService.defaultLog(new org.eclipse.core.runtime.Status(IStatus.INFO, "org.simantics.simulation.ui", 0, "Activated experiment " + experiment.getIdentifier() , null));\r
+ run.set(experiment);\r
activated.release();\r
- run.set(experiment);\r
}\r
@Override\r
public void onFailure(Throwable e) {\r
}, true);\r
try {\r
activated.acquire();\r
+ //System.err.println("foobar");\r
+ //System.err.println(manager.getExperiment(run.get().getIdentifier()));\r
Throwable t = problem.get();\r
if (t != null) {\r
if (t instanceof ExperimentLoadingFailed) {\r
}\r
\r
\r
- public static String activateExperiment(Resource experiment) throws DatabaseException {\r
+ public static String activateExperiment(Resource experiment) {\r
\r
// Resource experiment = Layer0Utils.getPossibleChild(graph, model, name);\r
// if( experiment == null) return false;\r
\r
}\r
\r
- public static void run(String experimentId) throws DatabaseException {\r
+ public static void run(String experimentId) {\r
\r
final IProject project = Simantics.getProject();\r
if (project == null) return;\r
\r
}\r
\r
- public static List<Tuple2> getResult(String experimentId, String variableName) {\r
+ public static List<Tuple2> experimentResult(String experimentId, String variableName) {\r
\r
final IProject project = Simantics.getProject();\r
if (project == null) return null;\r
\r
SysdynDataSet dataset = ((SysdynExperiment)experiment).getCurrentResult().getDataSet(variableName);\r
\r
+ if (dataset == null) {\r
+ return null;\r
+ }\r
+ \r
List<Tuple2> results = new ArrayList<Tuple2>();\r
\r
for (int i = 0; i < dataset.times.length; i++) {\r