Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Problems with Real division
[Acceleo] Problems with Real division [message #637869] Tue, 09 November 2010 08:52 Go to next message
miguel  is currently offline miguel Friend
Messages: 1
Registered: November 2010
Junior Member
Hi
I'm trying to evaluate a very simple expression involving Real data and division operator "/". Althought Acceleo environment doesn't detect any syntax problem, the result is not what I expected ...

expression is like :
"[3.3 / 2.1/]"

and the result is something like :

"org.eclipse.emf.ecore.impl.DynamicEObjectImpl@7a4489 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@129b0e1 (name: OclInvalid_Class) (instanceClassName: null) (abstract: false, interface: false))"

when I try another operator like plus, minus or multiplication, the result is as expected.

must I escape the division operator somehow or must I use a different expression?

Any help is wellcome.

Thanks in advance
Re: [Acceleo] Problems with Real division [message #637963 is a reply to message #637869] Tue, 09 November 2010 13:50 Go to previous message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi Miguel,

There seems to be a problem with the serialization of "/" in xml. It is replaced by "%2F" (the symbol for "/" in xml) but it shouldn't because in our case EMF can handle the deserialization of the "/" and when EMF tries to deserialize "%2F" we don't succeed in matching this to the "/" operator. I've raised a bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=329779) to correct this problem. It should be fixed in Acceleo 3.1 M4 or M5 and in Acceleo 3.0.2.

Thanks for reporting this problem.

In the mean time, if you need this operator, you can work around this problem by using a java service, like this:

http://img233.imageshack.us/img233/3749/workaround.png

Stéphane Bégaudeau, Obeo.
Previous Topic:OpenArchitectureWare tutorial 4.3.1
Next Topic:[acceleo] How can I generate code automatically as a dependency on the target project?
Goto Forum:
  


Current Time: Fri Apr 19 23:54:23 GMT 2024

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

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

Back to the top