Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Model Integrity Article and Europa
Model Integrity Article and Europa [message #33156] Sun, 15 July 2007 01:55 Go to next message
Eclipse UserFriend
Originally posted by: jconlon.apache.org

Have been experimenting with OCL Model Integrity as described in the
http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html

article.

Was able to generate code but am getting several deprecation warnings.
For example:

Severity and Description Path Resource Location Creation Time Id
The method getImportedType() from the type GenTypedElement is
deprecated
..JETEmitters/src/org/eclipse/ocl/examples/codegen/templates /model
Class.java line 2664 1184460087662 629


Is there an updated version of the article and or the templates that is
more applicable to Europa?


thanks,
John
Re: Model Integrity Article and Europa [message #33191 is a reply to message #33156] Mon, 16 July 2007 13:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, John,

No, the edition that you referenced is the latest. This article was
developed in parallel with EMF 2.3, and this fix in particular came quite
late in the EMF release cycle.

This warning should be harmless. The deprecated API that is used continues
to work as expected with EMF models that do not employ generic types, for
any client of the GenModel API. If your model does define generic types,
then you may want to consider updating the template to use
getImportedType(GenClass), otherwise occurrences of type parameters (T, E,
etc.) may be generated into contexts where they are bound, which results in
compile errors.

Cheers,

Christian


John E. Conlon wrote:

> Have been experimenting with OCL Model Integrity as described in the
>
http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html
>
> article.
>
> Was able to generate code but am getting several deprecation warnings.
> For example:
>
> Severity and Description Path Resource Location Creation Time Id
> The method getImportedType() from the type GenTypedElement is
> deprecated
> .JETEmitters/src/org/eclipse/ocl/examples/codegen/templates/ model
> Class.java line 2664 1184460087662 629
>
>
> Is there an updated version of the article and or the templates that is
> more applicable to Europa?
>
>
> thanks,
> John
Re: Model Integrity Article and Europa [message #33226 is a reply to message #33191] Mon, 16 July 2007 15:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jconlon.apache.org

Hi Christian,

Okay will just ignore the warnings for now.

Like the idea of using OCL upfront to precisely specify business rules
and the ability of EMF to generate code based on the model/ocl. Saw bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=191689 regarding making
this a built it feature.

Is incorporating this into a future release a given? Or are there
arguments against it?

Until productization should I continue to use the
http://www.eclipse.org/ocl/examples/OCL to annotate the OCL in my ecore
files?

thanks,
John


Christian W. Damus wrote:
> Hi, John,
>
> No, the edition that you referenced is the latest. This article was
> developed in parallel with EMF 2.3, and this fix in particular came quite
> late in the EMF release cycle.
>
> This warning should be harmless. The deprecated API that is used continues
> to work as expected with EMF models that do not employ generic types, for
> any client of the GenModel API. If your model does define generic types,
> then you may want to consider updating the template to use
> getImportedType(GenClass), otherwise occurrences of type parameters (T, E,
> etc.) may be generated into contexts where they are bound, which results in
> compile errors.
>
> Cheers,
>
> Christian
>
>
> John E. Conlon wrote:
>
>> Have been experimenting with OCL Model Integrity as described in the
>>
> http://www.eclipse.org/articles/article.php?file=Article-EMF -Codegen-with-OCL/index.html
>> article.
>>
>> Was able to generate code but am getting several deprecation warnings.
>> For example:
>>
>> Severity and Description Path Resource Location Creation Time Id
>> The method getImportedType() from the type GenTypedElement is
>> deprecated
>> .JETEmitters/src/org/eclipse/ocl/examples/codegen/templates/ model
>> Class.java line 2664 1184460087662 629
>>
>>
>> Is there an updated version of the article and or the templates that is
>> more applicable to Europa?
>>
>>
>> thanks,
>> John
>
Re: Model Integrity Article and Europa [message #33298 is a reply to message #33226] Mon, 16 July 2007 15:59 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, John,

Ed and I are both keen to see this integration formalized in the EMF/MDT
code. However, there is much else to be done in both of these projects.
Also, as employees of IBM, we have priorities to attend to on that front.
So, there are no guarantees. You'll want to keep an eye out for the EMF
2.4 and MDT 1.1/OCL 1.2 development plans when they appear.

There is a good deal of interest in this feature from the community, so you
can help yourself best by working on this to contribute it. Start with a
design proposal that we can review, then get cracking on patches!

Concerning the annotations used by the article: I specifically used an
"examples" namespace to ensure that this would be used as a guide or
starting point to help a reader develop a robust solution for himself. It
really is an adjunct to the SDK examples and, as such, does not purport to
be a definitive solution or to interoperate with any other solutions
implemented in other applications. Especially if you intend to customize
the templates for yourself (as there are probably scenarii unaccounted for
or capabilities missing in the article), you might rather define your own
namespace to avoid confusion.

Cheers,

Christian


John E. Conlon wrote:

> Hi Christian,
>
> Okay will just ignore the warnings for now.
>
> Like the idea of using OCL upfront to precisely specify business rules
> and the ability of EMF to generate code based on the model/ocl. Saw bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=191689 regarding making
> this a built it feature.
>
> Is incorporating this into a future release a given? Or are there
> arguments against it?
>
> Until productization should I continue to use the
> http://www.eclipse.org/ocl/examples/OCL to annotate the OCL in my ecore
> files?
>
> thanks,
> John

<snip>
Previous Topic:modeling object creation action
Next Topic:helper definition within the OCL console
Goto Forum:
  


Current Time: Fri Mar 29 14:28:58 GMT 2024

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

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

Back to the top