Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Howto load multiple concrete syntax instances(I wish to load many test.mydsl files into the editor)
Howto load multiple concrete syntax instances [message #904547] Tue, 28 August 2012 16:51 Go to next message
Stefan Kreisberg is currently offline Stefan KreisbergFriend
Messages: 5
Registered: August 2012
Junior Member
Hi,
A newbie question, hope I'm asking in the right forum (if not, please let me know):

I have created my own DSL and can spawn an Editor for it, typing in my concrete syntax with validation etc. and it works (and rocks!)

But: I want to load a plethora of concrete syntax files/instances and have them behave as if they were one.

I.e. my language says that a "Config" must have a unique name - which works elegant
with the one mydsl instance I am editing, but the name should be unique with ALL instances from, let's say a directory root that I would like the editor to load upon creation.

Can that be done? Any hint on where to start will be greatly appreciated Smile

Many regards
Stefan
Re: Howto load multiple concrete syntax instances [message #904576 is a reply to message #904547] Tue, 28 August 2012 18:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13661
Registered: July 2009
Senior Member
Hi,

have a look at

http://www.eclipse.org/forums/index.php/mv/msg/267004/766678/#msg_766678


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Howto load multiple concrete syntax instances [message #904585 is a reply to message #904576] Tue, 28 August 2012 18:40 Go to previous messageGo to next message
Stefan Kreisberg is currently offline Stefan KreisbergFriend
Messages: 5
Registered: August 2012
Junior Member
Wauw - thanks, looks very promising, I'll try it out Smile And thanks for answering so incredibly fast! Smile
Re: Howto load multiple concrete syntax instances [message #909281 is a reply to message #904585] Thu, 06 September 2012 21:43 Go to previous messageGo to next message
Stefan Kreisberg is currently offline Stefan KreisbergFriend
Messages: 5
Registered: August 2012
Junior Member
So, I got my global scoping and names for my Config working. Now i want to add another constraint: That the name of my Config feature may be the same, if and only if a nested feature "type" has the same value, that is:

config RED
type int

[and in another .mydsl file:]

config RED
type int

... should be allowed even though the name of the config is the same.

I tried using a cast from the containermanager like
Config mc = (Config) od.getEObjectOrProxy();

But it doesn't seem to work as intended.

Could anyone provide me a tip on were to read up on this? All ideas are of cource welcome and appreciated Smile
Re: Howto load multiple concrete syntax instances [message #909426 is a reply to message #909281] Fri, 07 September 2012 05:58 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13661
Registered: July 2009
Senior Member
Possibility a: store the information in the index (search keyword defaultresourcedescriptionstrategy)
possibiltiy b: resolve the proxy (may be slooooooooowwwww)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Using Xtext's index/linking machinery in a graphical editor
Next Topic:Error dialog in editor
Goto Forum:
  


Current Time: Mon Nov 30 02:29:55 GMT 2020

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

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

Back to the top