Skip to main content



      Home
Home » Modeling » TMF (Xtext) » *.genmodel file location
*.genmodel file location [message #1697572] Fri, 05 June 2015 02:12 Go to next message
Eclipse UserFriend
After migrating to the latest Eclipse, I noticed that the *.genmodel file is generated in model/generated directory. Previously, it was located in src-gen/org. I want to keep it in the same directory as before.
Is there a way to set where the genmodel file should be generated?

I tried to modify my mwe2 file with this:
fragment = ecore.EMFGeneratorFragment {
genModel = "platform:/resource/xtext/src-gen/org/myDsl.genmodel"
}


But I keep getting this error:
java.lang.NullPointerException
	at org.eclipse.xtext.generator.ecore.EMFGeneratorFragment.getParameters(EMFGeneratorFragment.java:712)
	at org.eclipse.xtext.generator.ecore.EMFGeneratorFragment.addToPluginXmlRt(EMFGeneratorFragment.java:725)
	at org.eclipse.xtext.generator.DefaultGeneratorFragment.addToPluginXmlRt(DefaultGeneratorFragment.java:30)
	at org.eclipse.xtext.generator.CompositeGeneratorFragment.addToPluginXmlRt(CompositeGeneratorFragment.java:74)
	at org.eclipse.xtext.generator.Generator.generatePluginXmlRt(Generator.java:465)
	at org.eclipse.xtext.generator.Generator.invokeInternal(Generator.java:180)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
	at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
	at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:102)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:78)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
Re: *.genmodel file location [message #1697578 is a reply to message #1697572] Fri, 05 June 2015 02:41 Go to previous messageGo to next message
Eclipse UserFriend
fragment = ecore.EMFGeneratorFragment auto-inject {
    xmiModelDirectory ="src-gen/org/..."
}
Re: *.genmodel file location [message #1697579 is a reply to message #1697578] Fri, 05 June 2015 03:04 Go to previous messageGo to next message
Eclipse UserFriend
THANK YOU! Very Happy
Re: *.genmodel file location [message #1697581 is a reply to message #1697579] Fri, 05 June 2015 03:10 Go to previous messageGo to next message
Eclipse UserFriend
Chris,

Note that the genmodel location is registered in the generated
plugin.xml and if that location in a src folder, that folder will not be
available at runtime at that location, so it's bad to put it in a src
folder or bad to have that registration in the plugin.xml. If it's not
specified in the plugin.xml, no one will be able to use your model in
their models, though you probably don't care about that.


On 05/06/2015 9:04 AM, chris yo wrote:
> THANK YOU! :d
Re: *.genmodel file location [message #1697745 is a reply to message #1697581] Mon, 08 June 2015 01:52 Go to previous message
Eclipse UserFriend
Hi,

I have modified the location of genModel in plugin.xml, and I point it to where I am generating the .genmodel file.
In my plugin.xml, I make sure that the Build -> Binary Build do not have any reference to the Model directory.
But, after executing "Generate Xtext Artifacts", I always get a warning in build.properties.
The warning is "The folder "model/" does not exist in the workspace." For some reason, after I generate the xtext artifacts, "model" is always part of bin.includes even if it is not selected in Binary Build.

How do I keep Eclipse from generating the "model/" directory as part of bin.includes?
Previous Topic:Outline Tree
Next Topic:.class file have SourceDebugExtension
Goto Forum:
  


Current Time: Wed Jul 16 07:20:54 EDT 2025

Powered by FUDForum. Page generated in 0.69341 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top