How do I hide all classes having a given stereotype?

0 votes
asked Mar 3, 2016 in bug by anonymous

I would like to hide classes according to their stereotypes.

The documentation on hiding in the Class page says "You can also provide, just after the hide or show keyword:

  • <<foo1>> for classes which are stereotyped with foo1,

"

this example does not seem to work as of version 8036

@startuml
 
hide <<tag>> 
 
class bob <<tag>>{
}
 
class joe{
}
 
@enduml

 

Instead of hiding the class "bob", i get a third class box as if i did: class hide <<tag>>{}

2 Answers

0 votes
answered Mar 4, 2016 by plantuml (134,570 points)

There is a confusion : this command does not hide classes. It hides some information (members...) of a class.

Working example:

@startuml
hide <<tag>> members
class bob <<tag>> {
 some field
}
class joe {
 some field
}
@enduml

 

Anyway, we will think about provide a way to completely hide classes according to their stereotype... We'll post a message here.

commented Mar 4, 2016 by anonymous
Thanks for the clarification. I am currently using multiple !ifdef blocks to hide relationships and classes in large diagrams. The !ifdef instructions can get a bit complicated though. It helps to be able to control the scope of a dependency graph if I can organize it into layers and turn them on and off easily.
0 votes
answered Mar 4, 2016 by plantuml (134,570 points)
With last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can now have:

@startuml
hide <<tag>>  
class bob <<tag>>{
}
class joe{
}
@enduml
 

The result might not be exactly what you are expecting : the class is really "hidden" (there are some space when it should normally be printed).

Tell us what you think about it.

Thanks!
...