public ErlangSuspendContext(@NotNull Project project, @NotNull OtpErlangPid activePid,
@NotNull List<ErlangProcessSnapshot> snapshots) {
myExecutionStacks = new XExecutionStack[snapshots.size()];
int activeStackIdx = 0;
for (int i = 0; i < snapshots.size(); i++) {
ErlangProcessSnapshot snapshot = snapshots.get(i);
if (snapshot.getPid().equals(activePid)) {
activeStackIdx = i;
}
myExecutionStacks[i] = new ErlangExecutionStack(project, snapshot);
}
myActiveStackIdx = activeStackIdx;