package style does behave inconsistent

0 votes
asked Mar 10 in Question / help by jlo2k (160 points)
edited Mar 12 by jlo2k

Hello,

maybe due to uncomplete documentation i may just misunderstand but i witnessed the following around packages:

skinparam package Rectangle seem to work in simpler setups.

But i followed some hints that you could change the skinparam and the packages would then use the style set at definition time. It seems that is not the case. I found the last packageStyle skinparam defines all packages styles in the diagram definition.

Code i found somewhere that result in two folder style packages:

@startuml
' Setting PackageStyle
skinparam PackageStyle rectangle

' Define a package using the rect style
package "Rect Style Package" {
    class MyClass {
        -attribute : int
        +method() : void
    }
}

' Change PackageStyle for subsequent packages
skinparam PackageStyle folder

' Define another package using the folder style
package "Folder Style Package" {
    class AnotherClass {
        -attribute : string
        +method() : void
    }
}
@enduml

So if you want different package styles in your diagram, the only way would be to use a package stereotype and a specific skinparam section for that stereotype.
I found this does not work at all:

@startuml
'this style is applied to all packages
skinparam packageStyle rectangle

package "Design" <<Design Domain>> {
   class "My Class"
}

skinparam package<<Design Domain>> {
   BorderThickness 5     'works
   BorderColor #679cae   'works
   Style rectangle
   'This Style is ignored if the first one is commented out, but color and thickness are applied
}

@enduml

Can someone help me to figure out what the current implementation should provide and if that is according to the requirements or should i open a bug?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...