How to get ecore and genmodel? [message #1059936] |
Wed, 22 May 2013 04:39  |
Eclipse User |
|
|
|
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 #1062611 is a reply to message #1060161] |
Sun, 09 June 2013 23:15  |
Eclipse User |
|
|
|
Thank you for the reply Alexander. I tried to follow what you did on your project. I added a new language entry in the component Generator.
But I am getting a java runtime error:
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)
So, in the StandaloneSetup, I added these 2 lines:
registerGeneratedEPackage = "org.xtext.example.mydsl.form.FormPackage"
registerGenModelFile = "classpath:/org/xtext/example/mydsl/Form.genmodel"
But, still I am getting a runtime error from mwe2launcher.
I placed the Form.xtext in the same directory location with MyDsl.xtext, so there should not be a problem. What else do I need to add in the workflow?
|
|
|
Powered by
FUDForum. Page generated in 0.04445 seconds