// and SET2's "show in relational attribute" is on,
// then the A node would have a line that says "F: B (SET1, SET2)->C, D->E"
//
Map<GraphNode,String> map = new LinkedHashMap<GraphNode,String>();
for (AlloyTuple tuple: instance.relation2tuples(rel)) {
GraphNode start=atom2node.get(tuple.getStart());
if (start==null) continue; // null means the node won't be shown, so we can't show any attributes
String attr="";
List<AlloyAtom> atoms=tuple.getAtoms();
for (int i=1; i<atoms.size(); i++) {
if (i>1) attr+="->";
attr+=atomname(atoms.get(i),true);
}
if (attr.length()==0) continue;
String oldattr=map.get(start);
if (oldattr!=null && oldattr.length()>0) attr=oldattr+", "+attr;
if (attr.length()>0) map.put(start,attr);
}
for (Map.Entry<GraphNode,String> e: map.entrySet()) {
GraphNode node = e.getKey();
Set<String> list = attribs.get(node);
if (list==null) attribs.put(node, list=new TreeSet<String>());
String attr = e.getValue();
if (view.label.get(rel).length()>0) attr = view.label.get(rel) + ": " + attr;
list.add(attr);