Atl problem, please help~~~~ [message #76701] |
Thu, 13 March 2008 10:39  |
Eclipse User |
|
|
|
Originally posted by: hitwish.hotmail.com
I am also new here.
What I want to do is just simple, I wanna map two elements from two
different matamodels. But I find there is some technical problem I can not
figure.
The code is as follows:
helper context UPMS!Participant def : isRequisitions() :
OrderedSet(UPMS!NamedElement)=
self.requisitions.provided -> iterate( child ; elements :
OrderedSet(UPMS!NamedElement) =
OrderedSet{} |
if child.oclIsTypeOf(UPMS!Participant) then
elements.append(child)
else
elements.append(child)
endif
)
;
I just want to try the function, but it doesn't work. The Console says
that:
: ****** BEGIN Stack Trace
: message: ERROR: Collections do not have properties, use ->collect()
: A.main() : ??#28 null
: local variables = {self=UPMS2JEE : ASMModule}
: local stack = []
: A.__matcher__() : ??#1 null
: local variables = {self=UPMS2JEE : ASMModule}
: local stack = []
: A.__matchParticipant2Package() : ??#43 87:17-87:35
: local variables = {self=UPMS2JEE : ASMModule, s=IN! Customer}
: local stack = [TransientLinkSet {}, TransientLink {rule =
'Participant2Package', sourceElements = {s = IN! Customer}, targetElements
= {t1 = OUT!<notnamedyet>}, variables = {}}, TransientLink {rule =
'Participant2Package', sourceElements = {s = IN! Customer}, targetElements
= {t1 = OUT!<notnamedyet>}, variables = {}}, 't2', Sequence {}]
: MUPMS!Participant;.isRequisitions() : ??#6 27:3-27:29
: local variables = {self=IN! Customer, elements=OrderedSet {}}
: local stack = []
: ****** END Stack Trace
The collection has some problems. But I really don't know how to fix it.
Another is, How to read indirect elements that in the source model?
I mean: if metamodel file(ecore file uses xml view) is as below:
NameElement
--name:EString
Participant->NameElement
--service:ProvidedService
ProvidedService->Port
Port->NameElement
--provided:Interface
Interface->NameElement
If I have got one Participant, how can I get the Interface related with
this Participant??
Please help me ~~~~~~~~~
|
|
|
|
Re: [ATL] problem, please help~~~~ [message #76863 is a reply to message #76847] |
Mon, 17 March 2008 13:38  |
Eclipse User |
|
|
|
Originally posted by: quentin.glineur.obeo.fr
This is a multi-part message in MIME format.
--------------010703020105070706060405
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
With [ATL] subject prefix
Quentin Glineur a
|
|
|
Powered by
FUDForum. Page generated in 0.28977 seconds