How to get ecore and genmodel? [message #1059936] |
Wed, 22 May 2013 08:39 |
chris yo Messages: 146 Registered: February 2013 |
Senior Member |
|
|
I have 1 project, that contains 2 different xtext files (MyDsl.xtext and Form.xtext).
For MyDsl.xtext, I can generate xtext artifacts with no problem.
But for Form.xtext, the option is not available there. "Run configuration" is shown instead.
I was able to use the rules in Form.xtext without problem. But when I run the MWE2 workflow, I get errors:
805 [main] INFO ipse.xtext.generator.LanguageConfig - generating infrastructure for org.xtext.example.mydsl.MyDsl with fragments : ImplicitRuntimeFragment, ImplicitUiFragment, GrammarAccessFragment, EcoreGeneratorFragment, SerializerFragment, ResourceFactoryFragment, XtextAntlrGeneratorFragment, JavaValidatorFragment, ImportNamespacesScopingFragment, QualifiedNamesFragment, BuilderIntegrationFragment, GeneratorFragment, FormatterFragment, LabelProviderFragment, OutlineTreeProviderFragment, QuickOutlineFragment, QuickfixProviderFragment, JavaBasedContentAssistFragment, XtextAntlrUiGeneratorFragment, Junit4Fragment, RefactorElementNameFragment, TypesGeneratorFragment, XbaseGeneratorFragment, CodetemplatesGeneratorFragment, CompareFragment
java.lang.RuntimeException: Could not find a GenModel for EPackage 'http://www.xtext.org/example/mydsl/Form'
If the missing GenModel has been generated via EcoreGeneratorFragment make sure to run it first in the workflow.
If you have a *.genmodel-file, make sure to register it via StandaloneSetup.registerGenModelFile(String)
In order for MyDsl.xtext to be able to refer to rules in Form.xtext, I would need to add it in my workflow. But I don't have the .genmodel and .ecore file for Form.xtext.
How can I get the ecore and genmodel files of Form.xtext?
|
|
|
Re: How to get ecore and genmodel? [message #1059982 is a reply to message #1059936] |
Wed, 22 May 2013 12:47 |
|
Hi,
I had also this problem. I can tell what I did, maybe it's not the best practice, but for me works.
So I put my both languages in one xtext file and at the top I can choose which language I'll use. (then the emf model will combine the two "languages")
Or I think you can create two different projects.
Hope It helped a little.
Edwin W.T.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03398 seconds