Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339123 - Generated nested type reference incorrect
Summary: Generated nested type reference incorrect
Status: CLOSED WONTFIX
Alias: None
Product: EEF
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal
Target Milestone: ---   Edit
Assignee: EEF Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-07 12:26 EST by Matt Barry CLA
Modified: 2016-05-30 10:32 EDT (History)
2 users (show)

See Also:


Attachments
Reference eefgen file (663 bytes, application/octet-stream)
2011-03-07 12:29 EST, Matt Barry CLA
no flags Details
Reference ecore file (144.15 KB, application/octet-stream)
2011-03-07 12:30 EST, Matt Barry CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Barry CLA 2011-03-07 12:26:41 EST
Build Identifier: 20100917-0705

Running the "Generate EEF Architecture" on my eefgen file produces source with many of these errors:

The nested type org.eclipse.emf.ecore.util.FeatureMap$Entry cannot be referenced using its binary name

on code like this in in the generated components:
	/**
	 * Used to update the views
	 * 
	 */
	protected void runUpdateRunnable(final Notification msg) {
		if (AmlPackage.eINSTANCE.getAnnotation_Mixed().equals(msg.getFeature()) && basePart != null) {
			if (msg.getEventType() == Notification.ADD) 
				basePart.addToMixed((org.eclipse.emf.ecore.util.FeatureMap$Entry) msg.getNewValue());
			else if (msg.getEventType() == Notification.REMOVE) 
				basePart.removeToMixed((org.eclipse.emf.ecore.util.FeatureMap$Entry) msg.getNewValue());
		}

		if (AmlPackage.eINSTANCE.getAnnotation_Id().equals(msg.getFeature()) && basePart != null){
			if (msg.getNewValue() != null) {
				basePart.setId(EcoreUtil.convertToString(XMLTypePackage.eINSTANCE.getString(), msg.getNewValue()));
			} else {
				basePart.setId("");
			}
		}

	}


and on code like this in the generated parts:

/**
 * Add a value to the group multivalued attribute.
 * @param newValue the value to add
 */
public void addToGroup(org.eclipse.emf.ecore.util.FeatureMap$Entry newValue);


The necessary repair seems to be replacing the "$" character with a "." character everywhere.  See also discussion on forum http://www.eclipse.org/forums/index.php?t=rview&goto=658177#msg_658177.


Reproducible: Always

Steps to Reproduce:
1. Create an Ecore model with an EClass containing an EReference of type EFeatureMapEntry
2. Create its genmodel
3. Initialize EEF from the genmodel
4. Generate EEF content from its eefgen
Comment 1 Matt Barry CLA 2011-03-07 12:29:39 EST
Created attachment 190572 [details]
Reference eefgen file
Comment 2 Matt Barry CLA 2011-03-07 12:30:15 EST
Created attachment 190573 [details]
Reference ecore file
Comment 3 Stephane Begaudeau CLA 2016-05-30 10:32:32 EDT
The Eclipse EEF team has worked over the past few months on a brand new runtime using a reflective approach which can be used more easily with Eclipse Sirius. Since we do not plan to continue to work on the old runtime and its code generation approach, I will close this issue for now.

If you want to contribute, you can reopen this issue and submit a contribution to the project thanks to our Gerrit: https://git.eclipse.org/r/#/admin/projects/eef/org.eclipse.eef