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 [] []{get;set;}

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

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: 7661
Registered: July 2009
Senior Member

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.


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: Fri Jun 14 00:29:34 GMT 2024

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

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

Back to the top