Skip to main content



      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 06:15 Go to next message
Eclipse UserFriend
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 12:16 Go to previous messageGo to next message
Eclipse UserFriend
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 04:21 Go to previous messageGo to next message
Eclipse UserFriend
Any new on this?
Re: problems with Xtext 2.8 and Xcore 1.3.0 [message #1691338 is a reply to message #1691337] Mon, 06 April 2015 04:25 Go to previous messageGo to next message
Eclipse UserFriend
P.S: i filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=463961 for that
Re: problems with Xtext 2.8 and Xcore 1.3.0 [message #1844021 is a reply to message #1691338] Fri, 27 August 2021 11:26 Go to previous message
Eclipse UserFriend
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: Mon Apr 21 00:31:34 EDT 2025

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

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

Back to the top