[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.tmf] Re: How to prevent the generation of referenced ecore models?

I found the problem!

I added a full new fragment to the workflow:
  <fragment class="org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment"
      genModels="platform:/resource/com.myproject/model/mymodel.genmodel"/>
what I should have done is to only add an attribute to the
existing fragment
  <fragment class="org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment"/>

the documentation is not very helpful here (it should say add the
  genModels attribute to the fragment.

There is also no hint how to add multiple gemodels:
- is this a comma, semicolon or space separated list in the genModels attribute?
- should I use multiple fragments?

<flame>Have I ever mentioned that I hate XML based settings that have no
good editor ;-)</flame>


Michael

Hi Michael,

it works for me if I add these two changes (genModels & registerGeneratedEPackage) in my workflow file. (Additionally, I exported the project with classes and added it as a dependency for my Xtext plug-in project.)

ILyas


Michael Scharf schrieb:
Hi,

I added a referenced ecore model to my language adding
a genModel fragment to the workflow:

<fragment class="org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment"
genModels="platform:/resource/com.myproject/model/mymodel.genmodel"/>



and adding a registerGeneratedEPackage to the bean:
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" platformUri="${runtimeProject}/.."
registerGeneratedEPackage="com.myproject.MyPackageImpl"/>


What happens is that the workflow generates classes for my
imported model inside the xtext project.

How to prevent this?


Michael


--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/