Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext project from existing ecore model
Xtext project from existing ecore model [message #695709] Tue, 12 July 2011 11:37 Go to next message
Jeppe Cramon is currently offline Jeppe CramonFriend
Messages: 37
Registered: July 2009
Member
Hi

NB: Using Eclipse Indigo, with the Indigo release Xtext plugin and the project running with Xtext 2 experimental features enabled...

Created a new Xtext project from a fairly simple ecore model (with a newly created generator model) and upon running the MWE2 file it complains that it can't find the interface (that it's supposed to be generating as I understand it).

Caused by: org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface types.TypesPackage
	at org.eclipse.emf.mwe.utils.StandaloneSetup.addRegisterGeneratedEPackage(StandaloneSetup.java:267)
	... 35 more


Note: in the example below I moved my model file into the xtext project, but I've also tried creating a project from scratch which references the ecore model from the project where it originates, with the same runtime exception.

module dk.example.poc.types.TypesDsl

import org.eclipse.emf.mwe.utils.*
import org.eclipse.xtext.generator.*
import org.eclipse.xtext.ui.generator.*

var grammarURI = "classpath:/dk/example/poc/types/TypesDsl.xtext"
var file.extensions = "types"
var projectName = "dk.example.poc.types"
var runtimeProject = "../${projectName}"

Workflow {
	bean = StandaloneSetup {
		platformUri = "${runtimeProject}/.."
		registerGeneratedEPackage = "types.TypesPackage"
	
		// registerGenModelFile = "platform:/resource/dk.example.poc.types/model/Types.genmodel"
	
	}
...


Does anyone have a clue to what's wrong?

/Jeppe

[Updated on: Tue, 12 July 2011 11:40]

Report message to a moderator

Re: Xtext project from existing ecore model [message #695712 is a reply to message #695709] Tue, 12 July 2011 11:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi, please make sure that dk.example.poc.type exportes the types package and is set as dependency to yourdsls plugin (MANIFEST.MF)

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext project from existing ecore model [message #695723 is a reply to message #695712] Tue, 12 July 2011 12:07 Go to previous messageGo to next message
Jeppe Cramon is currently offline Jeppe CramonFriend
Messages: 37
Registered: July 2009
Member
Hi Christian

Thanks for your quick reply, I'm not sure what you mean by exporting the types package (I'm quite new to Eclipse plugin/Xtext).

I basically followed the video from here http://koehnlein.blogspot.com/2010/03/xtext-for-your-ecore-models.html and assumed that it would work Smile

/Jeppe
Re: Xtext project from existing ecore model [message #695730 is a reply to message #695723] Tue, 12 July 2011 12:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Ah ok, i assumed you'd have basical knowledge of Eclipse Plugin Delevelopment. Can you please post the MANIFEST.MF file of the EMF and the Xtext Plugin

you have basically to check if the emf contains types within the Export-Package: section and the xtext a dk.example.poc.type in the Require-Bundle: section

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Tue, 12 July 2011 12:29]

Report message to a moderator

Re: Xtext project from existing ecore model [message #695740 is a reply to message #695730] Tue, 12 July 2011 13:00 Go to previous message
Jeppe Cramon is currently offline Jeppe CramonFriend
Messages: 37
Registered: July 2009
Member
Thanks again, just realized that I totally forgot to generate Model code... It works now Smile

/Jeppe
Previous Topic:Yakindu Statecharts tools
Next Topic:Editor can't be initalized. Unresolved proxy
Goto Forum:
  


Current Time: Wed Apr 24 13:33:21 GMT 2024

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

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

Back to the top