First of all, thanks for the great tool which makes life easier.
Below is an example of a desired diagram. But what is needed, is the ability to get same diagram without specifying parent namespace name - omit the part in red color.
@startuml
left to right direction
class SameName
namespace WidgetB {
class SameName
namespace WidgetC {
class SameName
}
SameName -- WidgetB.WidgetC.SameName
namespace WidgetD {
class SameName
}
SameName -- WidgetB.WidgetD.SameName
}
SameName -- WidgetB.SameName
@enduml
http://www.plantuml.com/plantuml/png/SoWkIImgAStDuUBAIKqhKIZ9LoZAJCyeKKZ9B4fDBidCp-FYIiv9B2vM24xCJVK3OYwkF21PN92OdAeGdfcIdbhYf53DfG04QEh0OkXgdQ5gCTM3XMj195n8GLSNPeKULBiUYdAiLhXGPeKBmefQBYviwX0-T4ZDIm667G00
Why I'm asking about exactly such feature, is because in my actual situation each 'widget' is a standalone diagram described in a separate file (there are more than one element in each and they can be pretty complex).
At a moment of writing a 'widget' diagram it is not known into which other diagrams it will be included in future (parent namespace is not known), please see the list of diagram files below for the full use case example.
When rendering file 'WidgetA' I'd like to have the same result as on the example diagram above, but due to the need to specify also a parent namespace name when linking elements, it does not work so. Following happens instead:
http://www.plantuml.com/plantuml/png/SoWkIImgAStDuSf9JIjHACbNACfCpoXHICaiIaqkoSpFu-9ApaaiBbO8JinDzGDYBguy85bSa9YSgX2UcPAUMkAaKCsb00Hewi1Yw6gTeMenrOE5Qq4aN4X1LnUcJGz56LQZNSWpsWLXT2qN5wQy4qBU8JKl1HXI0000
(As I understand it, the preprocessor turns the diagrams below into the diagram above.)
WidgetA
@startuml
!include common_stuff
class SameName
$add_existing_widget(WidgetB)
SameName -- WidgetB.SameName
@enduml
WidgetB
@startuml
!include common_stuff
class SameName
$add_existing_widget(WidgetC)
SameName -- WidgetC.SameName
$add_existing_widget(WidgetD)
SameName -- WidgetD.SameName
@enduml
WidgetC
@startuml
class SameName
@enduml
WidgetD
@startuml
class SameName
@enduml
common_stuff
@startuml
left to right direction
!unquoted procedure $add_existing_widget($file_name)
namespace $file_name {
!include $file_name
}
!endprocedure
@enduml
(SameName is used everywhere just to emphasize that same names may appear in different diagrams and that's why I'd need the namespaces in the first place.)