Skip to content

Commit a11b968

Browse files
committed
* VDefault (addShorthandRelation): If the target of the relation does
not exist in the rendering result, we render a distinct node (cumbersome notation).
1 parent d232884 commit a11b968

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

org.omg.sysml.plantuml/src/org/omg/sysml/plantuml/VDefault.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ private boolean addShorthandRelation(Usage u, String title) {
338338
if (u.getDeclaredShortName() != null) return false;
339339
ReferenceSubsetting rs = u.getOwnedReferenceSubsetting();
340340
if (rs == null) return false;
341+
Feature tgt = rs.getReferencedFeature();
342+
if (!checkId(tgt)) return false; // If the target does not exist, we render a distinct node.
341343

342344
if (!isEmpty(u)) return false;
343345

@@ -347,7 +349,7 @@ private boolean addShorthandRelation(Usage u, String title) {
347349
if (!(owner instanceof Type)) return false;
348350
if (!checkId(owner)) return false;
349351

350-
addPRelation(owner, rs.getReferencedFeature(), u, title);
352+
addPRelation(owner, tgt, u, title);
351353

352354
return true;
353355
}

0 commit comments

Comments
 (0)