Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Set an property which not defined in the grammar
Set an property which not defined in the grammar [message #1386837] Sat, 21 June 2014 10:22 Go to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member

I want to set programatically a property of an EMF Object. If we take for instance the grammar below, i need to set a property that is not present in the grammar (but it is in my metamodel) when the name is writen.

'Hello' name=ID '!';

Thanks in advance

Re: Set an property which not defined in the grammar [message #1386841 is a reply to message #1386837] Sat, 21 June 2014 12:50 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13359
Registered: July 2009
Senior Member

do you have a handwritten metamodel? if no you can use to add additional stuff to the metamodel.
to acutally set the property you could use IDerivedStateComputer. You may have to adapt ITransientValueService as well.

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Generate xtext artifacts for an edited metamodel
Next Topic:Tutorial about Quick Fixes
Goto Forum:

Current Time: Sun Feb 23 12:23:11 GMT 2020

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

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

Back to the top