private void updateDependantCommands(NodeVisualModel parentVisualModel) { if (dependantCommands != null) { for (Iterator iter = dependantCommands.getCommands().iterator(); iter.hasNext(); ) { RetargetParentPasteCommand command = (RetargetParentPasteCommand) iter.next(); command.setParent(parentVisualModel); } } }
private CompoundCommand clone(CompoundCommand commands) { CompoundCommand ret = new CompoundCommand(); if (dependantCommands != null) { for (Iterator iter = commands.getCommands().iterator(); iter.hasNext(); ) { RetargetParentPasteCommand command = (RetargetParentPasteCommand) iter.next(); ret.add(command.clone()); } } return ret; }