for (Figure succ : successors) {
if (succ.getPredecessors().size() == 1) {
if (succ.getProperties().selectSingle(r.getSecondMatcher()) != null && succ.getOutputSlots().size() == 1) {
OutputSlot oldSlot = null;
for (OutputSlot s : f.getOutputSlots()) {
for (Connection c : s.getConnections()) {
if (c.getInputSlot().getFigure() == succ) {
oldSlot = s;
}
}
}
assert oldSlot != null;
OutputSlot nextSlot = succ.getOutputSlots().get(0);
int pos = 0;
if (succ.getProperties().get("con") != null) {
pos = Integer.parseInt(succ.getProperties().get("con"));
}
OutputSlot slot = f.createOutputSlot(pos);
slot.setName(succ.getProperties().get("dump_spec"));
if (succ.getProperties().get("short_name") != null) {
slot.setShortName(succ.getProperties().get("short_name"));
} else {
String s = succ.getProperties().get("dump_spec");
if (s != null && s.length() <= 2) {
slot.setShortName(s);
} else {
String tmpName = succ.getProperties().get("name");
if (tmpName != null && tmpName.length() > 0) {
slot.setShortName(tmpName.substring(0, 1));
}
}
}
for (Connection c : nextSlot.getConnections()) {
Connection newConn = diagram.createConnection(c.getInputSlot(), slot);