Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Gradle Dependancies(New user of Xtext and Eclipse)
Xtext Gradle Dependancies [message #1741670] Fri, 26 August 2016 22:18 Go to next message
tom KIRKHAM is currently offline tom KIRKHAMFriend
Messages: 16
Registered: August 2016
Junior Member
Hi All,

I am new to XText and have followed this demo https://eclipse.org/Xtext/documentation/101_five_minutes.html ... using Xtext previously generated from a ecore model.

When I get to the web editor phase I get a Gradle error relating to dependencies I added to the XText workflow as EPackages. Do you know where I should specify these dependencies (if this is the right approach) so Gradle can complete?

Error from log "java.lang.RuntimeException: Problems instantiating module org.xtext.example.mydsl1.DSL1: java.lang.reflect.InvocationTargetException

.... Caused by: org.eclipse.emf.mwe.core.ConfigurationException: Couldn't find an interface org.somestuff.dsl.StuffPackage


Thanks,
Tom
Re: Xtext Gradle Dependancies [message #1741792 is a reply to message #1741670] Mon, 29 August 2016 16:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
Hi,

can you please share a complete sample project


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext Gradle Dependancies [message #1741807 is a reply to message #1741792] Mon, 29 August 2016 18:39 Go to previous messageGo to next message
tom KIRKHAM is currently offline tom KIRKHAMFriend
Messages: 16
Registered: August 2016
Junior Member
Hi Christian,

Here is my project zipped. Happy to have a dig around myself if you can point me to where the dependencies should be set.

Thanks,
Tom
  • Attachment: project.zip
    (Size: 3.12MB, Downloaded 31 times)
Re: Xtext Gradle Dependancies [message #1741815 is a reply to message #1741807] Mon, 29 August 2016 20:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
where is the camel bundle defined?

usually you dont need all the register stuff you did.

a

referencedResource = "platform:/resource/org.xtext.example.tk/model/camel.genmodel"

would have been fine.

then it seems as xtext does not like the nested epackage stuff
(can you please file a bug for that)


you may try the following pattern, but i dont know if this will work for you

import "platform:/resource/org.xtext.example.mydsl/model/My.ecore" as a // main package
import "platform:/resource/org.xtext.example.mydsl/model/My.ecore#//b" as b // subpackage a.b


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext Gradle Dependancies [message #1741816 is a reply to message #1741815] Mon, 29 August 2016 20:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
in your case something like

import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//scalability"
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//requirement" as requirement
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//metric" as metric
import "platform:/resource/org.xtext.example.tk/model/camel.ecore" as camel
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//organisation" as organisation
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//deployment" as deployment
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//unit" as unit
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//provider" as provider
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//type" as type
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//security" as security
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//location" as location
import "platform:/resource/org.xtext.example.tk/model/camel.ecore#//execution" as execution


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: Xtext Gradle Dependancies [message #1742059 is a reply to message #1741816] Tue, 30 August 2016 22:08 Go to previous messageGo to next message
tom KIRKHAM is currently offline tom KIRKHAMFriend
Messages: 16
Registered: August 2016
Junior Member
Hi Christian,

Thanks very much for the help. I have submitted the bug report and I no longer get the problems above.

I get a new error below which i don't think is related. I will post back when I have found a solution, or if not open a new subject.

Cheers,
Tom

:org.xtext.example.newTest:generateXtextERROR:AbstractnewTestDSLRuntimeModule cannot be resolved to a type. (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/newTest/newTestDSLRuntimeModule.xtend line : 10 column : 39)
ERROR:Superclass must be a class (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/newTest/newTestDSLRuntimeModule.xtend line : 10 column : 39)
ERROR:newTestDSLStandaloneSetupGenerated cannot be resolved to a type. (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/newTest/newTestDSLStandaloneSetup.xtend line : 11 column : 41)
ERROR:The method createInjectorAndDoEMFRegistration() is undefined for the type newTestDSLStandaloneSetup (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/newTest/newTestDSLStandaloneSetup.xtend line : 14 column : 35)
ERROR:Superclass must be a class (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/newTest/newTestDSLStandaloneSetup.xtend line : 11 column : 41)
ERROR:AbstractnewTestDSLScopeProvider cannot be resolved to a type. (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/newTest/scoping/newTestDSLScopeProvider.xtend line : 13 column : 39)
ERROR:Superclass must be a class (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/newTest/scoping/newTestDSLScopeProvider.xtend line : 13 column : 39)
ERROR:AbstractnewTestDSLValidator cannot be resolved to a type. (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/newTest/validation/newTestDSLValidator.xtend line : 12 column : 35)
ERROR:Superclass must be a class (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/newTest/validation/newTestDSLValidator.xtend line : 12 column : 35)
ERROR:AbstractCamelEditor4WebScopeProvider cannot be resolved to a type. (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/mydsl1/scoping/CamelEditor4WebScopeProvider.xtend line : 13 column : 44)
ERROR:Superclass must be a class (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/mydsl1/scoping/CamelEditor4WebScopeProvider.xtend line : 13 column : 44)
ERROR:AbstractCamelEditor4WebValidator cannot be resolved to a type. (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/mydsl1/validation/CamelEditor4WebValidator.xtend line : 12 column : 40)
ERROR:Superclass must be a class (file:/C:/eclipse/eclipse/newTestSpace26-08/org.xtext.example.newTest.parent/org.xtext.example.newTest/src/org/xtext/example/mydsl1/validation/CamelEditor4WebValidator.xtend line : 12 column : 40)
FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':org.xtext.example.newTest:generateXtext'.
> Xtext validation failed, see build log for details.
Re: Xtext Gradle Dependancies [message #1742060 is a reply to message #1742059] Tue, 30 August 2016 22:20 Go to previous message
tom KIRKHAM is currently offline tom KIRKHAMFriend
Messages: 16
Registered: August 2016
Junior Member
Ignore error in last message, it was some old files in the way.
Previous Topic:Unit testing using CompilationTestHelper
Next Topic:What is the best JavaFX diagram builder for Xtext language?
Goto Forum:
  


Current Time: Sat Dec 16 03:45:42 GMT 2017

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

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