Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Comparison for upperbound is not working
Comparison for upperbound is not working [message #1808721] Sun, 30 June 2019 10:26 Go to next message
Mohammad Inayatullah is currently offline Mohammad InayatullahFriend
Messages: 21
Registered: May 2019
Junior Member
I have the following code

[if a.ownedEnd.getOtherEnd().upperBound().toString() <> '-1']
public [p.type.name/] [p.type.name.toLowerFirst()/]{get;set;}
[else]

In this code the if condition is not working. Can any one please guide me

Thanks
Re: Comparison for upperbound is not working [message #1808730 is a reply to message #1808721] Sun, 30 June 2019 13:29 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6440
Registered: July 2009
Senior Member
Hi

Presumably the toString does not return -1. Perhaps it is *. I have no idea why you convert your integer to strings. Maths is normally done with Integers and Reals.

A nice thing about working with M2T is that it is really easy to put in debug printouts. Give it a try and start to learn to debug.

Regards

Ed Willink
Previous Topic:Find Multiplicity of association in acceleo
Next Topic:How can I reuse the template from a super metaclass
Goto Forum:
  


Current Time: Sat Aug 24 18:21:50 GMT 2019

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

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

Back to the top