How to create a new DSL that can reference objects defined in a different dsl [message #900576] |
Tue, 07 August 2012 15:38 |
|
I am confused on how to set up two different dsl languages I have created with xtext so that in my eclipse workspace my second dsl can import files of the first dsl type and reference objects in that file. Here is an example:
I have a .people DSL that defines Person Objects, in my project for example I have friends.people and then I have another DSL that defines groups of people. In this DSL I want to be able to create a Group entity that can reference existing person objects in existing .people files in the workspace a lot like a ecore model referencing another ecore. Does anyone know if there are examples for this?
Would I have to import the .people grammer in my .groups grammer and then how do I go about setting up my .groups editor to say something like import /friends.people and then once imported in my editor when I create a group I can see the people as drop down options defined in the friends.people file I imported.
I looked around and can't seemn to find a good example on this, any help would be appreciated as I'm trying to figure out how to decouple my xtext models into seperate DSL's.
Another real world example is what I'm actually working on which is a file that defines stock signals and indicators and in my second dsl I want to reference those signals defined in other files as part of my trading strategies.
Thanks for any help. - Duncan
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04048 seconds