]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.simulation/src/org/simantics/simulation/project/IExperimentManager.java
Added new ExperimentRuns.createRun utility
[simantics/platform.git] / bundles / org.simantics.simulation / src / org / simantics / simulation / project / IExperimentManager.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.simulation.project;
13
14 import org.simantics.db.Resource;
15 import org.simantics.project.IProject;
16 import org.simantics.project.IProjectService;
17 import org.simantics.simulation.experiment.IExperiment;
18 import org.simantics.utils.datastructures.hints.IHintContext;
19 import org.simantics.utils.datastructures.hints.IHintContext.Key;
20 import org.simantics.utils.datastructures.hints.IHintContext.KeyOf;
21
22
23 public interface IExperimentManager extends IProjectService {
24
25     /**
26      * A hint key for storing an IExperimentManager in an {@link IHintContext}.
27      * This is intended to be used with an {@link IProject}.
28      */
29     Key KEY_EXPERIMENT_MANAGER = new KeyOf(IExperimentManager.class);
30
31     /**
32      * The method calls immediately listener.activeExperimentLoaded
33      * if there already exists an active experiment.
34      */
35     void addListener(IExperimentManagerListener listener);
36     void removeListener(IExperimentManagerListener listener);
37
38     /** async */
39     void startExperiment(Resource experiment, IExperimentActivationListener listener, boolean setActive);
40     IExperiment getActiveExperiment();
41     IExperiment getExperiment(String identifier);
42         IExperiment[] getExperiments();
43
44 }