Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xtend] test on infinity value
[Xtend] test on infinity value [message #537379] Wed, 02 June 2010 09:06 Go to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
Hi,

when building a metamodel, -1 symbolize the maximum value in a EAttribute.
But whenever I want to make a test on a EAttribute, if I want to check if it's value is higher than 12 (for example), I need to make two tests, in case the value is infinite (-1).

attribute > 1 || attribute == -1

It is more for beauty than a necessity, but is there an extension that does both tests, or would I have to write it.


One day I shall master M2T, but that day has yet to come...
Re: [Xtend] test on infinity value [message #537395 is a reply to message #537379] Wed, 02 June 2010 10:10 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Hi Maxime,

EAttribute has a property 'many'. I think this is what you search for.

Regards,
~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Previous Topic:[Acceleo] Package with uri 'http://www.eclipse.org/uml2/3.0.0/UML' not found
Next Topic:[XTend] something like instanceof?
Goto Forum:
  


Current Time: Fri Apr 19 00:34:25 GMT 2024

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

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

Back to the top