Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » MTL and Element id
MTL and Element id [message #50796] Fri, 26 September 2008 06:31 Go to next message
Eclipse UserFriend
Hey MTLer,

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.

Thx in advance
Timothy
Re: MTL and Element id [message #50824 is a reply to message #50796] Fri, 26 September 2008 07:19 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------060702060605010505070002
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

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
Re: MTL and Element id [message #50851 is a reply to message #50824] Fri, 26 September 2008 08:18 Go to previous messageGo to next message
Eclipse UserFriend
Dear Laurent,

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
Re: MTL and Element id [message #51047 is a reply to message #50851] Tue, 30 September 2008 03:50 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------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
Obeo

Timothy Marc a
Re: MTL and Element id [message #51073 is a reply to message #51047] Tue, 30 September 2008 03:57 Go to previous message
Eclipse UserFriend
Hey Laurent,

thanks again.

Timothy

"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
Previous Topic:JMerge customization
Next Topic:Extending the JET2 TagLibrary
Goto Forum:
  


Current Time: Fri May 02 05:17:47 EDT 2025

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

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

Back to the top