DrMarkusVoss / pumla

pumla - systematic re-use of model elements described with PlantUML
GNU General Public License v3.0
102 stars 10 forks source link

Side-effect of PUMLARUAInternals deletes elements from PUMLAPutAllElements() when internals not shown #16

Closed DrMarkusVoss closed 3 years ago

DrMarkusVoss commented 3 years ago

Describe the bug The idea of the PUMLARUAInternals macro was that there is no more need to encapsulate the internals explicitly with the global variable to turn display of the internals on/off. But if in the internals other re-usable assets are shown, then turning it off prevents these elements to be shown at all on a diagram (depending on their sequence of placement), as in the finalize step the encapsulating "internals rectangle" box is removed and concluding also the inside elements are removed.

To Reproduce See the internals elements of the tempSys.puml example. In the "allElements.puml" diagram, without the encapsulation of the globals, you do not see e.g. elements "displayTemp" etc. on the diagram if the global variable to show internals is set too false.

Expected behavior I do not want to have extra " !if ($PUMVarShowBodyInternals)" around the internals, otherwise the PUMLARUAInternals is not a benefit, so expected behavior is that not showing internal elements of tempSys, which is e.g. displayTemp, that when using "PUMLAPutAllElements()" and at the same time "!$PUMVarShowBodyInternals = %false()", then it does not have the side-effect to not show displayTemp at all, only not on the inside. With the extra " !if ($PUMVarShowBodyInternals)" around the internals it works, but it is not nice.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add maybe extra logic into the finalize? Or rethink the finalize-principle? Or have another loop checking that really all elements are there with global variables per element?