Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 277661 - Check whether EMF-generated code in OCL is aligned with the latest EMF templates
Summary: Check whether EMF-generated code in OCL is aligned with the latest EMF templates
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 1.3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.3.0   Edit
Assignee: Alexander Igdalov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 277773
Blocks: 207365
  Show dependency tree
 
Reported: 2009-05-25 06:08 EDT by Alexander Igdalov CLA
Modified: 2011-05-27 02:47 EDT (History)
1 user (show)

See Also:
Kenn.Hussey: pmc_approved+


Attachments
OCL models generated with EMF 2.5.0 RC1 (721.46 KB, patch)
2009-05-25 11:02 EDT, Alexander Igdalov CLA
no flags Details | Diff
Updated version of MDT OCL models generated with EMF 2.5.0 RC1 (55.72 KB, patch)
2009-05-25 20:02 EDT, Alexander Igdalov CLA
no flags Details | Diff
MDT OCL models generated with EMF 2.5.0 RC1 (46.68 KB, patch)
2009-05-26 11:49 EDT, Alexander Igdalov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Igdalov CLA 2009-05-25 06:08:21 EDT
Check whether EMF-generated code in OCL sources has been generated with the latest EMF templates. If not - check whether it is worth to regenerate it.
Comment 1 Alexander Igdalov CLA 2009-05-25 06:21:38 EDT
Having regenerated the EMF model code in OCL, I found that the OCL source code is NOT generated using the latest EMF templates. However, the differences are mostly unimportant such as copyright notices, comments, optimized deprecated method calls, etc.
The most significant deviation is in method org.eclipse.ocl.ecore.impl.EcorePackageImpl.init() which according to the latest EMF templates proposes a slightly different way to operate with EPackage.Registry.INSTANCE. Despite this, I do not think the OCL model code needs regeneration.
Comment 2 Alexander Igdalov CLA 2009-05-25 11:02:30 EDT
Created attachment 137016 [details]
OCL models generated with EMF 2.5.0 RC1
Comment 3 Kenn Hussey CLA 2009-05-25 13:51:52 EDT
Alex, did you regenerate the code for all of the metamodels in OCL? As I understand it, there should be 4 of them - 1 CST and 3 AST models.

I personally think this should be done for this release, per the plan item (see bug 207365).
Comment 4 Alexander Igdalov CLA 2009-05-25 15:45:38 EDT
(In reply to comment #3)
> Alex, did you regenerate the code for all of the metamodels in OCL? As I
> understand it, there should be 4 of them - 1 CST and 3 AST models.
> 

Kenn, I regenerated 4 models for the new OCL as well as the AST metamodel for legacy OCL (in org.eclipse.emf.ocl).
> I personally think this should be done for this release, per the plan item (see
> bug 207365).
> 

Ok, then I will re-check the changes and soon commit them.
Comment 5 Alexander Igdalov CLA 2009-05-25 20:02:02 EDT
Created attachment 137091 [details]
Updated version of MDT OCL models generated with EMF 2.5.0 RC1

In this patch org.eclipse.emf.ocl AST model was not regenerated since
a) the changes are not important
b) the regenerated version is binary incompatible with RC1 because of omitting of copyright fields

Kenn, can we leave org.eclipse.emf.ocl as is in Galileo considering the items above?
Comment 6 Kenn Hussey CLA 2009-05-25 23:14:28 EDT
(In reply to comment #5)
> Kenn, can we leave org.eclipse.emf.ocl as is in Galileo considering the items
> above?
> 

I suppose so... but I don't know why those fields were even there in the first place (seeing as they're empty).
Comment 7 Alexander Igdalov CLA 2009-05-26 11:49:18 EDT
Created attachment 137177 [details]
MDT OCL models generated with EMF 2.5.0 RC1

1) The o.e.emf.ocl model was not regenerated. Christian's advice on this: "Oh, don't bother to regenerate this code.  The entire plug-in has been deprecated for three years, now.  I don't think it is worth doing anything to it unless the JUnit tests actually fail on the latest EMF builds."
2) Custom JET templates synchronized with the ones in EMF 2.5.0 RC1
3) Post-generation manual code update performed in .Switch and .AdapterFactory classes in accordance with Christian's instructions.
Comment 8 Alexander Igdalov CLA 2009-05-26 16:10:53 EDT
Fixed.
Comment 9 Ed Willink CLA 2011-05-27 02:47:12 EDT
Closing after over 18 months in resolved state.