Community
Participate
Working Groups
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.
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.
Created attachment 137016 [details] OCL models generated with EMF 2.5.0 RC1
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).
(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.
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?
(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).
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.
Fixed.
Closing after over 18 months in resolved state.