1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
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
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.simulation.project;
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;
23 public interface IExperimentManager extends IProjectService {
26 * A hint key for storing an IExperimentManager in an {@link IHintContext}.
27 * This is intended to be used with an {@link IProject}.
29 Key KEY_EXPERIMENT_MANAGER = new KeyOf(IExperimentManager.class);
32 * The method calls immediately listener.activeExperimentLoaded
33 * if there already exists an active experiment.
35 void addListener(IExperimentManagerListener listener);
36 void removeListener(IExperimentManagerListener listener);
39 void startExperiment(Resource experiment, IExperimentActivationListener listener, boolean setActive);
40 IExperiment getActiveExperiment();
41 IExperiment getExperiment(String identifier);
42 IExperiment[] getExperiments();