This is partially solved in last beta.
http://beta.plantuml.net/plantuml.jar
All those bugs are caused by a bad design decision made 10 years ago :-(
Maybe it's time for us to move forward.
So here is our new proposal:
Merge the notion of package/namespace in PlantUML so that package/namespace will be synonymous and behave as in all regular programming languages.
If we take the actual result of example 0:
@startuml
'Example 0
namespace net {
class foo1
}
namespace net.entities {
class foo2
}
namespace net.entities.sub {
class foo3
}
@enduml
Which image would you prefer ?
Image A
http://www.plantuml.com/plantuml/png/KtUjICmjo4bLCE3AIynDBIv8J4vLo4ijKQZcKb18paaiBbP8oyytvAhbGfNNIyqhoIp9J2r6LMY4Mw5USMaIgc9Zhbe0
Image B
http://www.plantuml.com/plantuml/png/SoWkIImgAStDuL9thKZCBSX9LJ3WAaXCpavCJrN8IorHgEPIK4ZEIImkLaZBppVaGfRJIyqhoIp9J2r6LMG4v00HDeLwnQL9OCL8oes1t5ekC57BvP2Qbm9q3000
Following this proposal, example 1, example 2 and example 3 will print the same result as example 0 (but you have to choose between Image A or Image B)
@startuml
'Example 1
package net {
class foo1
}
package net.entities {
class foo2
}
package net.entities.sub {
class foo3
}
@enduml
or
@startuml
'Example 2
package net {
class foo1
package entities {
class foo2
package sub {
class foo3
}
}
}
@enduml
or
@startuml
'Example 3
class net.foo1
class net.entities.foo2
class net.entities.sub.foo3
@enduml
Do you agree with our proposal ?
Which image (A or B) are your expecting ?
We probably are going to put a doodle in place for users about it, because it slightly changes the bebaviour of PlantUML.
But we think this is a good change :-)