Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » UML2 & OCL version compatibility
UML2 & OCL version compatibility [message #476537] Wed, 14 November 2007 11:46 Go to next message
Ted Poole is currently offline Ted PooleFriend
Messages: 10
Registered: July 2009
Junior Member
I'm using the UML2 code generation off my ecore (because of all the
extras like derived unions, subsets, ocl etc), and I would like to
provide an OCL expression as the implementation of a query method.

In my ecore, I have created an EAnnotation on my EOperation, and set the
'source' to "http://www.eclipse.org/uml2/1.1.0/GenModel". I then create
a DetailsEntry in the EAnnotation with 'key' = "body" and
'value'="result = <my ocl expression>".

When I generate the model code, I do get a body generated for the
operation which seems to be using the OCL api to execute my OCL
expression - as expected.

The problem is that the generated code doesn't compile because it seems
t be using an OCL API that doesn't match up with what I have installed.

I've installed the latest releases of UML2 (2.1.1) and OCL (1.1.1) but
still I have the problem. Is the UML2 codegen producing code that calls
onto an older version of the OCL API?

Cheers,
Ted Poole
Re: UML2 & OCL version compatibility [message #476540 is a reply to message #476537] Wed, 14 November 2007 15:06 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Could you raise a bugzilla on that and I will look into it ASAP. As you
mention, there might be some compatibility problems between the various
OCL/UML versions.

Cheers,
- James.


"Ted Poole" <ted.poole@prismtech.com> wrote in message
news:fhen7t$qjn$1@build.eclipse.org...
>
> I'm using the UML2 code generation off my ecore (because of all the extras
> like derived unions, subsets, ocl etc), and I would like to provide an OCL
> expression as the implementation of a query method.
>
> In my ecore, I have created an EAnnotation on my EOperation, and set the
> 'source' to "http://www.eclipse.org/uml2/1.1.0/GenModel". I then create a
> DetailsEntry in the EAnnotation with 'key' = "body" and 'value'="result =
> <my ocl expression>".
>
> When I generate the model code, I do get a body generated for the
> operation which seems to be using the OCL api to execute my OCL
> expression - as expected.
>
> The problem is that the generated code doesn't compile because it seems t
> be using an OCL API that doesn't match up with what I have installed.
>
> I've installed the latest releases of UML2 (2.1.1) and OCL (1.1.1) but
> still I have the problem. Is the UML2 codegen producing code that calls
> onto an older version of the OCL API?
>
> Cheers,
> Ted Poole
Re: UML2 & OCL version compatibility [message #476630 is a reply to message #476537] Thu, 15 November 2007 13:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Ted,

Do you have the MDT OCL run-time installed in your PDE target, or just in
your development workbench configuration? What error messages are you
seeing? Do you see, for example, unresolved dependency errors in your
bundle manifest?

Another thing to consider is that EMF/UML2 will not regenerate the bundle
manifests (MANIFEST.MF, plugin.xml) -- at least, so I think I understand
from similar discussions in the EMF newsgroup. So, if you previously
generated your API and subsequently re-generated with OCL, then your
MANIFEST.MF will not have been augmented with the org.eclipse.ocl*
dependencies required. Try deleting your MANIFEST.MF and generating again.

HTH,

Christian


Ted Poole wrote:

>
> I'm using the UML2 code generation off my ecore (because of all the
> extras like derived unions, subsets, ocl etc), and I would like to
> provide an OCL expression as the implementation of a query method.
>
> In my ecore, I have created an EAnnotation on my EOperation, and set the
> 'source' to "http://www.eclipse.org/uml2/1.1.0/GenModel". I then create
> a DetailsEntry in the EAnnotation with 'key' = "body" and
> 'value'="result = <my ocl expression>".
>
> When I generate the model code, I do get a body generated for the
> operation which seems to be using the OCL api to execute my OCL
> expression - as expected.
>
> The problem is that the generated code doesn't compile because it seems
> t be using an OCL API that doesn't match up with what I have installed.
>
> I've installed the latest releases of UML2 (2.1.1) and OCL (1.1.1) but
> still I have the problem. Is the UML2 codegen producing code that calls
> onto an older version of the OCL API?
>
> Cheers,
> Ted Poole
Re: UML2 & OCL version compatibility [message #476639 is a reply to message #476630] Fri, 16 November 2007 15:16 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Ted, Christian,

I just tried with all the latest M3 bits and everything works fine. As
Christian suggested, it could be that your manifest was not modified since
you may have previously started out with one or it could be that for your
body operation the return type wasn not Boolean.

If you are still having issues, please retry with M3.

Cheers,
- James.


"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fhhglj$o33$1@build.eclipse.org...
> Hi, Ted,
>
> Do you have the MDT OCL run-time installed in your PDE target, or just in
> your development workbench configuration? What error messages are you
> seeing? Do you see, for example, unresolved dependency errors in your
> bundle manifest?
>
> Another thing to consider is that EMF/UML2 will not regenerate the bundle
> manifests (MANIFEST.MF, plugin.xml) -- at least, so I think I understand
> from similar discussions in the EMF newsgroup. So, if you previously
> generated your API and subsequently re-generated with OCL, then your
> MANIFEST.MF will not have been augmented with the org.eclipse.ocl*
> dependencies required. Try deleting your MANIFEST.MF and generating
> again.
>
> HTH,
>
> Christian
>
>
> Ted Poole wrote:
>
>>
>> I'm using the UML2 code generation off my ecore (because of all the
>> extras like derived unions, subsets, ocl etc), and I would like to
>> provide an OCL expression as the implementation of a query method.
>>
>> In my ecore, I have created an EAnnotation on my EOperation, and set the
>> 'source' to "http://www.eclipse.org/uml2/1.1.0/GenModel". I then create
>> a DetailsEntry in the EAnnotation with 'key' = "body" and
>> 'value'="result = <my ocl expression>".
>>
>> When I generate the model code, I do get a body generated for the
>> operation which seems to be using the OCL api to execute my OCL
>> expression - as expected.
>>
>> The problem is that the generated code doesn't compile because it seems
>> t be using an OCL API that doesn't match up with what I have installed.
>>
>> I've installed the latest releases of UML2 (2.1.1) and OCL (1.1.1) but
>> still I have the problem. Is the UML2 codegen producing code that calls
>> onto an older version of the OCL API?
>>
>> Cheers,
>> Ted Poole
>
>
Re: UML2 & OCL version compatibility [message #625462 is a reply to message #476537] Wed, 14 November 2007 15:06 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Could you raise a bugzilla on that and I will look into it ASAP. As you
mention, there might be some compatibility problems between the various
OCL/UML versions.

Cheers,
- James.


"Ted Poole" <ted.poole@prismtech.com> wrote in message
news:fhen7t$qjn$1@build.eclipse.org...
>
> I'm using the UML2 code generation off my ecore (because of all the extras
> like derived unions, subsets, ocl etc), and I would like to provide an OCL
> expression as the implementation of a query method.
>
> In my ecore, I have created an EAnnotation on my EOperation, and set the
> 'source' to "http://www.eclipse.org/uml2/1.1.0/GenModel". I then create a
> DetailsEntry in the EAnnotation with 'key' = "body" and 'value'="result =
> <my ocl expression>".
>
> When I generate the model code, I do get a body generated for the
> operation which seems to be using the OCL api to execute my OCL
> expression - as expected.
>
> The problem is that the generated code doesn't compile because it seems t
> be using an OCL API that doesn't match up with what I have installed.
>
> I've installed the latest releases of UML2 (2.1.1) and OCL (1.1.1) but
> still I have the problem. Is the UML2 codegen producing code that calls
> onto an older version of the OCL API?
>
> Cheers,
> Ted Poole
Re: UML2 & OCL version compatibility [message #625468 is a reply to message #476537] Thu, 15 November 2007 13:13 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Ted,

Do you have the MDT OCL run-time installed in your PDE target, or just in
your development workbench configuration? What error messages are you
seeing? Do you see, for example, unresolved dependency errors in your
bundle manifest?

Another thing to consider is that EMF/UML2 will not regenerate the bundle
manifests (MANIFEST.MF, plugin.xml) -- at least, so I think I understand
from similar discussions in the EMF newsgroup. So, if you previously
generated your API and subsequently re-generated with OCL, then your
MANIFEST.MF will not have been augmented with the org.eclipse.ocl*
dependencies required. Try deleting your MANIFEST.MF and generating again.

HTH,

Christian


Ted Poole wrote:

>
> I'm using the UML2 code generation off my ecore (because of all the
> extras like derived unions, subsets, ocl etc), and I would like to
> provide an OCL expression as the implementation of a query method.
>
> In my ecore, I have created an EAnnotation on my EOperation, and set the
> 'source' to "http://www.eclipse.org/uml2/1.1.0/GenModel". I then create
> a DetailsEntry in the EAnnotation with 'key' = "body" and
> 'value'="result = <my ocl expression>".
>
> When I generate the model code, I do get a body generated for the
> operation which seems to be using the OCL api to execute my OCL
> expression - as expected.
>
> The problem is that the generated code doesn't compile because it seems
> t be using an OCL API that doesn't match up with what I have installed.
>
> I've installed the latest releases of UML2 (2.1.1) and OCL (1.1.1) but
> still I have the problem. Is the UML2 codegen producing code that calls
> onto an older version of the OCL API?
>
> Cheers,
> Ted Poole
Re: UML2 & OCL version compatibility [message #625531 is a reply to message #476630] Fri, 16 November 2007 15:16 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Ted, Christian,

I just tried with all the latest M3 bits and everything works fine. As
Christian suggested, it could be that your manifest was not modified since
you may have previously started out with one or it could be that for your
body operation the return type wasn not Boolean.

If you are still having issues, please retry with M3.

Cheers,
- James.


"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fhhglj$o33$1@build.eclipse.org...
> Hi, Ted,
>
> Do you have the MDT OCL run-time installed in your PDE target, or just in
> your development workbench configuration? What error messages are you
> seeing? Do you see, for example, unresolved dependency errors in your
> bundle manifest?
>
> Another thing to consider is that EMF/UML2 will not regenerate the bundle
> manifests (MANIFEST.MF, plugin.xml) -- at least, so I think I understand
> from similar discussions in the EMF newsgroup. So, if you previously
> generated your API and subsequently re-generated with OCL, then your
> MANIFEST.MF will not have been augmented with the org.eclipse.ocl*
> dependencies required. Try deleting your MANIFEST.MF and generating
> again.
>
> HTH,
>
> Christian
>
>
> Ted Poole wrote:
>
>>
>> I'm using the UML2 code generation off my ecore (because of all the
>> extras like derived unions, subsets, ocl etc), and I would like to
>> provide an OCL expression as the implementation of a query method.
>>
>> In my ecore, I have created an EAnnotation on my EOperation, and set the
>> 'source' to "http://www.eclipse.org/uml2/1.1.0/GenModel". I then create
>> a DetailsEntry in the EAnnotation with 'key' = "body" and
>> 'value'="result = <my ocl expression>".
>>
>> When I generate the model code, I do get a body generated for the
>> operation which seems to be using the OCL api to execute my OCL
>> expression - as expected.
>>
>> The problem is that the generated code doesn't compile because it seems
>> t be using an OCL API that doesn't match up with what I have installed.
>>
>> I've installed the latest releases of UML2 (2.1.1) and OCL (1.1.1) but
>> still I have the problem. Is the UML2 codegen producing code that calls
>> onto an older version of the OCL API?
>>
>> Cheers,
>> Ted Poole
>
>
Previous Topic:Generalization of an Aggregation
Next Topic:Removal of unavailable profiles
Goto Forum:
  


Current Time: Thu Mar 28 12:50:31 GMT 2024

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

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

Back to the top