-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CallBehaviorAction #2495
Add CallBehaviorAction #2495
Conversation
This is an awesome contribution, thanks @marek-piirikivi! This could be a follow-up PR, but do you think there should be a way to go to the selected Behavior from the CallBehavior? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
The Invocation Actions diagram also looks really nice.
gaphor/UML/actions/action.py
Outdated
def name(self): | ||
"""Name conforms to UML2.5.1 16.3.4.1 naming description""" | ||
if self.subject.behavior and not self.subject.name: | ||
return self.subject.behavior.name | ||
return self.subject.name or "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to improve it even more is to move this code to a format
function in gaphor/UML/umlfmt.py
. Then the activity name will also be used as fallback in the model browser.
Just noticed this feature is not mentioned in the documentation 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can keep is as is for now.
@amolenaar I tried to be as authentic to the UML2.5.1 document and capture everything that seemed relevant. I noticed that Action itself already defines relationship to the InputPin and OutputPin; and so does CallAction+InvocationAction. So, the references are now in uml.py duplicated. 🤔 I am not sure how to address this; or what to do in this instance. Seems as if it is just redefinition of the same thing to use different names for the same thing - in CallAction context, all input pins should be called arguments. What do you think? |
Yes. I think so. It would be a good follow-up. |
I have no clear strategy for those. As long as a relation is not actively used by the application I nowadays tend to leave it out. The UML meta model is not always consistent. Often a value subsets a value that is not a derived unions; something that our Gaphor model cannot deal with and will ignore. |
d23c3df
to
185a849
Compare
Let's call it a day and merge this. A really well executed PR. Thanks @marek-piirikivi! 🍻 |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #2464
What is the new behavior?
Does this PR introduce a breaking change?
Other information