At the very beginning (5 years ago?), PlantUML was very restrictive : it was not possible to mix class/usecase/component into the same diagram.
After a while, some users complains about this, and we have started to slightly change this behaviour.
Nowdays, there are two kind of diagrams (appart from sequence, activity, state...):
- class diagrams.
- usecase/component/actor diagrams.
This means that you can mix usecases/components/actors in the same diagram.
But you cannot have classes (this is basically due to the fact that some features, like association classes, are specific to class diagrams).
Some users still complain, so, for class diagrams, we have added a new keyword "allow_mixing" to denotate that some class diagrams can have actor or usecase.
So this is working:
@startuml
allow_mixing
class cl1 {
}
actor comp1
usecase comp2
@enduml
This does not include component yet.
So this is not working:
@startuml
allow_mixing
class cl1 {
}
actor comp1
usecase comp2
component comp3
@enduml
If you wish, we can add component there. Would it be helpfull?
Our final wish is that some days, this "allow_mixing" keyword will not be needed any more, but up to now, it's the best solution we have.
Regards,