I would like to parse a file within an MWE2 workflow, e.g. by giving the org.eclipse.emf.mwe.utils.Reader
component a file written in my DSL rather than the XMI representation of it.
Asked
Active
Viewed 1,122 times
0

Mathias Soeken
- 1,293
- 2
- 8
- 22
2 Answers
2
Alternatively have a look at org.eclipse.xtext.mwe.UriBasedReader

Christian Dietrich
- 11,778
- 4
- 24
- 32
1
I have found the solution at http://www.eclipse.org/forums/index.php/m/831365/
Workflow {
component = org.eclipse.xtext.mwe.Reader {
register = org.xtext.example.mydsl.MyDslStandaloneSetup {}
path = "modeldir"
loadResource = {
slot = "models"
}
}
}
Adjusted to the answer of Christian when using a single file it can be written
Workflow {
component = org.eclipse.xtext.mwe.UriBasedReader {
register = org.xtext.example.mydsl.MyDslStandaloneSetup {}
uri = "model.file"
loadResource = {
slot = "model"
}
}
}

Mathias Soeken
- 1,293
- 2
- 8
- 22