}
}
}
private Map<GraphicNode,List<GraphicNode>> extractAssignments(List list){
Map<GraphicNode,List<GraphicNode>> map=new HashMap<GraphicNode, List<GraphicNode>>();
GraphicNode current,last;
Stack<GraphicNode> path=new Stack<GraphicNode>();
for (ListIterator i=list.listIterator();i.hasNext();){
current=(GraphicNode)i.next();
if (current.getLevel()==1){
path.clear();
path.push(current);
continue;
}
while ((last=path.peek()).getLevel()>=current.getLevel()) path.pop();
if (current.isAssignment()){
GraphicNode task=path.peek();
List<GraphicNode> ass=map.get(task);
if (ass==null){
ass=new LinkedList<GraphicNode>();
map.put(task, ass);
}