Closed BitFis closed 3 years ago
Was able to get it running through pure jinja2:
template.uml
{% block objects %}
/' Objects '/
{% set ns = namespace(name=false) %}
{% for object in objects recursive %}
{% if 'Namespace' in object.__class__.__name__ %}
{% set ns.name = object._name %}
{{- loop(object) }}
{% else %}
/' {{ ns.name }}::{{ object._name }} '/
!startsub {{ ns.name | replace("::", "_") }}_{{ object._name }}
{{ object.render() }}
!endsub
{% endif %}
Given a class with namespace Com::Example::Server::Session
and class Server
,
will remove any namespaces and add startsub as Com_Example_Server_Session_Server
, which enables
to include it in other plantuml diagrams as:
!includesub ../puml/knxiot_handshake_responder.hpp.puml!Com_Example_Server_Session_Server
Hey guys
Plantuml has the feature of including subparts, is it somehow possible to create a template which uses that feature?
I tryed to override the objects block, but that seemed to have not worked. any suggestions?
Thanks a lot
Cheers
ref: