How does extension determine a class has a binding relationship to a parent.

8 views
Skip to first unread message

Carl Cavanagh

unread,
Jul 28, 2022, 11:44:25 PMJul 28
to StarUML
Hi, 

I'm working on a StarUML extension, and I'm struggling to determine how to extract a binding relationship from the model, and subsequently the template parameter substitutions associated with that bind.

I thought it would be similar to the generalization case:

    var generalizations = app.repository.getRelationshipsOf(elem, function (rel) {
      return ((rel instanceof type.UMLGeneralization) && rel.source === elem)
    })
    return generalizations.map(function (gen) { return gen.target })

... but having a type.UMLBinding or something, however it looks like the types don't have anything like that.  Can someone guide me in the right direction?

Thanks for your time,
   Carl C.

StarUML

unread,
Jul 29, 2022, 10:35:15 PMJul 29
to StarUML
Hello,

Please try with "type.UMLTemplateBinding".

Thanks,
StarUML Team

2022년 7월 29일 금요일 오후 12시 44분 25초 UTC+9에 carlc...@gmail.com님이 작성:

Carl Cavanagh

unread,
Aug 1, 2022, 1:54:44 AMAug 1
to StarUML
Great that worked thanks!

Carl C.

Reply all
Reply to author
Forward
0 new messages