Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Import a dsl language which is not present in the same workspace
Import a dsl language which is not present in the same workspace [message #1857223] Wed, 25 January 2023 15:05 Go to next message
Loredana Hozan is currently offline Loredana HozanFriend
Messages: 34
Registered: January 2019
Member
Hello,
I have issues importing and using a dsl language that is not present in the same workspace.
Basically, i have language B and i want to use elements from language A, i have imported language A in my xtext file using
import "http://www.myDslA.com/dsl/myDslA/MyDslA" as myDslA

i use a target platform which brings myDslA module, and i have added the plugin in the required plugin section of the MANIFEST.MF.
I know i have to register the ecore and genmodel files in myDslB.mwe2 file, for a language that is present in the workspace i have added this:
referencedResource = "platform:/resource/com.myDslC/model/generated/myDslC.ecore"
 referencedResource = "platform:/resource/com.myDslC/model/generated/myDslC.genmodel"

but i don't know how i could do this for a language that is not located in the same workspace, and I don't want to hardcode a path towards language A either. Any ideas? is this possible?
Re: Import a dsl language which is not present in the same workspace [message #1857225 is a reply to message #1857223] Wed, 25 January 2023 15:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14735
Registered: July 2009
Senior Member
it will work if

- com.myDslC is in the target platform
- com.myDslC packages model/generated/* (see build.properties)
- com.myDslC is in required bundles of myDslA


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Import a dsl language which is not present in the same workspace [message #1857230 is a reply to message #1857225] Thu, 26 January 2023 08:11 Go to previous message
Loredana Hozan is currently offline Loredana HozanFriend
Messages: 34
Registered: January 2019
Member
Yes, it works now. Thank you. I thought that, since myDslA is not in the same workspace, i should use the nsURI to register the language in the mwe2, my bad.
Previous Topic:How to implement Formatter maxLineWidth?
Next Topic:Split textual models into multiple files
Goto Forum:
  


Current Time: Tue Dec 03 02:44:37 GMT 2024

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

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

Back to the top