INTO-CPS-Association / maestro

Maestro a Co-Simulation Orchestration Engine
20 stars 3 forks source link

Implement AddAfterOrTop #289

Closed FrederikPM closed 3 years ago

FrederikPM commented 3 years ago

public void addAfterOrTop(PStm item, PStm... commands){ int index = block.getBody().indexOf(item); int insertAt = index + 1; if (insertAt > block.getBody().size()) { add(commands); } else { addAll(insertAt, commands); } }

CThuleHansen commented 3 years ago

Fixed in https://github.com/INTO-CPS-Association/maestro/commit/954047f425e083e2c698f87cc31fe572d0ffa6c4