Skip to main content



      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 09:53 Go to next message
Eclipse UserFriend
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 09:55 Go to previous messageGo to next message
Eclipse UserFriend
do you use old style or new style workflow
Re: Grammar Access and TypeReference problems [message #1730665 is a reply to message #1730663] Wed, 27 April 2016 10:08 Go to previous messageGo to next message
Eclipse UserFriend
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 10:35 Go to previous messageGo to next message
Eclipse UserFriend
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

[Updated on: Wed, 27 April 2016 10:55] by Moderator

Re: Grammar Access and TypeReference problems [message #1748494 is a reply to message #1730671] Wed, 23 November 2016 10:29 Go to previous message
Eclipse UserFriend
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: Mon Jul 14 06:00:27 EDT 2025

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

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

Back to the top