Skip to content

ST6RI-781: Show multiplicities in nodes (PlantUML) #584

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 2 commits into from
Jul 23, 2024
Merged

Conversation

himi
Copy link
Member

@himi himi commented Jul 20, 2024

This PR supports rendering multiplicities in nodes. So far the visualizer renders multiplicities in edges only. I added three new styles:

  • NODEMULTIPLICITY
    Show multiplicities in nodes.
  • EDGEMULTIPLICITY
    Show multiplicities in edges.
  • IMPLICITMULTIPLICITY
    Show implicit multiplicities as well. That means even if you do not explicitly specify multiplicities, the visualizer renders default multiplicities.

If you do not specify any styles, view choose proper multiplicity rendering. For example, Tree view shows multiplicities in nodes by default.

himi added 2 commits June 22, 2024 14:37
  - Added new styles: nodeMultiplicity, edgeMultiplicity,
    implicitMultiplicity.
  - Show multiplicities in nodes if nodeMultiplicity is effective.
  - Show implicit multiplicities only if implicitMultiplicity is effective.
@himi
Copy link
Member Author

himi commented Jul 20, 2024

This is just an example with Tree view:

package Vehicle {
	part def Vehicle {
		part tire[*];
	}
	
	part car : Vehicle {
		part :>> tire [4];
	}
	part bicycle: Vehicle {
		part :>> tire[2];
	}
	part unicycle: Vehicle {
		part :>> tire[1];
	}
}

This is rendered as below:
image

@himi himi requested a review from seidewitz July 20, 2024 03:35
@seidewitz seidewitz self-assigned this Jul 23, 2024
@seidewitz seidewitz added this to the 2024-06 milestone Jul 23, 2024
Copy link
Member

@seidewitz seidewitz left a comment

Choose a reason for hiding this comment

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

I also confirmed that

	part unicycle: Vehicle {
		part :>> tire;
		part tire1;
	}

when visualized using IMPLICITMULTIPLICITY, shows the correct default multiplicity of [1] for tire1:
image

@seidewitz seidewitz merged commit 169f7b0 into master Jul 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants