Can't generate text from ...
Hi,
I've seen http://www.jetbrains.net/devnet/message/5229516 and tried to follow these instructions.
The screen for generator properties looks a bit different today in MPS 1.1 like so:
plus of course the dependency on the gtext generator:
still I always get this error message in the MPS Output window.
What am I still doing wrong?
As in the other article I generate to jetbrains.mps.xml, have a XML schema defined and am trying to create a jetbrains.mps.xmlInternal file from it.
Thanks for any help, Peter
Attachment(s):
mps_gen_props.tiff
mps_gen_props2.tiff
Please sign in to leave a comment.
Peter,
Try adding a priority rule in generator properties (your generator should be executed before the generator for xmlInternal).
Generally speaking, such an error occurs when MPS gets a concept which cannot be reduced straight into text (after all generation steps). In most cases this means you haven't defined a generator for this concept OR this generator was executed too late.
Btw, we have an action (right click on non-generateble model -> "Show Mappings Partitioning") that shows the sequence in which generators for this model will be executed. You can look at its output and add all missing priority rules.
Good luck,
Mihail
Is there some useful documentation about this other than the user guide?
I try adding all sorts of involved languages and generators in all sorts of model and generator properties but I have no clue what I'm doing
and the output of the mappings partitioning even confuses me more.
I have my language (midasRequest) that I want to get XML from (xmlInternal). But I have this schema defined, so probably I need the xmlSchema language and there is somehow the xml and the gtext language involved but what does that mean, which ones do I need, what is the order of the generators, what can MPS determine by itself and what have I to specify via dependencies?
I also added in the dependency screen, as you suggested deps on xmlInternal, and as this did not work, to gtext, xml, xmlSchema but the output below did not change a yota.
Furthermore, my language does not even appear there, neither does the schema or xml gtext, why?
--------------------- mappings partitioning -----------------------------------
[ 1 ]
jetbrains.mps.lang.generator.generator.baseLanguage.template.main.TLB_main
[ 2 ]
jetbrains.mps.xml.generator.baseLanguage.template.rewrite.mc_xml_rewrite
midasRequest.generator.template.main.service_xml
[ 3 ]
jetbrains.mps.xml.generator.baseLanguage.template.main.mc_xml
jetbrains.mps.xmlInternal.generator.baseLanguage.template.main.mc_xmlInternal
[ 4 ]
jetbrains.mps.baseLanguage.collections.generator.baseLanguage.template.main.*
jetbrains.mps.gtext.generator.baseLanguage.template.main.mc_rewrite
[ 5 ]
jetbrains.mps.baseLanguage.closures.generator.baseLanguage.template.main.main
jetbrains.mps.baseLanguage.generator.java.closures.MAPPING_closures
jetbrains.mps.baseLanguage.generator.java.main.mc_baseLanguage
jetbrains.mps.baseLanguage.generator.java.strings.string
jetbrains.mps.baseLanguage.generator.java.tuples.tuples
jetbrains.mps.baseLanguageInternal.generator.template.main.main
jetbrains.mps.gtext.generator.baseLanguage.template.main.mc_convertToBL
jetbrains.mps.lang.smodel.generator.baseLanguage.template.main.*
---------------------------------------------------------------------------------
Peter
I used optimize imports on all the models and it was throwing out all sorts of extra imports, so it does not seem to be really missing something, in the contrary.
When I looked at the above mapping partitioning, it looks more like a problem with the mappings. So I found that there was a mapping from my Concept to the xmlInternal model missing. when I added this, it worked, I get XML output! Yeah!
Attachment(s):
service_xml.tiff
mappings.tiff