Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Older way to show generics in a class

0 votes

I had some diagrams that were showing generics in a class with "<type>" (which is how you'd draw them on a whiteboard). Now, that way is being replaced by a more modern way. This is nice, but I'd like to display it the older way. 

@startuml
skinparam style strictuml
hide empty members
class "coursGroupe:\nArrayList<CoursGroupe>" as g 
@enduml

How can I display this in the older way, e.g., UserDao<User> below: 

asked Jul 19 in Wanted features by Fuhrmanator (2,170 points)
I found a work-around with replacing one of the < or > with its unicode:

class "coursGroupe:\nArrayList<CoursGroupe&#62;" as g

1 Answer

0 votes

We've added a "genericDisplay" parameter.
So with last beta, you can have:

https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0

@startuml
skinparam style strictuml
skinparam genericDisplay old
hide empty members
class "coursGroupe:\nArrayList<CoursGroupe>" as g
@enduml


The parameter name is not perfect : any suggestion welcomed!
 

answered Jul 24 by plantuml (125,210 points)
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...