|
|
|
Re: [Acceleo] Unable to make a query with collection as return type [message #65156 is a reply to message #65089] |
Mon, 27 July 2009 11:09 |
|
This is a multi-part message in MIME format.
--------------060805060500080004090103
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hi,
> By the way: This is a very bloated expression, but I think it cannot
> be written in a shorter way using standard OCL.
The only shortcuts I can think of for your expression is to make use of
the implicit collect and variables :
p.ownedType->select(oclIsTypeOf(uml::Class)).oclAsType(uml::Class)
That being said, you can take a look at this newsgroup thread
http://www.eclipse.org/newsportal/article.php?id=1885&gr oup=eclipse.modeling.mdt.ocl#1885
for details on why the implementation doesn't check the return type of
these selects.
As for the first query given as an exemple here, I believe Acceleo has
its own issues with parsing parameterized collections (instead of
Set(Association), you could have written 'Set(T)") that we must attend
to. OCL on its side has some opened bugs on such issues that could be
the source of yours : https://bugs.eclipse.org/bugs/show_bug.cgi?id=191819 .
Laurent Goubet
Obeo
Max Bureck a
|
|
|
Powered by
FUDForum. Page generated in 0.02926 seconds