plugin to fix the "bug" in issue #786

This commit is contained in:
2015-10-22 09:00:27 +02:00
parent 77292daf2f
commit f10303b4ab
11 changed files with 1750 additions and 14 deletions
@@ -348,6 +348,25 @@ public class ActionList extends ArrayList<Action> {
return -1;
}
public GraphSourceItemContainer getContainer(int idx) {
Action action = get(idx);
int i = idx - 1;
while (i >= 0) {
Action a = get(i);
if (a instanceof GraphSourceItemContainer) {
List<Action> lastActions = getContainerLastActions(a);
Action lastAction = lastActions.get(lastActions.size() - 1);
if (lastAction.getAddress() >= action.getAddress()) {
return (GraphSourceItemContainer) a;
}
}
i--;
}
return null;
}
public int getContainerEndIndex(int idx) {
Action action = get(idx);
int i = idx - 1;