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