MTL and Element idhttps://www.eclipse.org/forums/index.php/mv/msg/15898/50796/#msg_50796
i'm trying to read out the id of an EMFObject for the use of traceability,
like it is mentioned in the specification.
My current approach was exactly was i have found in the spec:
[c.id]
But this fails of course, because there is no attribute like id in the
element but in the XMI serialization.
And by the way, is it possible to extend the MTL with an external function,
which could be implemented in JAVA? The capabilities of the macro definition
are very restricted.

First of all, the traceBlock as defined in the specification isn't
implemented yet as far as the evaluation engine is concerned. As for the
"id" attribute ... well this might be yet another issue of the spec.

As for extending MTL with Java defined external functions, this is
something we're thinking about but it clearly isn't a priority since we
need to fully implement the specification itself before thinking about
extending it. You're stuck with macros/queries for now :(.

Regards,

Laurent Goubet
Obeo

Timothy Marc a ]]>Laurent Goubet2008-09-26T11:19:11-00:00Re: MTL and Element idhttps://www.eclipse.org/forums/index.php/mv/msg/15898/50851/#msg_50851
so, if i understand it right, it is so, that i have no possibility to get an
element's id? But, to prevent missunderstaning, i don't need the trace block
of the spec. I just need the access to the ids.

Timothy

"laurent Goubet" <laurent.goubet@obeo.fr> schrieb im Newsbeitrag
news:gbigfg$lie$1@build.eclipse.org...
> Hi Timyothy,
>
> First of all, the traceBlock as defined in the specification isn't
> implemented yet as far as the evaluation engine is concerned. As for the
> "id" attribute ... well this might be yet another issue of the spec.
>
> As for extending MTL with Java defined external functions, this is
> something we're thinking about but it clearly isn't a priority since we
> need to fully implement the specification itself before thinking about
> extending it. You're stuck with macros/queries for now :(.
>
> Regards,
>
> Laurent Goubet
> Obeo
>
> Timothy Marc a ]]>Timothy Marc2008-09-26T12:18:19-00:00Re: MTL and Element idhttps://www.eclipse.org/forums/index.php/mv/msg/15898/51047/#msg_51047
--------------000809090502080008080909
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Timothy,

AFAIK, there is no way to get the XMI ID of an element other than to get
it directly from the XMIResource reference. That can only be done in
Java and we do not provide a way to define custom operations in MTL as
yet (again, this will most probably evolve in the future).

However, if what you seek to obtain is not the XMI ID but rather the "ID
attribute" of an EClass, you can do so by iterating over all of its
attributes and selecting the one for which attr.isId() returns true.

"laurent Goubet" <laurent.goubet@obeo.fr> schrieb im Newsbeitrag
news:gbslo2$in7$1@build.eclipse.org...
> Hi Timothy,
>
> AFAIK, there is no way to get the XMI ID of an element other than to get
> it directly from the XMIResource reference. That can only be done in
> Java and we do not provide a way to define custom operations in MTL as
> yet (again, this will most probably evolve in the future).
>
> However, if what you seek to obtain is not the XMI ID but rather the "ID
> attribute" of an EClass, you can do so by iterating over all of its
> attributes and selecting the one for which attr.isId() returns true.
>
> Laurent Goubet
> Obeo
>
> Timothy Marc a ]]>Timothy Marc2008-09-30T07:57:22-00:00