Skip to content

Move Element class to UML model #3571

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

Merged
merged 14 commits into from
Nov 24, 2024
Merged

Move Element class to UML model #3571

merged 14 commits into from
Nov 24, 2024

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Nov 17, 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?

Element was part of the Core model. This made it sort of a prerequisite for any other modeling language, including SysML2.

Issue Number: #3540

What is the new behavior?

The Element class and its relations have been moved to the UML model. Now the core model contains only some core concepts: Diagrams, change sets.

To make it work, Diagram is inherited in the UML model and enriched with Element as a base class. That way it can be placed nicely in the model browser and keeps the ability to be stereotyped.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

  • Many of the changes have to do with that Presentation.subject points to Base, instead of Element.
  • In a lot of places we have to use UML.Diagram, instead of Core.Diagram.
  • name and qualified name are still part of Element (not NamedElement). This is something I want to solve in a future PR.
  • A few architecture rules are xfailed, this is also future work.

@amolenaar amolenaar marked this pull request as draft November 17, 2024 13:09
@github-actions github-actions bot added the python Pull requests that update Python code label Nov 17, 2024
@amolenaar amolenaar changed the base branch from main to tree-model-dispatch November 17, 2024 13:14
Base automatically changed from tree-model-dispatch to image November 18, 2024 00:54
Base automatically changed from image to main November 18, 2024 01:36
Fixed import issues.

Except for architecture and model generation tests.
@amolenaar amolenaar force-pushed the element-to-uml branch 2 times, most recently from 7a2ae78 to 4a5b97c Compare November 20, 2024 15:58
Make stereotype extraction a bit more lenient, so it also
works with the core diagram.
Fixed diagram reference for drop dispatch function.
@amolenaar amolenaar requested a review from danyeaw November 20, 2024 17:01
@amolenaar amolenaar marked this pull request as ready for review November 20, 2024 22:28
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 changes look great, thanks @amolenaar!

@danyeaw danyeaw added feature A new feature and removed python Pull requests that update Python code documentation labels Nov 24, 2024
@danyeaw danyeaw merged commit ca7f65f into main Nov 24, 2024
22 checks passed
@danyeaw danyeaw deleted the element-to-uml branch November 24, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants