textX
textX copied to clipboard
Add import usage in entity example
Please exercise scoping in entity example. I would love to see how one can import entity files one from another. IMO, it is something almost everybody designing a DSL will want to have.
Definitely agree on this. :) Would be nice to have a complete example/tutorial with imports and scoping. It would make multi-(meta)-model and scoping features more visible to the users.
Maybe this unittest could be migrated to the examples folder? test_multi_metamodel_types_data_flow1
In
https://github.com/igordejanovic/textX/blob/master/tests/functional/test_metamodel/test_multi_metamodel_refs.py
Am Mi., 14. Nov. 2018, 10:38 hat Igor Dejanović [email protected] geschrieben:
Definitely agree on this. :) Would be nice to have a complete example/tutorial with imports and scoping. It would make multi-(meta)-model and scoping features more visible to the users.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/igordejanovic/textX/issues/102#issuecomment-438598762, or mute the thread https://github.com/notifications/unsubscribe-auth/AQGtWjasXgvheydKkplXUAPUlMmqWzEvks5uu-SbgaJpZM4YdKE0 .
@goto40 I'm sorry, I am new to textX and it is quite understandable and "just works", but scope providers feel like "black magic" and it is not very clear from the test code how they work and what to expect. A simple example of how to implement scoping/import mechanism would be great :)
Maybe this unittest could be migrated to the examples folder? test_multi_metamodel_types_data_flow1
Probably we should start with multi-model and scoping tutorial. I agree that entity example would be a good fit at it should be familiar to beginners and shows a small but complete example with code generation. I would like to take on this one but probably won't be able in a next month or so.
After that we could make a more complex tutorial/example with a multi-meta-model support. There are many nice tests that could serve as a basis for this (e.g. flow, components ...).