Search code examples
javaeclipsedslxtextxtend

Defining a dsl (Domain Specific Language) using XText in Eclipse


I need your help concerning xtext programmation !
I have a diagramme (sysml model "xmi file") I want to use its elements (name of elements actions ...) to build a new editor using xtext.
I'm a beginner I wonder how to start and how to import the xmi file to explore it contents.


Solution

  • you can reference non xtext (but ecore based) models if you provide a resourceserviceprovider for them.

    • i dont know if the eclipse sysml tooling you use is ecore based - you have to digg into the plugins or tell how to get them - it would be helpful using a file extension != xmi
    • if it is provide a resourceserviceprovider for that language (alternatively you can load the model in the global scope provider as well)
    • use the ecore based metamodel to define cross references in your dsl

    i have described that for uml some years ago here https://christiandietrich.wordpress.com/2011/07/17/xtext-2-0-and-uml/