List edges = node.getSourceConnections();
Iterator<EdgeModel> iter = edges.iterator();
while (iter.hasNext())
{
EdgeModel edge = iter.next();
if (edge.isHighlight())
{
highlightedEdges.add(edge);
edge.setHighlight(false);
}
}
}
cmd.execute();
}
// restore node highlights
for (int i = 0; i < getCommands().size(); i++)
{
Command cmd = (Command) getCommands().get(i);
if (cmd instanceof OrphanChildCommand)
{
node = ((OrphanChildCommand) cmd).getChild();
if (node != null && highlight)
{
node.setHighlight(true);
}
}
}
// restore edge highlights
for (int i = 0; i < highlightedEdges.size(); i++)
{
EdgeModel edge = highlightedEdges.get(i);
edge.setHighlight(true);
}
}