--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.simulation.project;\r
+\r
+import org.simantics.db.Resource;\r
+import org.simantics.project.IProject;\r
+import org.simantics.project.IProjectService;\r
+import org.simantics.simulation.experiment.IExperiment;\r
+import org.simantics.utils.datastructures.hints.IHintContext;\r
+import org.simantics.utils.datastructures.hints.IHintContext.Key;\r
+import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;\r
+\r
+\r
+public interface IExperimentManager extends IProjectService {\r
+\r
+ /**\r
+ * A hint key for storing an IExperimentManager in an {@link IHintContext}.\r
+ * This is intended to be used with an {@link IProject}.\r
+ */\r
+ Key KEY_EXPERIMENT_MANAGER = new KeyOf(IExperimentManager.class);\r
+\r
+ /**\r
+ * The method calls immediately listener.activeExperimentLoaded\r
+ * if there already exists an active experiment.\r
+ */\r
+ void addListener(IExperimentManagerListener listener);\r
+ void removeListener(IExperimentManagerListener listener);\r
+\r
+ /** async */\r
+ void startExperiment(Resource experiment, IExperimentActivationListener listener, boolean setActive);\r
+ IExperiment getActiveExperiment();\r
+ IExperiment getExperiment(String identifier);\r
+ IExperiment[] getExperiments();\r
+\r
+}\r