Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Class with any operation with more of one parameter(Class with any operation with more of one parameter)
Class with any operation with more of one parameter [message #639642] Wed, 17 November 2010 10:23 Go to next message
olafo987  is currently offline olafo987 Friend
Messages: 13
Registered: November 2010
Junior Member
Hi

How I can determine if one Class have some operation with more of one parameter?.

if in my model UML I have the following classes:

ContractService
public delecteContract(pContract : Contract, pCustomer costumer) : Contract
______

TypeContractservice
addTypeContr(pTypeContract : TypeContract) : TypeContract
deleteTypeCont(pTypeContract : TypeContract) : TypeContract
_____

I should find only ContractService

Thanks
Re: Class with any operation with more of one parameter [message #639669 is a reply to message #639642] Wed, 17 November 2010 12:15 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070602010404020307080104
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

Please prefix your post subjects with the name of the tool you're using.
Is that XPand, Acceleo, Jet? Your message doesn't mention any hint
towards this.

If you're using Acceleo, you could use the following (starting from a
package):
[package.packagedElements->filter(Class)->select(ownedOperations- >select(parameters->size()
> 1)->notEmpty())/]

There are less convoluted means depending on where exactly you wish to
filter these classes, but that's the whole thing.

Laurent Goubet
Obeo

On 17/11/2010 11:23, olafo987 wrote:
> Hi
>
> How I can determine if one Class have some operation with more of one
> parameter?.
> if in my model UML I have the following classes:
>
> ContractService
> public delecteContract(pContract : Contract, pCustomer costumer) : Contract
> ______
>
> TypeContractservice
> addTypeContr(pTypeContract : TypeContract) : TypeContract
> deleteTypeCont(pTypeContract : TypeContract) : TypeContract
> _____
>
> I should find only ContractService
>
> Thanks


--------------070602010404020307080104
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------070602010404020307080104--
Re: Class with any operation with more of one parameter [message #640337 is a reply to message #639642] Sat, 20 November 2010 20:00 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7679
Registered: July 2009
Senior Member
Hi

In OCL as in many other things you proceed in stages

First select all relevant classes; allInstances if you don't have
anything better,
the select all operations
then count parameters
then compare the count with 1

Regards

Ed Willink


On 17/11/2010 10:23, olafo987 wrote:
> Hi
>
> How I can determine if one Class have some operation with more of one
> parameter?.
> if in my model UML I have the following classes:
>
> ContractService
> public delecteContract(pContract : Contract, pCustomer costumer) :
> Contract
> ______
>
> TypeContractservice
> addTypeContr(pTypeContract : TypeContract) : TypeContract
> deleteTypeCont(pTypeContract : TypeContract) : TypeContract
> _____
>
> I should find only ContractService
>
> Thanks
Previous Topic:[Acceleo 3 - ocl] a "loop" question
Next Topic:[Acceleo 3] Iteration over the types of a model
Goto Forum:
  


Current Time: Sat Nov 09 03:22:37 GMT 2024

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

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

Back to the top