Merge pull request #18 from tischda/master

check if source and dest are not already linked
This commit is contained in:
Diomidis Spinellis 2014-03-06 09:23:44 +02:00
commit c1d994d650
2 changed files with 8 additions and 4 deletions

View File

@ -661,7 +661,7 @@ class ClassGraph {
w.println("\t// " + fromName + " " + rt.toString() + " " + toName);
w.println("\t" + relationNode(from, fromName) + " -> " + relationNode(to, toName) + " [" +
"taillabel=\"" + tailLabel + "\", " +
"label=\"" + guillemize(opt, label) + "\", " +
((label == null || label.isEmpty()) ? "label=\" \"" : "label=\"" + guillemize(opt, label) + "\", ") +
"headlabel=\"" + headLabel + "\", " +
"fontname=\"" + opt.edgeFontName + "\", " +
"fontcolor=\"" + opt.edgeFontColor + "\", " +
@ -841,8 +841,12 @@ class ClassGraph {
if (hidden(fri.cd))
continue;
String destAdornment = fri.multiple ? "*" : "";
relation(opt, opt.inferRelationshipType, c, fri.cd, "", "", destAdornment);
// if source and dest are not already linked, add a dependency
RelationPattern rp = getClassInfo(c.toString()).getRelation(fri.cd.toString());
if (rp == null) {
String destAdornment = fri.multiple ? "*" : "";
relation(opt, opt.inferRelationshipType, c, fri.cd, "", "", destAdornment);
}
}
}

View File

@ -1,4 +1,4 @@
/* Automatically generated file */
package org.umlgraph.doclet;
class Version { public static String VERSION = "R5_6_6-1-g9240c4";}
class Version { public static String VERSION = "R5_6_6-8-g8d7759";}