Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » body code for operations
body code for operations [message #472820] Fri, 27 April 2007 17:07 Go to next message
Pradeep is currently offline PradeepFriend
Messages: 61
Registered: July 2009
Member
I have several one liners as my body code. I would like to add this code to
the model. I read that there is some option(Annotation) in Rose. Is there
any similar option in UML2 framework.

Thanks
Pradeep
Re: body code for operations [message #472823 is a reply to message #472820] Sat, 28 April 2007 01:13 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Pradeep,

On an operation, you can create a "Body Condition". It's of type
Constraint. Then on that Constraint you can set the specification to an
Opaque Expression. Set the Language to "Java" and the body to whatever
java code you want. When you convert that to ecore and then to code, you
should see that java in the resulting body of the operation.

After this iteration you will be able to specify OCL constraints in this
manner and they will be evaluated.

Regards,

- James.


"Pradeep" <pradeep@live.com> wrote in message
news:f0takl$f12$1@build.eclipse.org...
>I have several one liners as my body code. I would like to add this code to
>the model. I read that there is some option(Annotation) in Rose. Is there
>any similar option in UML2 framework.
>
> Thanks
> Pradeep
>
>
Re: body code for operations [message #472826 is a reply to message #472823] Sat, 28 April 2007 05:22 Go to previous messageGo to next message
Pradeep is currently offline PradeepFriend
Messages: 61
Registered: July 2009
Member
Thanks a lot James. This is exactly what I needed. One more question if you
don't mind.
EMF is genering all my code once again in the comment tag. How to supress
that?

Thanks
Pradeep

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:f0u6v3$s56$1@build.eclipse.org...
> Hi Pradeep,
>
> On an operation, you can create a "Body Condition". It's of type
> Constraint. Then on that Constraint you can set the specification to an
> Opaque Expression. Set the Language to "Java" and the body to whatever
> java code you want. When you convert that to ecore and then to code, you
> should see that java in the resulting body of the operation.
>
> After this iteration you will be able to specify OCL constraints in this
> manner and they will be evaluated.
>
> Regards,
>
> - James.
>
>
> "Pradeep" <pradeep@live.com> wrote in message
> news:f0takl$f12$1@build.eclipse.org...
>>I have several one liners as my body code. I would like to add this code
>>to the model. I read that there is some option(Annotation) in Rose. Is
>>there any similar option in UML2 framework.
>>
>> Thanks
>> Pradeep
>>
>>
>
>
Re: body code for operations [message #472838 is a reply to message #472826] Mon, 30 April 2007 19:39 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Pradeep,

I've just committed a change that should address your issue - look for it in
this week's build.

Kenn

"Pradeep" <pradeep@live.com> wrote in message
news:f0unfo$6c5$1@build.eclipse.org...
> Thanks a lot James. This is exactly what I needed. One more question if
> you don't mind.
> EMF is genering all my code once again in the comment tag. How to supress
> that?
>
> Thanks
> Pradeep
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:f0u6v3$s56$1@build.eclipse.org...
>> Hi Pradeep,
>>
>> On an operation, you can create a "Body Condition". It's of type
>> Constraint. Then on that Constraint you can set the specification to an
>> Opaque Expression. Set the Language to "Java" and the body to whatever
>> java code you want. When you convert that to ecore and then to code,
>> you should see that java in the resulting body of the operation.
>>
>> After this iteration you will be able to specify OCL constraints in this
>> manner and they will be evaluated.
>>
>> Regards,
>>
>> - James.
>>
>>
>> "Pradeep" <pradeep@live.com> wrote in message
>> news:f0takl$f12$1@build.eclipse.org...
>>>I have several one liners as my body code. I would like to add this code
>>>to the model. I read that there is some option(Annotation) in Rose. Is
>>>there any similar option in UML2 framework.
>>>
>>> Thanks
>>> Pradeep
>>>
>>>
>>
>>
>
>
Re: body code for operations [message #472840 is a reply to message #472838] Mon, 30 April 2007 21:22 Go to previous message
Pradeep is currently offline PradeepFriend
Messages: 61
Registered: July 2009
Member
Thanks Kenn.

"Kenn Hussey" <khussey@ca.ibm.com> wrote in message
news:f15gl9$4ob$1@build.eclipse.org...
> Pradeep,
>
> I've just committed a change that should address your issue - look for it
> in this week's build.
>
> Kenn
>
> "Pradeep" <pradeep@live.com> wrote in message
> news:f0unfo$6c5$1@build.eclipse.org...
>> Thanks a lot James. This is exactly what I needed. One more question if
>> you don't mind.
>> EMF is genering all my code once again in the comment tag. How to supress
>> that?
>>
>> Thanks
>> Pradeep
>>
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:f0u6v3$s56$1@build.eclipse.org...
>>> Hi Pradeep,
>>>
>>> On an operation, you can create a "Body Condition". It's of type
>>> Constraint. Then on that Constraint you can set the specification to an
>>> Opaque Expression. Set the Language to "Java" and the body to whatever
>>> java code you want. When you convert that to ecore and then to code,
>>> you should see that java in the resulting body of the operation.
>>>
>>> After this iteration you will be able to specify OCL constraints in this
>>> manner and they will be evaluated.
>>>
>>> Regards,
>>>
>>> - James.
>>>
>>>
>>> "Pradeep" <pradeep@live.com> wrote in message
>>> news:f0takl$f12$1@build.eclipse.org...
>>>>I have several one liners as my body code. I would like to add this code
>>>>to the model. I read that there is some option(Annotation) in Rose. Is
>>>>there any similar option in UML2 framework.
>>>>
>>>> Thanks
>>>> Pradeep
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: body code for operations [message #613749 is a reply to message #472820] Sat, 28 April 2007 01:13 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Pradeep,

On an operation, you can create a "Body Condition". It's of type
Constraint. Then on that Constraint you can set the specification to an
Opaque Expression. Set the Language to "Java" and the body to whatever
java code you want. When you convert that to ecore and then to code, you
should see that java in the resulting body of the operation.

After this iteration you will be able to specify OCL constraints in this
manner and they will be evaluated.

Regards,

- James.


"Pradeep" <pradeep@live.com> wrote in message
news:f0takl$f12$1@build.eclipse.org...
>I have several one liners as my body code. I would like to add this code to
>the model. I read that there is some option(Annotation) in Rose. Is there
>any similar option in UML2 framework.
>
> Thanks
> Pradeep
>
>
Re: body code for operations [message #613755 is a reply to message #472823] Sat, 28 April 2007 05:22 Go to previous message
Pradeep is currently offline PradeepFriend
Messages: 61
Registered: July 2009
Member
Thanks a lot James. This is exactly what I needed. One more question if you
don't mind.
EMF is genering all my code once again in the comment tag. How to supress
that?

Thanks
Pradeep

"James Bruck" <jbruck@ca.ibm.com> wrote in message
news:f0u6v3$s56$1@build.eclipse.org...
> Hi Pradeep,
>
> On an operation, you can create a "Body Condition". It's of type
> Constraint. Then on that Constraint you can set the specification to an
> Opaque Expression. Set the Language to "Java" and the body to whatever
> java code you want. When you convert that to ecore and then to code, you
> should see that java in the resulting body of the operation.
>
> After this iteration you will be able to specify OCL constraints in this
> manner and they will be evaluated.
>
> Regards,
>
> - James.
>
>
> "Pradeep" <pradeep@live.com> wrote in message
> news:f0takl$f12$1@build.eclipse.org...
>>I have several one liners as my body code. I would like to add this code
>>to the model. I read that there is some option(Annotation) in Rose. Is
>>there any similar option in UML2 framework.
>>
>> Thanks
>> Pradeep
>>
>>
>
>
Re: body code for operations [message #614245 is a reply to message #472826] Mon, 30 April 2007 19:39 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Pradeep,

I've just committed a change that should address your issue - look for it in
this week's build.

Kenn

"Pradeep" <pradeep@live.com> wrote in message
news:f0unfo$6c5$1@build.eclipse.org...
> Thanks a lot James. This is exactly what I needed. One more question if
> you don't mind.
> EMF is genering all my code once again in the comment tag. How to supress
> that?
>
> Thanks
> Pradeep
>
> "James Bruck" <jbruck@ca.ibm.com> wrote in message
> news:f0u6v3$s56$1@build.eclipse.org...
>> Hi Pradeep,
>>
>> On an operation, you can create a "Body Condition". It's of type
>> Constraint. Then on that Constraint you can set the specification to an
>> Opaque Expression. Set the Language to "Java" and the body to whatever
>> java code you want. When you convert that to ecore and then to code,
>> you should see that java in the resulting body of the operation.
>>
>> After this iteration you will be able to specify OCL constraints in this
>> manner and they will be evaluated.
>>
>> Regards,
>>
>> - James.
>>
>>
>> "Pradeep" <pradeep@live.com> wrote in message
>> news:f0takl$f12$1@build.eclipse.org...
>>>I have several one liners as my body code. I would like to add this code
>>>to the model. I read that there is some option(Annotation) in Rose. Is
>>>there any similar option in UML2 framework.
>>>
>>> Thanks
>>> Pradeep
>>>
>>>
>>
>>
>
>
Re: body code for operations [message #614249 is a reply to message #472838] Mon, 30 April 2007 21:22 Go to previous message
Pradeep is currently offline PradeepFriend
Messages: 61
Registered: July 2009
Member
Thanks Kenn.

"Kenn Hussey" <khussey@ca.ibm.com> wrote in message
news:f15gl9$4ob$1@build.eclipse.org...
> Pradeep,
>
> I've just committed a change that should address your issue - look for it
> in this week's build.
>
> Kenn
>
> "Pradeep" <pradeep@live.com> wrote in message
> news:f0unfo$6c5$1@build.eclipse.org...
>> Thanks a lot James. This is exactly what I needed. One more question if
>> you don't mind.
>> EMF is genering all my code once again in the comment tag. How to supress
>> that?
>>
>> Thanks
>> Pradeep
>>
>> "James Bruck" <jbruck@ca.ibm.com> wrote in message
>> news:f0u6v3$s56$1@build.eclipse.org...
>>> Hi Pradeep,
>>>
>>> On an operation, you can create a "Body Condition". It's of type
>>> Constraint. Then on that Constraint you can set the specification to an
>>> Opaque Expression. Set the Language to "Java" and the body to whatever
>>> java code you want. When you convert that to ecore and then to code,
>>> you should see that java in the resulting body of the operation.
>>>
>>> After this iteration you will be able to specify OCL constraints in this
>>> manner and they will be evaluated.
>>>
>>> Regards,
>>>
>>> - James.
>>>
>>>
>>> "Pradeep" <pradeep@live.com> wrote in message
>>> news:f0takl$f12$1@build.eclipse.org...
>>>>I have several one liners as my body code. I would like to add this code
>>>>to the model. I read that there is some option(Annotation) in Rose. Is
>>>>there any similar option in UML2 framework.
>>>>
>>>> Thanks
>>>> Pradeep
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Previous Topic:Re: ecore metamodel from an existing
Next Topic:Re: ecore metamodel from an existing
Goto Forum:
  


Current Time: Fri Apr 19 10:24:47 GMT 2024

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

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

Back to the top