Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Handling Epsilon keywords as metamodel element names
Handling Epsilon keywords as metamodel element names [message #1284458] Fri, 04 April 2014 13:55 Go to next message
Vlad Acretoaie is currently offline Vlad AcretoaieFriend
Messages: 95
Registered: April 2014
Member
Hi,

I am writing an ETL transformation based on the OO.ecore metamodel provided in package org.eclipse.epsilon.examples.metamodels.

In OO.ecore, the metatype Class has a property named "extends". To access this property in ETL, one would wite something like:

myClass.extends

However, "extends" is also a keyword of ETL. The above snippet thus generates a compiler error. Is there a way to handle this situation, or is it necessary to modify the metamodel by removing all ETL keywords?

Thanks,
Vlad
Re: Handling Epsilon keywords as metamodel element names [message #1284543 is a reply to message #1284458] Fri, 04 April 2014 15:47 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Vlad,

You can use back-ticks to escape reserved words i.e. c.`extends`.

Cheers,
Dimitris
Re: Handling Epsilon keywords as metamodel element names [message #1288376 is a reply to message #1284543] Tue, 08 April 2014 14:04 Go to previous message
Vlad Acretoaie is currently offline Vlad AcretoaieFriend
Messages: 95
Registered: April 2014
Member
That worked like a charm - thanks Smile

Vlad
Previous Topic:Create connection between two classes
Next Topic:Copying object properties
Goto Forum:
  


Current Time: Sat Apr 20 01:42:01 GMT 2024

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

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

Back to the top