|
|
Re: [EEF] FeatureMap entry binary name [message #658177 is a reply to message #656514] |
Mon, 07 March 2011 10:03 |
Goulwen Le Fur Messages: 125 Registered: July 2009 |
Senior Member |
|
|
Hi Matt,
Ed is right, it's a bug. I'm sorry, I can't give you a work around. Can
you open a bug, I will fix it for 1.0.
Regards,
--
Goulwen Le Fur - goulwen.lefur@obeo.fr
Le 26/02/2011 03:21, Ed Merks a écrit :
> Matt,
>
> It sounds like a bug. In the generated Java source, the "$" should be
> replaced with a ".". EMF's generator's importer would have produced
> FeatureMap.Entry.
>
>
> Matt Barry wrote:
>> 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.getFe ature())
>> && basePart != null) {
>> if (msg.getEventType() == Notification.ADD)
>> basePart.addToMixed((org.eclipse.emf.ecore.util.FeatureMap$E ntry)
>> msg.getNewValue());
>> else if (msg.getEventType() == Notification.REMOVE)
>> basePart.removeToMixed
> I would have expected removeFrom not removeTo for more meaningful
> English...
>> ((org.eclipse.emf.ecore.util.FeatureMap$Entry) msg.getNewValue());
>> }
>>
>> if (AmlPackage.eINSTANCE.getAnnotation_Id().equals(msg.getFeatu re())
> I would have expected == to be used for feature comparison (it performs
> better and must be equivalent), and for
> AmlPackage.LITERALS.ANNOTATION__ID to be used (if available) for better
> performance
>> && basePart != null){
>> if (msg.getNewValue() != null) {
>> basePart.setId(EcoreUtil.convertToString(XMLTypePackage.eINS TANCE.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);
>>
>>
>> I have about 300 of these errors in my build, but have exhausted my
>> ideas about how to repair the problem. Has anyone else solved an issue
>> like this?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03275 seconds