Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Atl problem, please help~~~~
Atl problem, please help~~~~ [message #76701] Thu, 13 March 2008 14:39 Go to next message
Eclipse UserFriend
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 #76847 is a reply to message #76701] Mon, 17 March 2008 17:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: quentin.glineur.obeo.fr

This is a multi-part message in MIME format.
--------------090405020508020207010508
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

ATL does not implement OCL shortcut for navigation, i.e. when you access
a multi-valuated feature, you cannot navigate directly through another
feature: you must explicit a collect statement.

HTH

Quentin

hitwish a
Re: [ATL] problem, please help~~~~ [message #76863 is a reply to message #76847] Mon, 17 March 2008 17:38 Go to previous message
Eclipse UserFriend
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
Previous Topic:[ATL] AtlEMFModelHandler: How to change the encoding
Next Topic:[atl]
Goto Forum:
  


Current Time: Sat Nov 23 02:33:35 GMT 2019

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

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

Back to the top