textX icon indicating copy to clipboard operation
textX copied to clipboard

Add import usage in entity example

Open dkrikun opened this issue 7 years ago • 4 comments
trafficstars

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.

dkrikun avatar Nov 14 '18 07:11 dkrikun

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.

igordejanovic avatar Nov 14 '18 09:11 igordejanovic

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 avatar Nov 14 '18 10:11 goto40

@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 :)

dkrikun avatar Nov 14 '18 12:11 dkrikun

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 ...).

igordejanovic avatar Nov 14 '18 13:11 igordejanovic