[ATL]How to get the element type by the element's attribute? [message #87797] |
Thu, 07 August 2008 21:44 |
Eclipse User |
|
|
|
Originally posted by: zhuangguotao.hotmail.com
Hello, experts,
I want to ask to how to get the element type by the element's attribute?
for example,
<ElementA name="a1">
How to write a helper to get the element type which is ElementA by the
value of the name attribute.
Even, how to write a helper to execute the ElementA's helper based on the
value of the name attribute?
Best regards.
Zhuang
|
|
|
|
|
|
Re: [ATL]How to get the element type by the element's attribute? [message #87960 is a reply to message #87946] |
Sat, 09 August 2008 13:25 |
Eclipse User |
|
|
|
Originally posted by: zhuangguotao.hotmail.com
Thanks a lot for your attention. :)
some element relates other elements with attribute, like name.
I want to get the element instance by the attribute value string of the
element, and then execute the heleper of the getted element.
If is it possible? It seems like reflect in the java.
Now, I only know one simple way which traversals all the element to find
the element by the attribute value. Its efficent is very slow. I want to
try the better and more correct method.
thanks.
best regards.
Zhuang
|
|
|
|
Re: [ATL]How to get the element type by the element's attribute? [message #88824 is a reply to message #88099] |
Sat, 23 August 2008 09:35 |
Eclipse User |
|
|
|
Originally posted by: zhuangguotao.hotmail.com
Thanks a lot for your atttention.
I want to ask two questions:
1. is the getRefValue the function of ATL? if can I directly use it in ATL?
2. Can you tell me the theory about this sentence?
features : "%EMF"!EStructuralFeature <-
c.oclType().eStructuralFeatures->union(t.eSuperTypes->collect(st |
thisModule.allFeatures(st))->flatten()->asSet());
what mean is the %EMF, c, t?
Could you give me a sample about the usage about the reflection like your
description. Thanks a lot.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04090 seconds