Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » problems with Xtext 2.8 and Xcore 1.3.0
problems with Xtext 2.8 and Xcore 1.3.0 [message #1625424] Fri, 20 February 2015 11:15 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1784
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

I started to ported one of my DSL to Xtext 2.8 (taken from nightly
update site); I'm using Xcore for the metamodel of the DSL (I'm taking
1.3.0 from nightly update site as well).

I have many problems:

the xcore file shows errors on every class saying that (Description is
one of the classes defined in the .xcore file)
"Multiple markers at this line
- The type Description is already defined in Description.java.
- The type DescriptionImpl is already defined in DescriptionImpl.java."

running the mwe2 workflow for the DSL fails with errors of the shape

[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: Generator)
java.lang.IllegalStateException: The resource should have no more than
one root element, but:
[org.eclipse.emf.ecore.xcore.impl.XPackageImpl@5aec151b (name: ...),
org.eclipse.emf.codegen.ecore.genmodel.impl.GenModelImpl@74cf2d5f at
org.eclipse.xtext.resource.DerivedStateAwareResource.installDerivedState(DerivedStateAwareResource.java:216)
at
org.eclipse.xtext.xbase.resource.BatchLinkableResource.getContents(BatchLinkableResource.java:148)

has anyone succeeded in using Xcore with Xtext from the nightly update site?

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: problems with Xtext 2.8 and Xcore 1.3.0 [message #1627624 is a reply to message #1625424] Sat, 21 February 2015 17:16 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3109
Registered: July 2009
Senior Member
HI Lorenzo,

I can reproduce issues with Xcore. I'll come back to this post as soon as I've worked out which concrete problems exists.

Best,
Sebastian
Re: problems with Xtext 2.8 and Xcore 1.3.0 [message #1691337 is a reply to message #1627624] Mon, 06 April 2015 08:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14113
Registered: July 2009
Senior Member
Any new on this?

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: problems with Xtext 2.8 and Xcore 1.3.0 [message #1691338 is a reply to message #1691337] Mon, 06 April 2015 08:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14113
Registered: July 2009
Senior Member
P.S: i filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=463961 for that

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: problems with Xtext 2.8 and Xcore 1.3.0 [message #1844021 is a reply to message #1691338] Fri, 27 August 2021 15:26 Go to previous message
Greg Lusk is currently offline Greg LuskFriend
Messages: 36
Registered: February 2017
Location: USA
Member
I have encountered the error "The type 'xyz' is already defined in 'Xyz.java'" problem using Eclipse Version 2021-03 (4.19.0) and Xtext 2.25.0. In my case, I solved the problem as follows:

1. Select Window->Preferences
2. Select Xcore/Compiler from the tree.
3. In the Output Folder section, set the Directory to ./build/xcore/main
* We roughly follow the process that Karsten describes here for our model setup (https://blogs.itemis.com/en/using-xtext-with-xcore-and-gradle)

(all the boxes are checked except Ignore generated Java source when debugging)
4. Close the dialog and make a change to the .xcore file; the errors should go away.
Previous Topic:Trigger build automatically
Next Topic:Cannot Reference One Xcore Model from Another
Goto Forum:
  


Current Time: Thu Jan 27 12:30:48 GMT 2022

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

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

Back to the top