Skip to content
This repository has been archived by the owner on Nov 16, 2024. It is now read-only.

Commit

Permalink
Show relationships with superclass at all times, even if superclass i…
Browse files Browse the repository at this point in the history
…s a Java util class.
  • Loading branch information
Gerald Boersma committed Apr 11, 2020
1 parent cab38a2 commit 2479740
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ private void addContextClass(ModelClass modelClass) {
// Put the class on the other side of the relationship on the diagram.
private void addRelationship(ModelRel rel) {
ModelClass otherClass = (rel.source() != _contextClass ? rel.source() : rel.destination());
if (!otherClass.fullName().startsWith("java.util.")) {
boolean isJavaUtilClass = otherClass.fullName().startsWith("java.util.");
// Don't show relationships with java.util (Collection) classes, unless it is as a superclass.
if (!isJavaUtilClass ||
(isJavaUtilClass && (rel.kind() == ModelRel.Kind.GENERALIZATION || rel.kind() == ModelRel.Kind.REALIZATION))) {
// Check to see if the class in the relationship is excluded from the diagram, either
// by the name of the class or the name of the package.
if (getOptions().isExcludedPackage(otherClass) || getOptions().isExcludedClass(otherClass)) {
Expand Down

0 comments on commit 2479740

Please sign in to comment.