Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Two DSL in same project(DSL "B" read entities defined in DSL "A".)
Two DSL in same project [message #1775937] Wed, 08 November 2017 07:21 Go to next message
Eclipse UserFriend
Hi, I have a DSL "A" with entities and some others functionalities to generate Java services backend contracts. Now I would like to create a new DSL "B" in the same project (in the same Eclipse plug-in for the existing DSL "A"), in order to read these entities defined in DSL "A" to generate JPA code for these entities and others artifacts. It this possible? What are the steps to do this?

Thank you very much in advance.
Re: Two DSL in same project [message #1775938 is a reply to message #1775937] Wed, 08 November 2017 07:25 Go to previous messageGo to next message
Eclipse UserFriend
simply having two language sections in the workflow should do the trick
Re: Two DSL in same project [message #1776428 is a reply to message #1775938] Thu, 16 November 2017 06:55 Go to previous messageGo to next message
Eclipse UserFriend
Hi, Thanks for your answered.
I decided to create a new xText project for the new DSL "B", called "EDL", that must reference elements in existing DSL "A". I followed your Blog's post "Xtext: Referencing Elements of one DSL from another DSL". But I getting an error when I run GenerateEDL.mwe2 (the error happens only if I reference the DSL "A"). Can you give me some help? I already searched on Google without success.
In the Error.zip file I put the main files to inspect the problem.

Thank you very much for the help.
  • Attachment: Error.zip
    (Size: 117.12KB, Downloaded 171 times)
Re: Two DSL in same project [message #1776430 is a reply to message #1776428] Thu, 16 November 2017 07:03 Go to previous messageGo to next message
Eclipse UserFriend
Hi

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@326f3ab4 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@2264ea32 (name: EReference) (instanceClassName: null) (abstract: false, interface: false))' is not legal. (platform:/resource/br.com.senior.edl/model/generated/EDL.genmodel, 10, 129)

strongly suggests a problem with the br.com.senior.edl registration

3230 [main] INFO clipse.emf.mwe.utils.GenModelHelper - Registered GenModel 'br.com.senior.sdl.model' from 'file:///C:/mk/git/sdl/br.com.senior.sdl.model/model/sdl.xcore'

is inconsistent. "file:///" is unusual. I would need to read the specification to see what it really means. But I suspect it is at least one of your problems.

Regards

Ed Willink
Re: Two DSL in same project [message #1776432 is a reply to message #1776430] Thu, 16 November 2017 07:24 Go to previous messageGo to next message
Eclipse UserFriend
Yes, I agree with you, I think the correct way is to use:
referencedResource = "platform:/resource/br.com.senior.sdl.model/model/sdl.xcore"

but then I get the error: java.lang.RuntimeException: Problems running workflow br.com.senior.edl.GenerateEDL: java.io.IOException: The path '/br.com.senior.sdl.model/model/sdl.xcore' is unmapped
It only works if I install the DSL plug-in "A" in my Eclipse.
Re: Two DSL in same project [message #1776436 is a reply to message #1776432] Thu, 16 November 2017 07:44 Go to previous messageGo to next message
Eclipse UserFriend
can you share a complete example project zoo? see https://github.com/cdietrich/xtext-ecore-xcore
Re: Two DSL in same project [message #1776455 is a reply to message #1776436] Thu, 16 November 2017 09:47 Go to previous messageGo to next message
Eclipse UserFriend
The two projects are attached.

[Updated on: Fri, 17 November 2017 10:28] by Moderator

Re: Two DSL in same project [message #1776463 is a reply to message #1776455] Thu, 16 November 2017 10:40 Go to previous message
Eclipse UserFriend
am only geting [INFO] {osgi.os=macosx, osgi.ws=cocoa, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: br.com.senior.edl 1.0.0.qualifier
[ERROR] Missing requirement: br.com.senior.sdl.language 17.2.2.201711161536 requires 'bundle org.apache.commons.lang3 0.0.0' but it could not be found
[ERROR] Cannot satisfy dependency: br.com.senior.edl 1.0.0.qualifier depends on: bundle br.com.senior.sdl.language 17.2.2
thats not related to your initial problem

for your second problem i have no idea. would be a question for the EMF forum
Previous Topic:Loading file-based ecore files from xText DSML
Next Topic:(Xbase)Method refers to missing type .. : List Values cannot get passed as parameter or return value
Goto Forum:
  


Current Time: Wed Jul 23 21:11:54 EDT 2025

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

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

Back to the top