Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Duplicate query/operation detection, bug?
[Acceleo] Duplicate query/operation detection, bug? [message #1752181] Thu, 19 January 2017 13:45 Go to next message
Jelle Schuhmacher is currently offline Jelle SchuhmacherFriend
Messages: 3
Registered: November 2015
Location: Nijmegen
Junior Member
Hi,

I'm working on a project that uses Acceleo 3.6.3 in Eclipse Mars.2 for generating C++ code. I came across a rather hard to find issue in our generator, that was caused by the accidental presence of duplicate operations.

I'm trying to understand how it is intended to work, so that I can avoid or detect the problem in the future.

An operation with this exact signature is embedded in Ecore, why is the following not flagged as an illegal duplicate of the embedded operation?
[query public isSuperTypeOf(someClass : EClass) : EBoolean = false /]

Should I file a bug for this?

EClassifier is a super type of EClass. Should adding the following query result in a warning? (or maybe should it even be illegal?)
[query public isSuperTypeOf(someClass : EClassifier) : EBoolean = false /]


If templates with these kinds of "duplicates" are in fact correct, how does the Acceleo interpreter decide which of the three available matching queries is invoked in the following case?
[anEClass.isSuperTypeOf(anEClass) /]


Greetings,
Jelle
Re: [Acceleo] Duplicate query/operation detection, bug? [message #1753530 is a reply to message #1752181] Tue, 07 February 2017 14:20 Go to previous message
Jelle Schuhmacher is currently offline Jelle SchuhmacherFriend
Messages: 3
Registered: November 2015
Location: Nijmegen
Junior Member
Hi,

I've added a bug report for the first question at: https://bugs.eclipse.org/bugs/show_bug.cgi?id=511837.

From the Acceleo interpreter code it looks like the second query is allowed by design. It looks like an ordering is attempted according to the inheritance relation of the parameters, such that the most specific version of the query that applies is tried first.

Greetings,
Jelle

[Updated on: Tue, 07 February 2017 14:40]

Report message to a moderator

Previous Topic:Operation Setereotype -> get Value
Next Topic:[Acceleo] Parse multiple models of 1 metamodel
Goto Forum:
  


Current Time: Wed Jun 20 17:24:43 GMT 2018

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

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

Back to the top