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;
}
Aggregations