// for(int i=cpDependencies.size()-1; i >= 0; i--) {
TaskDependency td = ((TaskDependency) cpDependencies
.get(i));
Task dependee = td.getDependee();
Task dependant = td.getDependant();
TaskDependencyConstraint constraint = td
.getConstraint();
for (int j = 0; j < allNodes.size(); j++) {
for (int k = 0; k < allNodes.size(); k++) {
if ((dependant
.equals((Task) (((DefaultMutableTreeNode) allNodes
.get(j)).getUserObject())))
&& (dependee
.equals((Task) (((DefaultMutableTreeNode) allNodes
.get(k))
.getUserObject())))) {
try {
TaskDependency newDependency = getTaskManager()
.getDependencyCollection()
.createDependency(
getTaskManager()
.getTask(
((Integer) mapOriginalIDCopyID
.get(new Integer(
dependant
.getTaskID())))
.intValue()),
getTaskManager()
.getTask(
((Integer) mapOriginalIDCopyID
.get(new Integer(
dependee
.getTaskID())))
.intValue()),
getTaskManager()
.createConstraint(
constraint
.getID()));
newDependency.setDifference(td
.getDifference());
newDependency.setHardness(td.getHardness());
} catch (TaskDependencyException e) {