Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Grammar Access and TypeReference problems(leading to java.lang.IllegalArgumentException: Cannot determine the package name of...)
Grammar Access and TypeReference problems [message #1730662] Wed, 27 April 2016 13:53 Go to next message
Julien Deantoni is currently offline Julien DeantoniFriend
Messages: 45
Registered: July 2009
Member
Hello,

I have an Xtext project, which is actually an extension of the completeOCL xtext project.
It worked for several year and now I need to move to Xtext 2.9.2
After various adaptations, I obtain the following error when running the mwe2 workflow:
 GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
	 java.lang.IllegalArgumentException: Cannot determine the package name of 'fr.inria.aoste.timesquare.ECL.ECLPackage'. Please use the TypeReference(packageName, className) constructor

The error occurs in the serializer fragment. To call it I'm using the same code then in the previous versions, i.e.
        // the serialization component
	fragment = serializer.SerializerFragment {}


After some investigations, I'm not sure what to do. I already added this kind of code in my workflow:
        registerGeneratedEPackage = "fr.inria.aoste.timesquare.ECL.ECLPackage"
	registerGenModelFile = "platform:/resource/fr.inria.aoste.timesquare.ecl/model/ecl.genmodel"


but without success...

Any help would be very welcome Smile


Re: Grammar Access and TypeReference problems [message #1730663 is a reply to message #1730662] Wed, 27 April 2016 13:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
do you use old style or new style workflow

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Grammar Access and TypeReference problems [message #1730665 is a reply to message #1730663] Wed, 27 April 2016 14:08 Go to previous messageGo to next message
Julien Deantoni is currently offline Julien DeantoniFriend
Messages: 45
Registered: July 2009
Member
Hi Christian,

I'm still using an old still workflow. I tried to move to the new version but since the workflow is complex I did not succeed. At the end I more or less cloned the workflow from completeOCL, which is supposed to work correctly: https://git.eclipse.org/c/ocl/org.eclipse.ocl.git/tree/examples/org.eclipse.ocl.examples.build/src/org/eclipse/ocl/examples/build/GenerateCompleteOCLEditor.mwe2
Re: Grammar Access and TypeReference problems [message #1730671 is a reply to message #1730665] Wed, 27 April 2016 14:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
sry i have no idea on this. unfortunately i have no idea how to setup the stuff to get it running

=> a reproduceable example is welcome


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

[Updated on: Wed, 27 April 2016 14:55]

Report message to a moderator

Re: Grammar Access and TypeReference problems [message #1748494 is a reply to message #1730671] Wed, 23 November 2016 15:29 Go to previous message
Julien Deantoni is currently offline Julien DeantoniFriend
Messages: 45
Registered: July 2009
Member
Hi,

the problem was the same than this one: https://www.eclipse.org/forums/index.php/t/1082021/

in a nutshell, ecore package name must start with a lowercase...
A better feedback could be welcome Smile but problem solved !
Previous Topic:Copyright Field in generated code from xtext
Next Topic:How to override and extend the JvmModelGenerator to generate complex enumerations
Goto Forum:
  


Current Time: Thu Apr 25 20:19:08 GMT 2024

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

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

Back to the top