Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Linking of duplicate objects in Xtext(Linking of duplicate objects in Xtext)
icon5.gif  Linking of duplicate objects in Xtext [message #1721555] Thu, 28 January 2016 09:55 Go to next message
Arshad Adavani is currently offline Arshad AdavaniFriend
Messages: 163
Registered: July 2013
Location: Bangalore
Senior Member
Hi All,

I have 2 sample languages . This example uses 4 different files.
Kindly have a look below.


entity e1 {


entity e1 {


entity e2 {



You can observe DSL3.dmodel imports e1. It could be linked to any object from DSL1.dmodel and DSL2.dmodel randomly.

I have one more main language i.e DSL4.mymodel which has access to all the entity objects ( I do it by importing the namespace.).
I have one specific requirement. DUPLICATE ENTITY OBJECTS ARE NOT ALLOWED in DSL4.mymodel so I exclude them using exclude block.

In the above snippet I have excluded DSL2.e1.

Now, what I want to achieve is : when I exclude one instance then remaining instance should be linked in all other places.
i.e. I have excluded DSL2.e1 in DSL4.mymodel, so DSL1.e1 should be linked everywhere E.g. imports[e1] in DSL3.dmodel.

Can we achieve this ? If yes, any hints ?

Thanks for any help!


Re: Linking of duplicate objects in Xtext [message #1721669 is a reply to message #1721555] Fri, 29 January 2016 05:15 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Basically you have to reduce the scope for the imports reference based on the exclude elements. Thus, when computing the import scope, query the (global) export scope and filter all qualified names from there. I'm not sure if this would work, but at least I would start investigatin g in this direction.

Need professional support for Xtext, EMF, Eclipse IDE?
Go to:
Twitter : @kthoms
Blog :
Previous Topic:Getting all values under a category
Next Topic:using xtend or xpand for code generation
Goto Forum:

Current Time: Sun Oct 02 22:49:41 GMT 2022

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

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

Back to the top