TaskLinkReference st=(TaskLinkReference)dependency.getSuccessor();
HasDependencies predecessor=(Task)implMap.get(pt);
HasDependencies successor=(Task)implMap.get(st);
if (predecessor==null) predecessor=new TaskLinkReferenceImpl(pt.getUniqueId(),pt.getProject());
if (successor==null) successor=new TaskLinkReferenceImpl(st.getUniqueId(),st.getProject());
Dependency d=Dependency.getInstance(predecessor, successor, dependency.getDependencyType(), dependency.getLag());
d.setDirty(true);
predecessor.getDependencyList(false).add(d);
successor.getDependencyList(true).add(d);
predecessors.remove(d);
}
for (Dependency dependency : predecessors) {
TaskLinkReference pt=(TaskLinkReference)dependency.getPredecessor();
TaskLinkReference st=(TaskLinkReference)dependency.getSuccessor();
TaskLinkReference predecessor=(TaskLinkReference)implMap.get(pt);
TaskLinkReference successor=(TaskLinkReference)implMap.get(st);
if (predecessor==null) predecessor=new TaskLinkReferenceImpl(pt.getUniqueId(),pt.getProject());
if (successor==null) successor=new TaskLinkReferenceImpl(st.getUniqueId(),st.getProject());
Dependency d=Dependency.getInstance(predecessor, successor, dependency.getDependencyType(), dependency.getLag());
d.setDirty(true);
predecessor.getDependencyList(false).add(d);
successor.getDependencyList(true).add(d);
//successors.remove(d);