From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4c17e6ae73bd8c51 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!m15g2000yqm.googlegroups.com!not-for-mail From: Matteo Bordin Newsgroups: comp.lang.ada Subject: Re: Ada and UML Date: Mon, 6 Sep 2010 02:21:43 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4c7f5735$0$6766$9b4e6d93@newsspool3.arcor-online.net> <156c1bf7-8744-43a0-b620-017244d4763d@k17g2000prf.googlegroups.com> <1ae9ef14-22a1-447a-836b-9db185439a85@h37g2000pro.googlegroups.com> NNTP-Posting-Host: 212.99.106.125 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1283764903 16224 127.0.0.1 (6 Sep 2010 09:21:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 6 Sep 2010 09:21:43 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m15g2000yqm.googlegroups.com; posting-host=212.99.106.125; posting-account=0fK-ZgoAAACswzEJSZ3LA9AZ4FnRU7mX User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:13957 Date: 2010-09-06T02:21:43-07:00 List-Id: > That was because I first get into trouble with version 3, now it is solve= d. > > To not give erroneous picture, here is the same with the relevant version= . =A0 > Indeed, this is different. Still did not found a way to have a nicer =A0 > output (I did the best, but still not nice). Why don't you simply post process files with gnat pretty after generation? > > Transormation: > A few comments, but you should go on the Acceleo web site for this: > [for (p : Parameter | o.eAllContents(Parameter))] This is highly un-optimized: you are looping over all elements contained in an uml::Operation and checking for each of them if their metatype is a (subtype of) uml::Parameter. What you really want to do is: [for (p : Paramenter | o.ownedParameter)] that is, using the UML metamodel as a sort of grammar. The same applies for looping over operations from a Class (ownedOperation) and so on Also note that Acceleo has a separator facility to separate the printing of the elements of a sequence with a string but on the last position (useful to print the ";" after all parameters but the last one).