Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Please use the TypeReference(packageName, className)
Please use the TypeReference(packageName, className) [message #1745995] Thu, 20 October 2016 09:57 Go to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi everyone,
When I try to launch the generation of Xtext artifacts I get the following error:

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: XtextGenerator)
	 java.lang.IllegalArgumentException: Cannot determine the package name of 'GS.GSPackage'. Please use the TypeReference(packageName, className) constructor

Could someone explain to me please the cause of this error.
Also i dont understand why in my manifest file the serializer plug-in is missing. Is that related to my previous error.

thanks in advance
Best regards
Re: Please use the TypeReference(packageName, className) [message #1745997 is a reply to message #1745995] Thu, 20 October 2016 10:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Xtext cannot handle your naming convestions. please create a bug at https://github.com/eclipse/xtext-core

do you have the package name under control?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Please use the TypeReference(packageName, className) [message #1746006 is a reply to message #1745997] Thu, 20 October 2016 11:12 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Thanks Christian ,
As always you're here to rescue us.
Yes i have the package name under control and i can change it if needed.
Pease find below my simple MM and the grammar that a am trying to define.
Thanks
Re: Please use the TypeReference(packageName, className) [message #1746009 is a reply to message #1746006] Thu, 20 October 2016 11:42 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
can you change name of the package to gs (lower case)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Please use the TypeReference(packageName, className) [message #1746023 is a reply to message #1746009] Thu, 20 October 2016 15:25 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Thanks Christian,
Indeed my problem is solved. can I have more details about the source of the problem.
Re: Please use the TypeReference(packageName, className) [message #1746025 is a reply to message #1746023] Thu, 20 October 2016 15:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
as i said: please file a bug so that this can be fixed. t

he implementation of

org.eclipse.xtext.xtext.generator.model.TypeReference.getPackageName(String, boolean)

expects the emf package to stick to java naming conventions

a.b.c.XyzPackage


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Please use the TypeReference(packageName, className) [message #1746095 is a reply to message #1746025] Fri, 21 October 2016 14:45 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Its done
Thanks again
Re: Please use the TypeReference(packageName, className) [message #1755141 is a reply to message #1746095] Tue, 28 February 2017 11:42 Go to previous messageGo to next message
Patrik Nandorf is currently offline Patrik NandorfFriend
Messages: 195
Registered: January 2013
Location: Sweden
Senior Member
What is the status of this bug? I have the same issue.
Re: Please use the TypeReference(packageName, className) [message #1755144 is a reply to message #1755141] Tue, 28 February 2017 12:02 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
there is no news. this bug is still open.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Please use the TypeReference(packageName, className) [message #1755145 is a reply to message #1755144] Tue, 28 February 2017 12:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
https://github.com/eclipse/xtext-core/issues/161

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Please use the TypeReference(packageName, className) [message #1755148 is a reply to message #1755145] Tue, 28 February 2017 12:26 Go to previous message
Patrik Nandorf is currently offline Patrik NandorfFriend
Messages: 195
Registered: January 2013
Location: Sweden
Senior Member
Thanks
Previous Topic:How to integrating OCL types in Xtext grammar
Next Topic:Loading resources in web editor
Goto Forum:
  


Current Time: Sat Dec 14 01:09:13 GMT 2024

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

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

Back to the top