New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly fill the title of a component #12
Comments
when #13 gets merged, the diagram posted above should be parsed to: {
"nodes": [
{
"name": "diag",
"diagrams": [
{
"elements": [
{
"name": "SwfComponentBase",
"members": []
},
{
"name": "RoadBoundaryFusion"
}
]
}
],
"id": "diag",
"type": "File",
"hidden": true
},
{
"name": "SwfComponentBase",
"members": [],
"id": "SwfComponentBase",
"type": "Interface",
"hidden": true
},
{
"name": "RoadBoundaryFusion",
"id": "RoadBoundaryFusion",
"type": "Component",
"title": "RoadBoundaryFusion",
"hidden": true
}
],
"edges": [
{
"from": "diag",
"to": "SwfComponentBase",
"name": "contains",
"hidden": true
},
{
"from": "RoadBoundaryFusion",
"to": "diag",
"name": "contains",
"hidden": true
},
{
"from": "diag",
"to": "RoadBoundaryFusion",
"name": "contains",
"hidden": true
}
]
} would this help you? |
Thank you for the fast reaction. The output above is still not what I need because there is information lost. So I would expect:
This is my interpretation but I think it makes sense. There is no dedicated id for the component, so the anme could be used because it has to be somehow unique among the diagram. The alias after |
I understand, this is a bit of a bigger change because I currently just ignore the id. But this makes perfect sense. I will change that. Probably tomorrow though.. |
This would be really helpful. I also tried to create a peg grammar for plantUML but yours is better so I will further test it with our diagrams. Unfortunately plantUML has no real language specification and is not strict in checking the syntax. This makes it really hard. |
Yeah, I was struggling with this as well. I had to painfully reverse-engineer by looking at the existing implementation (the source code is a pain to read though). Plantuml not having a proper language specification is the one big reason why I started this project. Your contribution is always welcome. Thank you. |
So currently, the
then we would not need this additional |
I am not 100% convinced about the solution proposed in my last comment. Because an |
I also see these 2 options. However, in plantUML is no concept of a globally unique id. I think it is not needed, just has to be unique for the diagram where it appears. However, if you for some reason need it to be globally unique in your code you can also use something like https://github.com/ai/nanoid . For me both solutions are fine. You could stick to the easier solution if there are no immediate complaints. |
I've decided to implement the following for now:
changes from my previous design:
|
That's quite a change :). I will test i when it is released. Or is there a way for me to test it before? |
it's not that much. It's just most of the fixtures changing because of the new title attribute. If you want to have a look at the code just look at the files in the
should be enough. |
I am not using the cli, but the library. I will have a look at the modified tests, should be enough. |
the diagram:
results in the formatted graph:
ID, title and name of a component are identical but. But the title should be the string after
as
.For example:
component _COMP8 as RoadBoundaryFusion
should result in
The text was updated successfully, but these errors were encountered: