Search in sources :

Example 1 with LustreProgramProvider

use of edu.uah.rsesc.aadlsimulator.agree.LustreProgramProvider in project AGREE by loonwerks.

the class SaveLustreHandler method execute.

public Object execute(ExecutionEvent event) throws ExecutionException {
    final SimulationUIService simulationUIService = Objects.requireNonNull((SimulationUIService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(SimulationUIService.class), "Unable to retrieve simulation UI service");
    final SimulationEngineState engineState = simulationUIService.getCurrentState().getEngineState();
    if (engineState instanceof LustreProgramProvider) {
        LustreProgramSaver.handleSave((LustreProgramProvider) engineState);
    }
    return null;
}
Also used : SimulationUIService(edu.uah.rsesc.aadlsimulator.ui.services.SimulationUIService) SimulationEngineState(edu.uah.rsesc.aadlsimulator.SimulationEngineState) LustreProgramProvider(edu.uah.rsesc.aadlsimulator.agree.LustreProgramProvider)

Aggregations

SimulationEngineState (edu.uah.rsesc.aadlsimulator.SimulationEngineState)1 LustreProgramProvider (edu.uah.rsesc.aadlsimulator.agree.LustreProgramProvider)1 SimulationUIService (edu.uah.rsesc.aadlsimulator.ui.services.SimulationUIService)1