|
@@ -1,5 +1,5 @@
|
|
|
/**
|
|
/**
|
|
|
- * Copyright (c) 2011 committers of YAKINDU and others.
|
|
|
|
|
|
|
+ * Copyright (c) 2011-2013 committers of YAKINDU and others.
|
|
|
* All rights reserved. This program and the accompanying materials
|
|
* All rights reserved. This program and the accompanying materials
|
|
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
|
* which accompanies this distribution, and is available at
|
|
* which accompanies this distribution, and is available at
|
|
@@ -15,8 +15,9 @@ import org.eclipse.debug.core.ILaunch;
|
|
|
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
|
|
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
|
|
|
import org.yakindu.sct.model.sgraph.Statechart;
|
|
import org.yakindu.sct.model.sgraph.Statechart;
|
|
|
import org.yakindu.sct.simulation.core.engine.ISimulationEngine;
|
|
import org.yakindu.sct.simulation.core.engine.ISimulationEngine;
|
|
|
|
|
+import org.yakindu.sct.simulation.core.extensions.SCLanguageProviderExtensions;
|
|
|
|
|
+import org.yakindu.sct.simulation.core.language.SCLanguageProviders;
|
|
|
import org.yakindu.sct.simulation.core.launch.AbstractSCTLaunchConfigurationDelegate;
|
|
import org.yakindu.sct.simulation.core.launch.AbstractSCTLaunchConfigurationDelegate;
|
|
|
-import org.yakindu.sct.simulation.core.sexec.SimulationModule;
|
|
|
|
|
import org.yakindu.sct.simulation.core.sexec.container.ISimulationEngineFactory;
|
|
import org.yakindu.sct.simulation.core.sexec.container.ISimulationEngineFactory;
|
|
|
|
|
|
|
|
import com.google.inject.Binder;
|
|
import com.google.inject.Binder;
|
|
@@ -28,6 +29,7 @@ import com.google.inject.util.Modules;
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
* @author andreas muelder - Initial contribution and API
|
|
* @author andreas muelder - Initial contribution and API
|
|
|
|
|
+ * @author terfloth - added dynamic module configuration based on statechart language type and language providers
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
public class SexecLaunchConfigurationDelegate extends AbstractSCTLaunchConfigurationDelegate implements
|
|
public class SexecLaunchConfigurationDelegate extends AbstractSCTLaunchConfigurationDelegate implements
|
|
@@ -38,7 +40,11 @@ public class SexecLaunchConfigurationDelegate extends AbstractSCTLaunchConfigura
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
protected ISimulationEngine createExecutionContainer(final ILaunch launch, Statechart statechart) {
|
|
protected ISimulationEngine createExecutionContainer(final ILaunch launch, Statechart statechart) {
|
|
|
- Module module = Modules.override(new SimulationModule()).with(new Module() {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ SCLanguageProviders providers = SCLanguageProviderExtensions.getLanguageProviders();
|
|
|
|
|
+ Module simulationModule = providers.getSimulationModuleFor(statechart);
|
|
|
|
|
+
|
|
|
|
|
+ Module module = Modules.override(simulationModule).with(new Module() {
|
|
|
@Override
|
|
@Override
|
|
|
public void configure(Binder binder) {
|
|
public void configure(Binder binder) {
|
|
|
binder.bind(ILaunch.class).toInstance(launch);
|
|
binder.bind(ILaunch.class).toInstance(launch);
|