Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » New Xtext project from ECore - Packaging error("Could not resolve ECLassifier" for double inheritance)
New Xtext project from ECore - Packaging error [message #1835536] Sun, 06 December 2020 11:03 Go to next message
Edoaurd Batot is currently offline Edoaurd BatotFriend
Messages: 98
Registered: March 2015
Member
Hi everyone,

I am trying to generate a Xtext from an Ecore metamodel.
The metamodel seems alright; containments checked, nsURI and prefixes set.

Now, when I start a "New Xtext project from an existing Ecore model", I get errors on a bunch of classes. The classes in question are all leafs of a same branch.

Here's what happen:
[There was here a clear descrption of the problem. I remove it for PI]

Is it something about parameterization I am missing ? Or what ? I am at a loss, thank to anybody who can give me a hint on how to get these errors out.

Thanks,
Ed

[Updated on: Mon, 07 December 2020 08:01]

Report message to a moderator

Re: New Xtext project from ECore - Packaging error [message #1835537 is a reply to message #1835536] Sun, 06 December 2020 11:05 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13931
Registered: July 2009
Senior Member
make sure you emf project has Xtext nature (rightclick, configure, Convert to Xtext project)
and that it is added to the yourdsl project as dependency.

if that one does not help: please create and share a minimal reproducible example


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Sun, 06 December 2020 11:06]

Report message to a moderator

Re: New Xtext project from ECore - Packaging error [message #1835538 is a reply to message #1835537] Sun, 06 December 2020 11:10 Go to previous messageGo to next message
Edoaurd Batot is currently offline Edoaurd BatotFriend
Messages: 98
Registered: March 2015
Member
Ouch, your answer came before I had time to resize the image !!!
Thanks so much.

Questions below:

Quote:
make sure you emf project has Xtext nature (rightclick, configure, Convert to Xtext project)

It is.

Quote:
and that it is added to the yourdsl project as dependency.

How do I check that ?

Quote:
please create and share a minimal reproducible example

I can past Xtext example and show it works ;)
More seriously, I'll work on that but it aint easy to do... A small version of that same Ecore worked perfectly. When I had thos inheritance leaves, the thing explodes.
Re: New Xtext project from ECore - Packaging error [message #1835539 is a reply to message #1835538] Sun, 06 December 2020 11:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13931
Registered: July 2009
Senior Member
yes. but to be able to understand and debug it, i need something that i can debug locally

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: New Xtext project from ECore - Packaging error [message #1835567 is a reply to message #1835539] Mon, 07 December 2020 08:02 Go to previous messageGo to next message
Edoaurd Batot is currently offline Edoaurd BatotFriend
Messages: 98
Registered: March 2015
Member
Too quick maybe, too quick..
Re: New Xtext project from ECore - Packaging error [Solved] [message #1835652 is a reply to message #1835567] Wed, 09 December 2020 13:52 Go to previous messageGo to next message
Edoaurd Batot is currently offline Edoaurd BatotFriend
Messages: 98
Registered: March 2015
Member
The solution to this issue was to use "platform" imports:
i
import "platform:/path/to/yourdsl.ecore"
import "platform:/path/to/yourdsl.ecore#//package1" as package1
import "platform:/path/to/yourdsl.ecore#//package2" as package2


instead of URIs:
import "http://yourdsl.ecore"  
import "http://yourdsl.ecore#//package1" as package1
import "http://yourdsl.ecore#//package2" as package2


There are some warnings, but once the plugin is on, it's all fine.

Asking for a repro is often a lazy answer.
Re: New Xtext project from ECore - Packaging error [Solved] [message #1835658 is a reply to message #1835652] Wed, 09 December 2020 15:16 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13931
Registered: July 2009
Senior Member
your namespaces look wired.
maybe that is the problem
maybe its also a problem with nested packages


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Add tag/separator/... to organise outline view
Next Topic:Adding a new resource to the IResourceDescriptions
Goto Forum:
  


Current Time: Tue May 11 13:32:09 GMT 2021

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

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

Back to the top