Skip to content
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

Use TypedElement.type for Lifeline and other types #3136

Merged
merged 4 commits into from
Mar 24, 2024
Merged

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Feb 24, 2024

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

Lifeline should show name of represented type (ConnectableElement)

Issue Number: Fixes #2514

What is the new behavior?

Show represented name and type.

In addition I changed all cases where TypedElement.typeValue is used to also check for TypedElement.type.name. In all cases type takes precedence over typeValue, since type is actually linked to a model element and typeValue is something specifically added for Gaphor.

Also fixed messages: when attached to "life lines" without an actual lifeline, they act as a communication diagram.
In this case, lines so not need to be horizontal.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

It would be nice if the Property Editor also shows settings for elements selected in the Model Browser. E.g. now it's not possible to change the attribute type easily.

type.name takes precedence over typeValue.

This now works for lifeline, but also classes and properties.
@github-actions github-actions bot added the python Pull requests that update Python code label Feb 24, 2024
@amolenaar amolenaar changed the title Lifeline type Use TypedElement.type for Lifeline and other types Feb 24, 2024
Message should not be horizontal in that cases.
gaphor/UML/umlfmt.py Outdated Show resolved Hide resolved
@danyeaw danyeaw added fix A fix for a bug and removed python Pull requests that update Python code labels Mar 24, 2024
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These updates look really nice, thanks @amolenaar!

@danyeaw danyeaw merged commit a37716e into main Mar 24, 2024
19 checks passed
@danyeaw danyeaw deleted the lifeline-type branch March 24, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lifeline and message traceability to Block/Actor/Property
2 participants