How to display nested tree like structure in a class body

0 votes
asked May 21, 2015 in To be sorted by evrenesat (150 points)

Hello, 

I want to display a tree like structure in a class. But to be able to display the whitespaces (for nesting), I have to place a character beforehand. Currently I'm using "backtick" because it's the smallest character I can imagine.

Is there any escape character or flag exists for this purpose? Or is there any way to  decrase the tab (\t) size? 

http://www.plantuml.com:80/plantuml/png/Iyv9B2vMSClFh-RIqd9ABDBmpKz9pT7KqkAgYLSeACel0D50cVnSX4o20bJE2CXKW76CkHGG71C5AmqkNLskMW00

 

Thanks,

1 Answer

0 votes
answered May 22, 2015 by plantuml (184,620 points)
selected May 22, 2015 by evrenesat
 
Best answer

Hi,

We really like your idea. Unfortunatly, there is no other option today.

However, we've built a beta version that does not remove extra heading spaces.

https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

With this beta, you can simply have:

@startuml
class Foo{
**Bar(Model)**
|_ prop
|_ **Bom(Model)**
  |_ prop2
  |_ prop3
    |_ prop3.1
|_ prop4 :(
--
}
@enduml
 
And we will add this new syntax in the creole parser, so that |_ could be renderer as a real tree.
 
Thanks for the suggestion : we will post a message here when this will be ready.
 
commented May 23, 2015 by evrenesat (150 points)
edited May 23, 2015 by evrenesat
Thank you, it's much appreciated.
commented May 25, 2015 by plantuml (184,620 points)
This has not been very tested, but should be working with last beta:
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar
Is this what you were expecting ?
Regards,
...