JanKoehnlein / FXDiagram

JavaFX diagram
Apache License 2.0
74 stars 21 forks source link

Mapping difficulties #63

Open lilyflower1 opened 5 years ago

lilyflower1 commented 5 years ago

Hi,

It is not very clear to me on how to use the Mapping API. As an example of how looks like my Xtext DSL-Based datamodel: Module : importSection+=Import* elements+=Definition*; Import : ´import´ ImportedQualifiedName; fragment ImportedQualifiedName : importedNamespace=[Definition | QualifiedName]; Definition : TypedefDefinition | StructDefinition; My idea was that from a node Mapping like for Definition, I would be able to nodeForEach for TypeDefDefinition and StructDefinition. So it seems that I don´t understand the spirit of the mapping API. Could you give me an example of a mapping for this small example ? It would really help a lot to understand

lilyflower1 commented 5 years ago

Ok well sounds like you have a lot of things to do and you don't maintain anymore this project. I have just a small question about connectionMapping. I am sure you can answer my question in just one sentence or two and it would help me a lot with my project. In your examples, you use outconnectionFor() from a NodeMapping to create an edge between two nodes. My case is that I would like to create an edge from a DiagramMapping and create the two nodes in the ConnectionMapping because I can not use your example with my DSL. I am sure you know very well how to do so since you create it and it would really help me a lot since I am trying to demonstrate to my fellow students that your work is added value.

I am waiting for your help Have a nice day