Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325566 - GenModel.runtimeVersion="2.4" with Ecore::constraints results in XxxValidator compiler errors
Summary: GenModel.runtimeVersion="2.4" with Ecore::constraints results in XxxValidator...
Status: CLOSED DUPLICATE of bug 324207
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.6.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 06:24 EDT by Adrian Price CLA
Modified: 2010-09-17 12:15 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Price CLA 2010-09-17 06:24:54 EDT
Build Identifier: 2.6.0.v20100614-1136

The generated code won't compile if the ecore model contains any Ecore EAnnotations with constraints -> ..., on account of the generator having emitted calls to EMF-2.6-specific EObjectValidator.validate_EveryBidirectionalReferenceIsPaired(...) method. There's a bug in GenClass.getIntrinsicConstraints() line 2978:

	else if (runtimeVersion < GenRuntimeVersion.EMF25_VALUE)
	{
      result.remove("NoCircularContainment");
	}
	else if (runtimeVersion < GenRuntimeVersion.EMF26_VALUE)
//      ^ need to remove this else
	{
      result.remove("EveryBidirectionalReferenceIsPaired");

Reproducible: Always
Comment 1 Adrian Price CLA 2010-09-17 06:44:31 EDT
Actually, looks like both elses should be removed, because you'll get the same problem with runtimeVersion="2.1-" and NoCircularContainment in addition.
Comment 2 Ed Merks CLA 2010-09-17 12:15:28 EDT
It's fixed in both streams already.

*** This bug has been marked as a duplicate of bug 324207 ***